Merge branch 'develop' into 9.0_p4

This commit is contained in:
Laurent Destailleur 2019-12-31 16:38:37 +01:00 committed by GitHub
commit 513b9b26a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9052 changed files with 775921 additions and 480550 deletions

View File

@ -1,14 +1,21 @@
# EditorConfig is awesome: http://EditorConfig.org # EditorConfig is awesome: https://editorconfig.org
# top-most EditorConfig file # top-most EditorConfig file
root = true root = true
# Unix-style newlines with a newline ending every file # Unix-style newlines with a newline ending every file
[*] [*]
charset = utf-8 charset = utf-8
end_of_line = lf end_of_line = lf
insert_final_newline = true insert_final_newline = true
# PHP PSR-2 Coding Standards
# http://www.php-fig.org/psr/psr-2/
[*.php] [*.php]
indent_style = tab indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
[*.js] [*.js]
indent_style = tab indent_style = tab
[*.css] [*.css]

1
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1 @@
htdocs/takepos @andreubisquerra

View File

@ -38,7 +38,7 @@ We officially support versions N, N − 1 and N − 2 for N the latest version a
Choose your base branch accordingly. Choose your base branch accordingly.
### General rules ### General rules
Please don't edit the ChangeLog file. File will be generated from your commit messages during release process by the project manager. Please don't edit the ChangeLog file. File will be generated from all commit messages during release process by the project manager.
### <a name="commits"></a>Commits ### <a name="commits"></a>Commits
Use clear commit messages with the following structure: Use clear commit messages with the following structure:
@ -56,13 +56,15 @@ You can add it to your git configuration using:
git config --local commit.template .gitmessage git config --local commit.template .gitmessage
``` ```
where
#### Keyword #### Keyword
In uppercase if you want to have the log comment appears into the generated ChangeLog file. In uppercase if you want to have the log comment appears into the generated ChangeLog file.
The keyword can be ommitted if your commit does not fit in any of the following categories: The keyword can be ommitted if your commit does not fit in any of the following categories:
- Fix: for a bug fix - Fix/FIX: for a bug fix
- Close: for closing a referenced feature request - New/NEW: for an unreferenced new feature (Opening a feature request and using close is prefered)
- New: for an unreferenced new feature (Opening a feature request and using close is prefered) - Close/CLOSE: for closing a referenced feature request
#### Issuenum #### Issuenum
If your commit fixes a referenced bug or feature request. If your commit fixes a referenced bug or feature request.
@ -85,14 +87,14 @@ This section can span multiple lines.
Try to keep lines under 120 characters. Try to keep lines under 120 characters.
#### Samples #### Examples
<pre> <pre>
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog) FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
or or
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
or
NEW|New Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456) NEW|New Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
or or
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
or
Short description (when the commit is not introducing feature nor closing a bug) Short description (when the commit is not introducing feature nor closing a bug)
Long description (Can span accross multiple lines). Long description (Can span accross multiple lines).
@ -104,13 +106,25 @@ When submitting a pull request, use same rule as [Commits](#commits) for the mes
If your pull request only contains one commit, GitHub will be smart enough to fill it for you. If your pull request only contains one commit, GitHub will be smart enough to fill it for you.
Otherwise, please be a bit verbose about what you're providing. Otherwise, please be a bit verbose about what you're providing.
Your Pull Request must pass the Continuous Integration checks. Your Pull Request (PR) must pass the Continuous Integration checks.
Also, some code changes need a prior approbation: Also, some code changes need a prior approbation:
* if you want to include a new external library (into htdocs/includes directory), please ask before to the project manager (@eldy) to see if such a library can be accepted. * if you want to include a new external library (into htdocs/includes directory), please ask before to the project manager (@eldy) to see if such a library can be accepted.
* if you add a new table, you must first create a page on http://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project manager (@eldy) if the new data model you plan to add can be accepted as you suggest. * if you add a new table, you must first create a page on http://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project manager (@eldy) if the new data model you plan to add can be accepted as you suggest.
Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR.
If the label of PR start with "WIP" (Work In Progress), it will not be analyzed (until you change the label of PR).
If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several month later. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration.
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet.
In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the flag ask you. The majority of PR are waiting an action of the developer/author.
Statistics on Dolibarr project shows that around 95% of submitted PR are reviewed and tagged. This is one of the most important ratio of answered PR in Open Source world. Don't expect the core team to reach the 100%. With the increasing popularity of Dolibarr, this ratio will probably decrease in future.
### Resources ### Resources
[Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation) [Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
@ -120,9 +134,12 @@ The source language (en_US) is maintained in the repository. See the [Code](#cod
All other translations are managed online at [Transifex](https://www.transifex.com/dolibarr-association/dolibarr/). All other translations are managed online at [Transifex](https://www.transifex.com/dolibarr-association/dolibarr/).
Join an existing translation team or create your own and translate into the interface. Translations done on transifex are available in the next major release.
Note: Sometimes, the source text (english) is modified. In such a case, the translation is reset. Transifex assume that if the original source
has changed, the translation is surely no more correct so must be done again. But old translation is not lost and you can use the tab "History"
to retreive all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.
Your translations will be available in the next major release.
### Resources ### Resources
[Translator documentation](http://wiki.dolibarr.org/index.php/Translator_documentation) [Translator documentation](http://wiki.dolibarr.org/index.php/Translator_documentation)
@ -131,5 +148,5 @@ Documentation
------------- -------------
The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php). The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php).
*Note*: to help prevent spam, you need to create an account before being able to edit. *Note*: to help prevent spam, you need to create an account before being able to edit. Everybody is welcome to contribute to its content.

5
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,5 @@
# These are supported funding model platforms
open_collective: dolibarr
custom: https://wiki.dolibarr.org/index.php/Subscribe
# github: [eldy]

View File

@ -1,41 +0,0 @@
# Instructions
*This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
*Please:*
- *only keep the "Bug" or "Feature Request" section*
- *replace the bracket enclosed texts with meaningful informations*
- *remove any unused sub-section*
# Bug
[*Short description*]
## Environment
- **Version**: [*Affected Dolibarr version(s)*]
- **OS**: [*Server OS type and version*]
- **Web server**: [*Webserver type and version*]
- **PHP**: [*PHP version*]
- **Database**: [*Database type and version*]
- **URL(s)**: [*Affected URL(s)*]
## Expected and actual behavior
[*Verbose description*]
## Steps to reproduce the behavior
[*Verbose description*]
## [Attached files](https://help.github.com/articles/issue-attachments) (Screenshots, screencasts, dolibarr.log, debugging informations…)
[*Files*]
# Feature Request
[*Short description*]
## Use case
[*Verbose description*]
## Suggested implementation
[*Verbose description*]
## Suggested steps
[*List of tasks to achieve goal*]

35
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us fix something that is broken
title: ''
labels: Bug
assignees: ''
---
# Instructions
*This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
*Please:*
- *replace the bracket enclosed texts with meaningful information*
- *remove any unused sub-section*
# Bug
[*Short description*]
## Environment
- **Version**: [*Affected Dolibarr version(s)*]
- **OS**: [*Server OS type and version*]
- **Web server**: [*Webserver type and version*]
- **PHP**: [*PHP version*]
- **Database**: [*Database type and version*]
- **URL(s)**: [*Affected URL(s)*]
## Expected and actual behavior
[*Verbose description*]
## Steps to reproduce the behavior
[*Verbose description*]
## [Attached files](https://help.github.com/articles/issue-attachments) (Screenshots, screencasts, dolibarr.log, debugging informations…)
[*Files*]

View File

@ -0,0 +1,27 @@
---
name: Feature request
about: Suggest a new idea for this project
title: ''
labels: Feature request
assignees: ''
---
# Instructions
*This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
*Please:*
- *replace the bracket enclosed texts with meaningful information*
- *remove any unused sub-section*
# Feature Request
[*Short description*]
## Use case
[*Verbose description*]
## Suggested implementation
[*Verbose description*]
## Suggested steps
[*List of tasks to achieve goal*]

22
.gitignore vendored
View File

@ -1,5 +1,7 @@
htdocs/conf/conf.php htdocs/conf/conf.php
htdocs/conf/conf.php.old htdocs/conf/conf.php.old
htdocs/conf/conf.php.sav
htdocs/conf/conf.php.back
documents/ documents/
custom2/ custom2/
test/report/ test/report/
@ -8,21 +10,33 @@ default.properties
.settings/ .settings/
.buildpath .buildpath
.gitmodules .gitmodules
dolibarr_install.log
upgrade.log
doxygen_warnings.log
/.project /.project
/.pydevproject
/.vscode /.vscode
.DS_Store .DS_Store
.idea .idea
*.iml *.iml
Thumbs.db Thumbs.db
/dolibarr_genesis.mp4
# Log files
dolibarr_install.log
upgrade.log
doxygen_warnings.log
# Vagrant generated files # Vagrant generated files
.vagrant .vagrant
# Composer installed repositories # Composer installed repositories
/htdocs/includes/**/.git /htdocs/includes/**/.git
# Composer autoloader and unwanted files # Composer autoloader and unwanted files
composer.phar
htdocs/includes/autoload.php htdocs/includes/autoload.php
htdocs/includes/bin/ htdocs/includes/bin/
htdocs/includes/composer/ htdocs/includes/composer/
/.pydevproject htdocs/includes/doctrine/
htdocs/includes/jakub-onderka/
htdocs/includes/phpdocumentor/
htdocs/includes/phpspec/
htdocs/includes/phpunit/
htdocs/includes/sebastian/
htdocs/includes/squizlabs/
htdocs/includes/symfony/
htdocs/includes/webmozart/

View File

@ -21,9 +21,9 @@ Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry.mail@gmail.
Florian Henry <florian.henry@open-concept.pro> Florian HENRY <florian.henry@open-conept.pro> Florian Henry <florian.henry@open-concept.pro> Florian HENRY <florian.henry@open-conept.pro>
Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry@open-concept.pro> Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry@open-concept.pro>
Florian Henry <florian.henry@open-concept.pro> HENRY Florian <florian.henry@open-concept.pro> Florian Henry <florian.henry@open-concept.pro> HENRY Florian <florian.henry@open-concept.pro>
Alexandre Spangaro <aspangaro.dolibarr@gmail.com> aspangaro <aspangaro.dolibarr@gmail.com> Alexandre Spangaro <aspangaro@open-dsi.fr> aspangaro <aspangaro@open-dsi.fr>
Alexandre Spangaro <aspangaro.dolibarr@gmail.com> Spangaro Alexandre <aspangaro.dolibarr@gmail.com> Alexandre Spangaro <aspangaro@open-dsi.fr> Spangaro Alexandre <aspangaro@open-dsi.fr>
Alexandre Spangaro <aspangaro.dolibarr@gmail.com> Alexandre SPANGARO <aspangaro.dolibarr@gmail.com> Alexandre Spangaro <aspangaro@open-dsi.fr> Alexandre SPANGARO <aspangaro@open-dsi.fr>
Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> Raphaël Doursenaud <rdoursenaud@free.fr> Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> Raphaël Doursenaud <rdoursenaud@free.fr>
Philippe Grand <philippe.grand@atoo-net.com> Grand Philippe <contact@atoo-net.com> Philippe Grand <philippe.grand@atoo-net.com> Grand Philippe <contact@atoo-net.com>
Philippe Grand <philippe.grand@atoo-net.com> Philippe GRAND <philippe.grand@atoo-net.com> Philippe Grand <philippe.grand@atoo-net.com> Philippe GRAND <philippe.grand@atoo-net.com>

View File

@ -1,4 +1,13 @@
# .scrutinizer.yml # .scrutinizer.yml
#build:
# - php-scrutinizer-run
build:
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
imports: imports:
- javascript - javascript
- php - php
@ -29,6 +38,7 @@ tools:
- doc/* - doc/*
- test/* - test/*
- htdocs/includes/* - htdocs/includes/*
- htdocs/core/class/lessc.class.php
paths: paths:
- htdocs/ - htdocs/
- scripts/ - scripts/

View File

@ -8,3 +8,7 @@ linters:
fixers: fixers:
enable: true enable: true
files:
ignore:
- 'htdocs/includes/*'

View File

@ -18,9 +18,7 @@ addons:
apt: apt:
sources: sources:
# To use the last version of pgloader, we add repo of postgresql # To use the last version of pgloader, we add repo of postgresql
- postgresql - pgdg-trusty
- sourceline: 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main'
- key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
packages: packages:
# We need a webserver to test the webservices # We need a webserver to test the webservices
# Let's install Apache with. # Let's install Apache with.
@ -31,13 +29,12 @@ addons:
- pgloader - pgloader
php: php:
- '5.4'
- '5.5'
- '5.6' - '5.6'
- '7.0' - '7.0'
- '7.1' - '7.1'
- '7.2' - '7.2'
- '7.3' - '7.3'
- '7.4'
- nightly - nightly
env: env:
@ -62,26 +59,22 @@ matrix:
- php: nightly - php: nightly
# We exclude some combinations not usefull to save Travis CPU # We exclude some combinations not usefull to save Travis CPU
exclude: exclude:
- php: '5.5'
env: DB=mariadb
- php: '5.6'
env: DB=mariadb
- php: '7.0' - php: '7.0'
env: DB=mariadb env: DB=mariadb
- php: '7.1' - php: '7.1'
env: DB=mariadb env: DB=mariadb
- php: '7.2' - php: '7.2'
env: DB=mariadb env: DB=mariadb
- php: '5.5' - php: '7.3'
env: DB=postgresql env: DB=mariadb
- php: '5.6'
env: DB=postgresql
- php: '7.0' - php: '7.0'
env: DB=postgresql env: DB=postgresql
- php: '7.1' - php: '7.1'
env: DB=postgresql env: DB=postgresql
- php: '7.2' - php: '7.2'
env: DB=postgresql env: DB=postgresql
- php: '7.3'
env: DB=postgresql
- php: nightly - php: nightly
env: DB=postgresql env: DB=postgresql
@ -117,32 +110,33 @@ install:
rm $TRAVIS_BUILD_DIR/composer.json rm $TRAVIS_BUILD_DIR/composer.json
rm $TRAVIS_BUILD_DIR/composer.lock rm $TRAVIS_BUILD_DIR/composer.lock
composer self-update composer self-update
# To have composer making parallel downloads
composer global require hirak/prestissimo
composer -n init composer -n init
composer -n config vendor-dir htdocs/includes composer -n config vendor-dir htdocs/includes
echo echo
- | - |
echo "Installing Parallel Lint" echo "Installing Composer dependencies (PHP Unit, Parallel Lint & PHP CodeSniffer"
composer -n require jakub-onderka/php-parallel-lint ^0
composer -n require jakub-onderka/php-console-highlighter ^0
echo
- |
echo "Installing PHP Unit"
if [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then if [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then
composer -n require phpunit/phpunit ^4 composer -n require phpunit/phpunit ^4 \
jakub-onderka/php-parallel-lint ^0 \
jakub-onderka/php-console-highlighter ^0 \
squizlabs/php_codesniffer ^3
fi fi
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] \
composer -n require phpunit/phpunit ^5 [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then
composer -n require phpunit/phpunit ^5 \
jakub-onderka/php-parallel-lint ^0 \
jakub-onderka/php-console-highlighter ^0 \
squizlabs/php_codesniffer ^3
fi fi
if [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then if [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
composer -n require phpunit/phpunit ^5 composer -n require --ignore-platform-reqs phpunit/phpunit ^5 \
fi jakub-onderka/php-parallel-lint ^0 \
echo jakub-onderka/php-console-highlighter ^0 \
squizlabs/php_codesniffer ^3
- | fi
echo "Installing PHP CodeSniffer"
composer -n require squizlabs/php_codesniffer ^3
echo echo
- | - |
@ -169,12 +163,6 @@ before_script:
echo echo
echo "Set timezone" echo "Set timezone"
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
if [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0, 7.1, 7.2 and nightly!
echo
echo "Enabling Memcached for PHP <= 5.4"
echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
fi
phpenv rehash phpenv rehash
echo echo
@ -212,6 +200,7 @@ before_script:
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
fi fi
if [ "$DB" = 'postgresql' ]; then if [ "$DB" = 'postgresql' ]; then
#pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
#pgloader mysql://root:pass@127.0.0.1/dolibarr_9 postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dev #pgloader mysql://root:pass@127.0.0.1/dolibarr_9 postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dev
echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis
pgloader mysql://root@127.0.0.1/travis postgresql:///travis pgloader mysql://root@127.0.0.1/travis postgresql:///travis
@ -221,7 +210,6 @@ before_script:
#echo 'select * from information_schema.table_constraints;' | psql travis #echo 'select * from information_schema.table_constraints;' | psql travis
#echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis #echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis
fi fi
# TODO: SQLite
echo echo
- | - |
@ -234,6 +222,7 @@ before_script:
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE
echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_port=\'3306\'';' >> $CONF_FILE echo '$'dolibarr_main_db_port=\'3306\'';' >> $CONF_FILE
@ -242,7 +231,6 @@ before_script:
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_port=\'5432\'';' >> $CONF_FILE echo '$'dolibarr_main_db_port=\'5432\'';' >> $CONF_FILE
fi fi
# TODO: SQLite
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
cat $CONF_FILE cat $CONF_FILE
echo echo
@ -257,12 +245,10 @@ before_script:
- echo "Setting up Apache + FPM" - echo "Setting up Apache + FPM"
- sudo apt-get update
- sudo apt-get install apache2 libapache2-mod-fastcgi
# enable php-fpm # enable php-fpm
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf - 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" = '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" = 'nightly' ]; then
# Copy the included pool # 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 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 fi
@ -299,23 +285,83 @@ script:
# Ensure we catch errors # Ensure we catch errors
set -e set -e
#parallel-lint --exclude htdocs/includes --blame . #parallel-lint --exclude htdocs/includes --blame .
parallel-lint --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame . parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/composer/autoload_static.php --blame .
set +e set +e
echo echo
- | - |
echo "Checking coding style" echo "Checking coding style (excluding Pull Requests builds)"
# Ensure we catch errors # Ensure we catch errors
set -e set -e
# Exclusions are defined in the ruleset.xml file # Exclusions are defined in the ruleset.xml file
#phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 . #phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 .
phpcs -s -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true . if [ "$TRAVIS_PULL_REQUEST" = "false" ]; 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 set +e
echo echo
# TODO: Check Javascript (jshint?) - |
export INSTALL_FORCED_FILE=htdocs/install/install.forced.php
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
# Ensure we catch errors
set +e
echo '<?php ' > $INSTALL_FORCED_FILE
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
fi
if [ "$DB" = 'postgresql' ]; then
echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE
fi
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
#cat $INSTALL_FORCED_FILE
# TODO: Check CSS (csslint?) #- |
# echo "Installing Dolibarr"
# cd htdocs/install
# php step1.php $TRAVIS_BUILD_DIR/htdocs > $TRAVIS_BUILD_DIR/install.log
# php step2.php set >> $TRAVIS_BUILD_DIR/install.log
# if [ "$?" -ne "0" ]; then
# echo "SORRY, AN ERROR OCCURED DURING INSTALLATION PROCESS"
# cat $TRAVIS_BUILD_DIR/install.log
# exit 1
# fi
# cd ../..
# rm $INSTALL_FORCED_FILE
# #cat $TRAVIS_BUILD_DIR/install.log
# set +e
# echo
- |
echo "Setting up database to test migrations"
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
echo "MySQL"
mysql -e 'DROP DATABASE IF EXISTS travis;'
mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
mysql -e 'FLUSH PRIVILEGES;'
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
fi
if [ "$DB" = 'postgresql' ]; then
#pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
#pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr
echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql travis
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql travis
#echo 'select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'llx_accountingaccount' | psql travis
#echo 'select * from information_schema.table_constraints;' | psql travis
#echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis
fi
echo
- | - |
echo "Upgrading Dolibarr" echo "Upgrading Dolibarr"
@ -352,6 +398,15 @@ script:
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log php upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log
php upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log php upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log
php step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log php step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log
php upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log
php step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log
php upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade10001100.log
php upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-2.log
php step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-3.log
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log
php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log
php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log
# Enable modules not enabled into original dump # Enable modules not enabled into original dump
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log
echo $? echo $?

View File

@ -236,6 +236,12 @@ source_file = htdocs/langs/en_US/modulebuilder.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.mrp]
file_filter = htdocs/langs/<lang>/mrp.lang
source_file = htdocs/langs/en_US/mrp.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.multicurrency] [dolibarr.multicurrency]
file_filter = htdocs/langs/<lang>/multicurrency.lang file_filter = htdocs/langs/<lang>/multicurrency.lang
source_file = htdocs/langs/en_US/multicurrency.lang source_file = htdocs/langs/en_US/multicurrency.lang
@ -314,6 +320,12 @@ source_file = htdocs/langs/en_US/receiptprinter.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.receptions]
file_filter = htdocs/langs/<lang>/receptions.lang
source_file = htdocs/langs/en_US/receptions.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.resource] [dolibarr.resource]
file_filter = htdocs/langs/<lang>/resource.lang file_filter = htdocs/langs/<lang>/resource.lang
source_file = htdocs/langs/en_US/resource.lang source_file = htdocs/langs/en_US/resource.lang
@ -397,3 +409,10 @@ file_filter = htdocs/langs/<lang>/workflow.lang
source_file = htdocs/langs/en_US/workflow.lang source_file = htdocs/langs/en_US/workflow.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.zapier]
file_filter = htdocs/langs/<lang>/zapier.lang
source_file = htdocs/langs/en_US/zapier.lang
source_lang = en_US
type = MOZILLAPROPERTIES

View File

@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school, You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary. if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>. <https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>. <https://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -5,7 +5,7 @@ License
Dolibarr is released under the terms of the GNU General Public License as Dolibarr is released under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3 of the License, published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version (GPL-3+). or (at your option) any later version (GPL-3+).
More information: http://www.gnu.org/licenses/gpl-3.0.txt More information: https://www.gnu.org/licenses/gpl-3.0.txt
Dolibarr uses some external libraries released under different licenses. This is compatibility summary: Dolibarr uses some external libraries released under different licenses. This is compatibility summary:
@ -13,28 +13,32 @@ Component Version License GPL Compatible
------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------
PHP libraries: PHP libraries:
AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package) AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
ChromePHP 4.1.0 Apache Software License 2.0 Yes Return server log to chrome browser console CKEditor 4.12.1 LGPL-2.1+ Yes Editor WYSIWYG
CKEditor 4.6.2 LGPL-2.1+ Yes Editor WYSIWYG
EvalMath 1.0 BSD Yes Safe math expressions evaluation EvalMath 1.0 BSD Yes Safe math expressions evaluation
Escpos-php MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers Escpos-php 2.2 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package) GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
Mobiledetect 2.8.17 MIT License Yes Detect mobile devices browsers Mobiledetect 2.8.33 MIT License Yes Detect mobile devices browsers
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package) 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 PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
odtPHP 1.0.1 GPL-2+ Yes Library to build/edit ODT files
ParseDown 1.6 MIT License Yes Markdown parser ParseDown 1.6 MIT License Yes Markdown parser
PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers
PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
PHPSpreadSheet ? LGPL-2.1+ Yes Read/Write XLS files, read ODS files
php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service 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 PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
PSR/Logs 1.0 Library for logs (used by DebugBar)
PSR/simple-cache ? Library for cache (used by PHPSpreadSheet)
Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer) Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
TCPDF 6.2.12 LGPL-3+ Yes PDF generation Sabre 3.2.2 BSD Yes DAV support
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP
Stripe 4.7.0 MIT licence Yes Library for Stripe module Stripe 6.41 MIT licence Yes Library for Stripe module
TCPDF 6.3.2 LGPL-3+ Yes PDF generation
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
JS libraries: JS libraries:
jQuery 3.1.1 MIT License Yes JS library Ace 1.4.6 BSD Yes JS library to get code syntaxique coloration in a textarea.
jQuery 3.4.1 MIT License Yes JS library
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
jQuery select2 4.0.5 GPL and Apache License Yes JS library plugin for sexier multiselect jQuery select2 4.0.5 GPL and Apache License Yes JS library plugin for sexier multiselect
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups) jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
@ -51,14 +55,16 @@ jQuery Timepicker 1.1.0 GPL and MIT License Yes
jsGanttImproved 1.7.5.4 BSD License Yes JS library (to build Gantt reports) jsGanttImproved 1.7.5.4 BSD License Yes JS library (to build Gantt reports)
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone
SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer
Ace 1.2.8 BSD Yes JS library to get code syntaxique coloration in a textarea.
Image libraries Image libraries:
Octicons 8.1 MIT Yes Octicons 8.1 MIT Yes
Font libraries:
Fontawesome 5.7.2 Font Awesome Free licence Yes
For licenses compatibility informations: For licenses compatibility informations:
http://www.gnu.org/licenses/licenses.en.html https://www.gnu.org/licenses/licenses.en.html
Copyright / Authors Copyright / Authors

817
ChangeLog
View File

@ -3,6 +3,818 @@ English Dolibarr ChangeLog
-------------------------------------------------------------- --------------------------------------------------------------
***** ChangeLog for 12.0.0 compared to 11.0.0 *****
For Users:
For Developers or integrators:
WARNING:
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* PHP 5.5 is no more supported. Minimum PHP is now 5.6+.
***** ChangeLog for 11.0.0 compared to 10.0.0 *****
For Users:
NEW: Module BOM is now stable (Module MO - Manufacturing Order is still in development).
NEW: Can set the Address/Contact by default on third parties.
NEW: Add a dictionary for list of Social networks
NEW: A nicer dashboard for open elements on Home page.
NEW: Add task widget and add task progress bar
NEW: Support of deployment of metapackages
NEW: Menu "Export accounting document" to generate a zip with all documents requested by a bookkeeper is now stable.
NEW: Add button "Save and Stay" in website editor of pages.
NEW: Accountancy - Can add specific widget in this accountancy area.
NEW: Accountancy - Add export model LDCompta V9 & higher
NEW: Accountancy - Add permission on export, delete operations in ledger
NEW: add ability to edit price without tax before adding a line of a predefined product.
NEW: Add a tab to setup "Opening hours" of company (information only).
NEW: Add attendee to ical export + cleanup.
NEW: Add bank data of users into the expense report exports.
NEW: add clone customers prices in clone product or service.
NEW: Add column of module source and POS terminal in the invoice list.
NEW: Add column last modification date into the table of targets for emailing.
NEW: Add column VAT rate in product list
NEW: add constant DISPATCH_FORCE_QTY_INPUT
NEW: Add constant MAIN_DISABLE_GLOBAL_WORKBOARD to disable workboard in home page
NEW: add country code in import product model
NEW: Add 'Direct Cash Payment' button in TakePOS
NEW: Add odt support to supplier orders
NEW: Add feature to search a string into website containers
NEW: Add GET and POST /supplierinvoices/payments REST API endpoints.
NEW: Show progress bar for declared progression of tasks.
NEW: Add last change date in page "Other setup". Can sort page on name/date.
NEW: Add link to export targets of an emailings into a CSV file.
NEW: Add link to the public interface on the ticket card.
NEW: Add location into event tooltip. Use full day for fullday events
NEW: add MAIN_LANGUAGES_ALLOWED constant to limit languages displayed.
NEW: add MAIN_SHOW_COMPANY_NAME_IN_BANNER_ADDRESS constant.
NEW: add mass actions in shipment list.
NEW: add minimum stock filter in load warehoues for product form.
NEW: add name_alias in fields used for quick search.
NEW: add new rule fetchidfromcodeandlabel for categories import.
NEW: add office phone for salespresentatives
NEW: add office phone & job on user tooltips
NEW: Add option MAIN_PDF_FORCE_FONT_SIZE
NEW: Add option MEMBER_CAN_CONVERT_CUSTOMERS_TO_MEMBERS
NEW: Add option WORKFLOW_CAN_CREATE_PURCHASE_ORDER_FROM_PROPOSAL
NEW: Add pagination on list of object of a category
NEW: add parent category id or label in import category module
NEW: add parent id or ref column in warehouse import
NEW: Add search into template
NEW: Add shipment widget
NEW: Add statistics on product into contracts
NEW: Add status of warehouse in the tooltip of a warehouse.
NEW: add supplier's product list
NEW: add units fields in buying price tab of product card
NEW: Add units in select products lines
NEW: Add upload document on account statement
NEW: Add widgets for BOMs and MOs.
NEW: Amount invoiced column in proposal list
NEW: Ask the new label and new dates in confirm popup when cloning tax
NEW: auto set closing date and user on invoice
NEW: Avoid wrap between picto and text on getNomUrl
NEW: Balance Stripe connect account for supplier
NEW: Bank Add an option for colorize background color of debit or credit movement
NEW: Beautify the select box of warehouses
NEW: Add birthday widget for members
NEW: Widgets uses fiscal year.
NEW: Can change supplier when cloning a Purchase Order.
NEW: can choose lines to keep while creating order from origin
NEW: Can crop/resize image attached on a bank record
NEW: Can edit date or RUM mandate.
NEW: Can edit link to the translation page in website module
NEW: Can edit the price of predefined product during adding in documents
NEW: Can enter price tax incl on vendor proposal and purchase orders
NEW: Can filter on description on bank account transaction lists.
NEW: Can filter on label on invoice in accounting vendor binding pages
NEW: Can load multilang translation in same step than fetch_lines
NEW: Can restrict access using DAV module to some host IPs only
NEW: Can restrict API usage to some IP only
NEW: Can select website templates from available default templates with a preview.
NEW: Can set a squarred icon on your company setup
NEW: can specify hour start end for selectDate and step for minutes
NEW: Categories/Tags are also available on warehouses
NEW: Check if a resource is in use in an event
NEW: Compute column value from others columns in import module
NEW: Copy linked categories on product clone process.
NEW: Default mode for Stripe is STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION
NEW: Digitaria model for numbering accountancy thirdparty
NEW: Display membership in takepos if member linked to the thirdparty
NEW: Display supplier in objectline if defined
NEW: Add default duration of subscriptions on members type
NEW: Email template for Takepos (to send invoice)
NEW: Expense request and holiday validator fields
NEW: Export ledger table in Charlemagne format
NEW: Extend option ORDER_ADD_ORDERS_WITH_PARENT_PROD_IF_INCDEC for all virtual product stats (renamed into PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)
NEW: Value "None" to unbind an invoice line and its accounting account is more visible
NEW: FCKeditor setup for tickets
NEW: The default theme of TakePOS work better on smartphones.
NEW: GeoIP v2 support is natively provided -> So IPv6 is supported
NEW: List by closing date on order list and proposal list
NEW: Look and feel v11: Some setup pages are by default direclty in edit mode.
NEW: Management of retained warranty on situation invoices
NEW: Mass email action on invoice list use billing contact if exists
NEW: more living colors for charts and option for "color bind" people
NEW: Supports multiple payments in a TakePOS sale
NEW: multiselect with checkbox in categories/tags search for product list
NEW: Option to allow to create members from third-party
NEW: Platform compliance with Stripe Connect
NEW: print / send email form in TakePOS
NEW: Public holidays are now in a dictionary table (no more hard coded per country)
NEW: Better performance by reducing the $companystatic calls on some pages.
NEW: Replace the "info" tab on contract with the more complete "agenda" tab.
NEW: Save user of last modification in donation record.
NEW: Show html combo list instead input text for extrafields typed as list.
NEW: Show POS application and the terminal used on invoice card.
NEW: Add categories/tags for stocks.
NEW: Support Net Measure in product's card.php
NEW: Extrafields separator can be collapsed or not
NEW: Extrafields support on Leave requests.
NEW: Extrafields support on Salaries.
NEW: Extrafields support in Product supplier prices.
NEW: Add extrafields for warehouses
NEW: Add extrafields in export of expense report (and holiday)
NEW: The integrity checker now show also the expected size of files.
NEW: The order method in purchase order is now mandatory when recording an order.
NEW: update / delete stripe account for supplier
NEW: Use the gender of member for picto in member lists.
NEW: Use the squarre logo as favicon of pages
NEW: VAT list - Add date start & date end in filters
NEW: widget box for supplier orders awaiting reception
NEW: Update translations
NEW: #4301
For Developers or integrators:
NEW: Code for extrafields uses the new array $extrafields->attributes
NEW: Can set a filter on object linked in modulebuilder.
NEW: Can defined a position of numbering submodules for thirdparties
NEW: Add option multiselect for developers on the selector of language.
NEW: Add a manifest.json.php file for web app.
NEW: Support of deployement of metapackages
NEW: Removed deprecated code that create linked object from ->origin
NEW: experimental zapier for dolibarr
NEW: Accountancy - Add hook bookkeepinglist on general ledger
NEW: Can update product type with the update method.
NEW: add API shipment mode dictionnary
NEW: Add API to get Country by code and iso
NEW: Add API to get objects by ref, ref_ext, ...
NEW: Add anonymous telemetry
NEW: Add a category to a contact in API
NEW: Add fk projet on stock movement
NEW: Add hidden option to set fields for the quick search on products.
NEW: add hook on commongeneratedocument
NEW: Add hook on fileupload.class.php to enable modules to override…
NEW: Add hooks on index pages
NEW: adding 'formObjectOptions' hooks loading at card.php of adherents module
NEW: Add method getStructuredData for website
NEW: Add payments GET and POST REST API endpoints for supplierinvoices.
NEW: Add POST /bankaccounts/transfer REST API endpoint.
NEW: add "printBucktrackInfo" hook, an external module can add info
NEW: Add trigger DIRECT_DEBIT_ORDER_CREATE on widthdraw is missing
NEW: API to post documents for "product" and Delete document
NEW: add new function "setEntity()" and better compatibility with Multicompany
NEW: Can add a button "Create" after combo of object with modulebuilder.
NEW: contacts type dictionnary in api_setup.class.php
NEW: Look and feel v11: Introduce CSS "trforbreak"
NEW: list of measuring units API
NEW: get social networks dictionary by API
NEW: Get thirdparty's salesrepresentatives by API
NEW: get user connected informations in REST API
NEW: mode for list thirdparty API (add easy filter for supplier only)
NEW: purchase_prices API
NEW: Provides more complete demo data
NEW: Module builder can generate CSS of JS file.
NEW: Use a dedicated css for the pencil to edit a field.
NEW: multilangs in fetch_lines
NEW: Add more complete info for triggers actioncom
NEW: add multicurrency rate at currency list API
NEW: Add 2 hidden options to set the default sorting (sort and order) on document page.
NEW: Add hidden option to update supplier buying price during receptions.
NEW: Add hidden option PROPOSAL_SHOW_INVOICED_AMOUNT (not reliable if one invoice is done on several order or several proposal)
NEW: Add hidden option SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT for add possibility to update supplier buying price in the reception on a supplier order
NEW: Add hidden option THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_ORDER to copy extrafields from third party to order.
NEW: Add hidden options to send by email even for object with draft status.
NEW: Update jquery library to 3.4.1
NEW: Upgrade ACE editor to v1.4.6
WARNING:
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* Properties ->libelle_incoterms were renamed into ->label_incoterms
* Removed the method liste_array() of project class. It was not used by core code.
* The function show_theme() hase been renamed into showSkins()
* Rename 'module_part' parameter into 'modulepart' into document APIs, for consistency.
* The deprecated method get_OutstandingBill has been removed. You can use getOutstandingBills() instead.
* The hook "moreFamily" must return payment into var "totalpayment" and no more "paiement" (english replace french).
* Removed deprecated method actioncomm->add(), use create() instead
* If you have developed your own emailing target selector and used parent::add_to_target(...), you must now use parent::addToTargets(...)
* Removed function dol_micro_time. Use native PHP microtime instead.
* The trigger BON_PRELEVEMENT_CREATE has been renamed into DIRECT_DEBIT_ORDER_CREATE.
* The constant INVOICE_SHOW_POS_IN_EXPORT has been renamed into INVOICE_SHOW_POS.
* If your logo is no more visible on the menu bar, you must upload a new logo into 'Home-Setup-Company/Organization' to have it visible again.
* All properties 'libstatut', 'labelstatut', 'labelstatus' were renamed into 'labelStatus'.
* All properties 'labelstatusshort' and 'labelstatut_short' were renamed into 'labelStatusShort'.
* All properties 'type_libelle' were renamed into 'type_label'.
* Renamed property of thirdparty "statut_commercial" into "status_prospect_label"
* The jquery plugin/dependency multiselect has been removed. It was not used by Dolibarr core.
***** ChangeLog for 10.0.4 compared to 10.0.3 *****
FIX: The pdf templates were using the large logo making PDF too large (and edition of proposal, order, invoice VERY slow)
FIX: #12258
FIX: #12319 Restore feature ACCOUNTANCY_AUTOFILL_ACCOUNT_WITH_GENERIC.
FIX: #12356
FIX: #12372
FIX: #12385
FIX: Advisory ID: usd20190053
FIX: Advisory ID: usd20190067
FIX: Avoid fatal error when creating thumb from PDF
FIX: compatibility with Multicompany
FIX: display job of contact list
FIX: Extrafields missing in export of expense report
FIX: Hook getAccessForbiddenMessage was missing parameters
FIX: limit 20 prevent to see all products/services
FIX: Search on leave request ref
FIX: security check. A user can see holiday with link without permissions
FIX: Set unpaid of expense report
FIX: shipping extrafields line
FIX: the SELECT examine more than MAX_JOIN_SIZE rows #12305
FIX: triggers: directories read with opendir() never closed
FIX: we need to be able to recalculate tva only if invoice not in accountancy
FIX: wrong invoice id for fetchObjetctLinked
***** ChangeLog for 10.0.3 compared to 10.0.2 *****
IMPORTANT : This version fixes a serious bug in saving the units of weight, size, surface and volume on product card.
The unit were not saved correctly in database making calculation on shipments wrong.
Update to this version must be done if you use them and have installed version 10.0.0, 10.0.1 or 10.0.2 and set some products after installing or upgrading to one of this version.
Once update is done you must then edit (manually) the product that has bad unit to set the correct unit to have features restored.
FIX: #11702
FIX: #11861 No consistent code to manage measuring units
FIX: #11942
FIX: #12026
FIX: #12040
FIX: #12041
FIX: #12054
FIX: #12083
FIX: #12088
FIX: CVE-2019-17578 CVE-2019-17577 CVE-2019-17576
FIX: Clean the + of categories on the product view only in POS module
FIX: access to public interface when origin email has an alias.
FIX: Alias name is not into the email recipient label.
FIX: allow standalone credit note even if no invoice
FIX: an admin can not access his own permissions after enabling advanced permissions
FIX: Attachement of linked files on ticket when sending a message
FIX: avoid non numeric warning
FIX: Bad currency var used in stripe for connect
FIX: Bad list of ticket on public interface for ticket emailcollector
FIX: Can't modify vendor invoice if transfered into accountancy
FIX: change product type must be allowed if we activate hidden conf
FIX: colspan on VAT quadri report
FIX: CSS
FIX: Debug feature orderstoinvoice for suppliers
FIX: do not output return code on screen after a select of bank account
FIX: Edit of ticket module parameters erased others
FIX: empty cache when we want to load specific warehouses in select
FIX: escape email alias
FIX: expedition.class.php
FIX: Export of leave request show the number of open days
FIX: Filtering the HTTP Header "Accept-Language".
FIX: Filter on project on ticket list
FIX: Filter "Open all" of ticket was ko.
FIX: Force downlaod of file with .noexe as octet-stream mime type
FIX: form not closed.
FIX: hidden conf to prevent from changing product_type
FIX: If product account not suggested during bind, it is not preselected
FIX: If we share invoice, we need to see discount created from a deposit on each entity
FIX: Import of product using units
FIX: label of thirdparty is wrong on open project list
FIX: Look and feel v10
FIX: missing begin()
FIX: missing "$this->id" in "fetch" function
FIX: navigation on ticket tab of projects
FIX: new invoice with generic thirdparty in takepos
FIX: Pb in units of shipments
FIX: regression with option to hide picto on top menu
FIX: selection of project i am contact of.
FIX: Send email from expense report card.
FIX: shipping card: missing user error messages when classifying closed or billed
FIX: SQL injection on qty
FIX: stripe payment when there is a quote into address
FIX: Substitution of __PROJECT_XXX__ not done
FIX: TakePOS no invoice validation control and good payment translate
FIX: the access of the bank account of one user
FIX: top menu right padding
FIX: Update of leave request when CSRF with token is on
FIX: Var not enough sanitized
FIX: wrong test
FIX: XSS
FIX: Payment from POS ware not recorded.
FIX: Can validate invoice with amount including tax of zero for the case of having a final invoice with
VAT that includes a deposit without vat.
***** ChangeLog for 10.0.2 compared to 10.0.1 *****
FIX: #10460 compatibility with MariaDB 10.4
FIX: #11401 Adherent unknown language key
FIX: #11422 Can't edit his own events with standard rights
FIX: #11427 require product class (fixes POST /supplierinvoices REST API endpoint)
FIX: #11570
FIX: #11591 FIX: #11592
FIX: #11671 CVE-2019-15062
FIX: #11672
FIX: #11685
FIX: #11702
FIX: #11711
FIX: #11720
FIX: #11746 Unable to modify amount of insurance of a loan
FIX: #11752
FIX: #11789 FIX: #11790
FIX: #11804 list of tickets from a customer card display ALL tickets
FIX: #11834
FIX: add char $ and ; in sanitizing of filenames
FIX: add comment before protected functions
FIX: add log and type of content in dolWebsiteOutput and
FIX: add repair.php option 'restore' to restore user picture after v10
FIX: amount opened on thirdparty card dont care of credit note not converted
FIX: API of documents work with value 'thirdparty'
FIX: author in message / ticket API
FIX: avoid SQL error if fk_project is empty during update
FIX: avoid Warning: A non-numeric value encountered
FIX: bad consistency in list of invoice for direct debit order
FIX: bad error management in zip compress and web site export
FIX: bad substitution for extrafields type checkbox
FIX: better help message with multicompany
FIX: calculation of $products_dispatched
FIX: Can't add a new chart of account
FIX: Can't delete a draft leave even if it should
FIX: Can't save setup of mailman module
FIX: column jabberid missing
FIX: Confirmation of deletion
FIX: Consistency in direct debit order lists
FIX: Content send before header warning
FIX: credit note can be split
FIX: credit note used on list
FIX: CSS was saved on wrong website
FIX: delivery extrafields
FIX: Disabling a website does not put it offline
FIX: display only stripe sources for customer
FIX: display payment intent in stripe's charge list
FIX: document list for products in API
FIX: dol_thirdparty_id for stripe PI
FIX: Do not show tooltip if tooltip is empty
FIX: duplicate css tag, decrease padding-bottom for boxes in eldy theme
FIX: duration when creating service
FIX: EDB-ID:47370
FIX: Enable web site
FIX: error management when adding a property with type real
FIX: Fatal situation if payment removed on expense report. Action
FIX: filepath of generated documents doesn't handle products with special characters
FIX: for MAIN_MAXTABS_IN_CARD = $i card
FIX: gzip and bzip2 must use option -f
FIX: it was possible to create cashfence without entering data
FIX: javascript error when using dol_use_jmobile=1
FIX: logout redirect to takepos.php
FIX: Look and feel v10
FIX: Make protected all pfd models functions
FIX: management of extrafields in modulebuilder
FIX: missing div for buttons in tax, loan, various payment modules
FIX: missing include (dol_convert_file not found)
FIX: Missing some replacements in website module
FIX: missing test on permission on button to delete ledger record
FIX: Missing the filter fields in export of expense report and leaves
FIX: Missing ticket icon on md theme
FIX: Missing transaction
FIX: Mode smartphone was not triggered when there is too loo menu
FIX: Must escape shell
FIX: Must exclude logs and some dirs for compressed backup
FIX: name and position of hook FIX: #11710
FIX: Not showing MAIN_INVERT_SENDER_RECIPIENT when edit field
FIX: Nowrap missing on amount in boxes
FIX: Option to use ZipArchive instead of PclZip bugged with large files.
FIX: order or proposals billed if both workflow conf activated
FIX: permission check on API intervention
FIX: phpcs
FIX: placement function
FIX: qty in invoice list on product's stats
FIX: remove disabled product type from product list
FIX: Return code of pdf_einstein.modules.php and proformat
FIX: round for application fee in stripe
FIX: Sens of the balance (Debit - Credit in accountancy not contrary)
FIX: Several pb in export of documents
FIX: SQL syntax error and CSRF check on VAT reports
FIX: takepos layout clear or focus search
FIX: too many record in sql request. When a criteria is a filter, we must
FIX: Translation of month
FIX: USEDOLIBARREDITOR not always set
FIX: VAT number for Monaco (it uses FR)
FIX: vulnerability in uploading file found by 美创科技安全实验室
FIX: wrong display (and hidden input) for already dispatched quantity
FIX: wrong parameters (same error in branch 9, 10, develop)
FIX: Wrong variable. Must be PROJECT_HIDE_UNSELECTABLES
***** ChangeLog for 10.0.1 compared to 10.0.0 *****
FIX: #10930
FIX: #10984
FIX: reposition on "Build backup" button
FIX: #11400
FIX: #11412
FIX: #11460
FIX: #11463
FIX: #11466
FIX: #11492
FIX: #11498
FIX: #11505
FIX: #11506
FIX: #11507
FIX: #11509
FIX: #11537
FIX: #11543
FIX: #11553
FIX: #11576
FIX: #11584
FIX: #11590
FIX: accounting mode must be taken from global conf, because there's no way to choose a mode with interface
FIX: Add message from public interface
FIX: add missing hook calls
FIX: Add warning when setup is strange
FIX: ajax call for line positioning when CSRFCHECK_WITH_TOKEN is on
FIX: API return 404 sometimes even if API exists
FIX: Attachment was lost when we validate an expense report
FIX: avoid conflict with "$classname" in card.php
FIX: Bad sql request
FIX: better compatibility with multicompany transverse mode
FIX: Better PHP compatibility
FIX: Block to link with tickets
FIX: Can't submit a ticket from public interface
FIX: categories import: prevent mismatch between category type and object type
FIX: Closing ticket from public interface
FIX: Column 'paid' missing in expense report
FIX: compatibility mysql 8. rank is reserved
FIX: Computed field were not calculated into lists.
FIX: Content of email for subscription
FIX: correct error in files with multiple spaces
FIX: CVE-2019-11199
FIX: delete of links between objects
FIX: div not balanced
FIX: do not return formatted prices in json string
FIX: duplicate on the check (TODO field $onetrtd not used ?)
FIX: element name in update_price
FIX: empty product_use_units in product configuration
FIX: expedition card: infinite loop for printObjectLine hook if return > 0
FIX: extrafield loading bug due to assumption that an object is a third party while it may be a contact if MAIN_USE_COMPANY_NAME_OF_CONTACT is set.
FIX: Fatal error on dol_htmloutput_mesg with corrupted array
FIX: Fatal situation if payment removed on expense report. Action
FIX: FEC Format - Missing date_creation in general ledger when you add a new transaction
FIX: FEC Format - Save translation of the journal label in database & nowrap on amount
FIX: floating point precision errors in the triggers of the workflow module
FIX: for #11232
FIX: format of field with type timestamp
FIX: fournrprice log for insert
FIX: help text
FIX: import filter error
FIX: __INFOS__ tag not exists
FIX: issue #9300: install error with PostgreSQL when using custom table prefix
FIX: Language key
FIX: Limit of uploaded files (max_post_size was not used)
FIX: list of balance of leaves
FIX: minor spelling issues
FIX: missing "dropdown-icon" replacement
FIX: Missing field "Conciliated" into bank transaction export
FIX: missing filter by current contact
FIX: missing token
FIX: Missing where on entity
FIX: move sql request in INNER JOIN
FIX: name was able to be in field but went back to new line
FIX: Nowrap on amount
FIX: Online payment
FIX: on shipment delete confirm dialog, a new checkbox allows the user to choose if they want their stock re-incremented after the deletion.
FIX: option EXPORT_LABEL_FOR_SELECT to restore compatibility in export
FIX: Option THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION
FIX: outdated phpdoc
FIX: Permission for BOM menu
FIX: permission to delete a draft purchase order
FIX: phpcs
FIX: Position was lost when we edit the line of template invoice
FIX: product_use_units was set to 0 each time a conf in block other was set
FIX: propal createFrom hook: undefined parameter attached
FIX: Responsive of public interface of ticket
FIX: search by phone pro
FIX: Setup of TakePos was not possible after a clean install
FIX: Show list of events on tickets
FIX: socpeople assigned list in action com list
FIX: SQL problem on donation & nowrap on amount
FIX: stock increase on shipment deletion if STOCK_CALCULATE_ON_SHIPMENT_NEW: is set
FIX: stripe webhook ID constant set
FIX: summary of time spent in preview tab of projects
FIX: the feature to bill time spent was not enabled.
FIX: The new feature to attach document on lines was not correclty
FIX: The proposed new supplier code does not work
FIX: this function can not be private
FIX: tk9877 - PDF rouget requires product.lib.php (otherwise measuring_units_string() is not defined)
FIX: Update the file index table when we validate/rename a ref.
FIX: use rounding to compare the amounts
FIX: We must save code instead of value in database for template invoice modelpdf
FIX: we need to be able to add freeline with qty between 0 & 1 in supplierorder line
FIX: We should remove property comments only for project and task api.
FIX: When saving an action it didn't save the label based on the type of event if the label is empty and the type is customized
FIX: when STOCK_CALCULATE_ON_SHIPMENT_NEW: is set, deleting a "closed" shipment now increases stock as expected
FIX: wrong path sociales/index.php doesnt exist anymore
***** ChangeLog for 10.0.1 compared to 10.0.0 *****
FIX: #10930
FIX: #10984
FIX: reposition on "Build backup" button
FIX: #11400
FIX: #11412
FIX: #11460
FIX: #11463
FIX: #11466
FIX: #11492
FIX: #11498
FIX: #11505
FIX: #11506
FIX: #11507
FIX: #11509
FIX: #11537
FIX: #11543
FIX: #11553
FIX: #11576
FIX: #11584
FIX: #11590
FIX: accounting mode must be taken from global conf, because there's no way to choose a mode with interface
FIX: Add message from public interface
FIX: add missing hook calls
FIX: Add warning when setup is strange
FIX: ajax call for line positioning when CSRFCHECK_WITH_TOKEN is on
FIX: API return 404 sometimes even if API exists
FIX: Attachment was lost when we validate an expense report
FIX: avoid conflict with "$classname" in card.php
FIX: Bad sql request
FIX: better compatibility with multicompany transverse mode
FIX: Better PHP compatibility
FIX: Block to link with tickets
FIX: Can't submit a ticket from public interface
FIX: categories import: prevent mismatch between category type and object type
FIX: Closing ticket from public interface
FIX: Column 'paid' missing in expense report
FIX: compatibility mysql 8. rank is reserved
FIX: Computed field were not calculated into lists.
FIX: Content of email for subscription
FIX: correct error in files with multiple spaces
FIX: CVE-2019-11199
FIX: delete of links between objects
FIX: div not balanced
FIX: do not return formatted prices in json string
FIX: duplicate on the check (TODO field $onetrtd not used ?)
FIX: element name in update_price
FIX: empty product_use_units in product configuration
FIX: expedition card: infinite loop for printObjectLine hook if return > 0
FIX: extrafield loading bug due to assumption that an object is a third party while it may be a contact if MAIN_USE_COMPANY_NAME_OF_CONTACT is set.
FIX: Fatal error on dol_htmloutput_mesg with corrupted array
FIX: Fatal situation if payment removed on expense report. Action
FIX: FEC Format - Missing date_creation in general ledger when you add a new transaction
FIX: FEC Format - Save translation of the journal label in database & nowrap on amount
FIX: floating point precision errors in the triggers of the workflow module
FIX: for #11232
FIX: format of field with type timestamp
FIX: fournrprice log for insert
FIX: help text
FIX: import filter error
FIX: __INFOS__ tag not exists
FIX: issue #9300: install error with PostgreSQL when using custom table prefix
FIX: Language key
FIX: Limit of uploaded files (max_post_size was not used)
FIX: list of balance of leaves
FIX: minor spelling issues
FIX: missing "dropdown-icon" replacement
FIX: Missing field "Conciliated" into bank transaction export
FIX: missing filter by current contact
FIX: missing token
FIX: Missing where on entity
FIX: move sql request in INNER JOIN
FIX: name was able to be in field but went back to new line
FIX: Nowrap on amount
FIX: Online payment
FIX: on shipment delete confirm dialog, a new checkbox allows the user to choose if they want their stock re-incremented after the deletion.
FIX: option EXPORT_LABEL_FOR_SELECT to restore compatibility in export
FIX: Option THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION
FIX: outdated phpdoc
FIX: Permission for BOM menu
FIX: permission to delete a draft purchase order
FIX: phpcs
FIX: Position was lost when we edit the line of template invoice
FIX: product_use_units was set to 0 each time a conf in block other was set
FIX: propal createFrom hook: undefined parameter attached
FIX: Responsive of public interface of ticket
FIX: search by phone pro
FIX: Setup of TakePos was not possible after a clean install
FIX: Show list of events on tickets
FIX: socpeople assigned list in action com list
FIX: SQL problem on donation & nowrap on amount
FIX: stock increase on shipment deletion if STOCK_CALCULATE_ON_SHIPMENT_NEW: is set
FIX: stripe webhook ID constant set
FIX: summary of time spent in preview tab of projects
FIX: the feature to bill time spent was not enabled.
FIX: The new feature to attach document on lines was not correclty
FIX: The proposed new supplier code does not work
FIX: this function can not be private
FIX: tk9877 - PDF rouget requires product.lib.php (otherwise measuring_units_string() is not defined)
FIX: Update the file index table when we validate/rename a ref.
FIX: use rounding to compare the amounts
FIX: We must save code instead of value in database for template invoice modelpdf
FIX: we need to be able to add freeline with qty between 0 & 1 in supplierorder line
FIX: We should remove property comments only for project and task api.
FIX: When saving an action it didn't save the label based on the type of event if the label is empty and the type is customized
FIX: when STOCK_CALCULATE_ON_SHIPMENT_NEW: is set, deleting a "closed" shipment now increases stock as expected
FIX: wrong path sociales/index.php doesnt exist anymore
***** ChangeLog for 10.0.0 compared to 9.0.0 *****
For Users:
NEW: Module "Ticket" is available as a stable module.
NEW: Module "Email Collector" is available as a stable module.
NEW: Module "TakePOS" is available as a stable module.
NEW: Experimental module "Vendor receptions".
NEW: Experimental module "BOM".
NEW: Accounting - Add default accounting account for member subcriptions.
NEW: Accounting - More comprehensive menu.
NEW: Agenda/event - add description column available in list (hidden by default).
NEW: Add accounting account for result.
NEW: Add accounting code for EEC sales and export sales on products.
NEW: Add a security permission to edit php dynamic content on the WebSite module.
NEW: Attached document on bank account are now visible in automatic ECM.
NEW: Add Autofill Remainder Amount picto on the Expense Report Payment Page.
NEW: Add contact status in category export
NEW: Add Default Warehouse to user record (if module stock is on)
NEW: Add employee/user to subledger account list
NEW: Add gender in member card
NEW: Add getFormatedCustomerRef and getFormatedSupplierRef methods
NEW: Add history to view and print previous sales on TakePos.
NEW: Add import of accounting account for intra/export selling on product card
NEW: Adding code to show update date of supplier price shown
NEW: Add line total on list of payments
NEW: Add LinkedIn field in social network module
NEW: Add more complete error messages in log on stripe payments
NEW: Add no_email field in contact list
NEW: Add notes are show in tooltips
NEW: Add option DONATION_USE_THIRDPARTIES in admin of membership module
NEW: Add option STOCK_SHOW_VIRTUAL_STOCK_IN_PRODUCTS_COMBO
NEW: add page to setup opening hours of the company
NEW: add payments table to pdf of expense report
NEW: add payment terms to invoices list
NEW: Add picto of deletion on mass action combo lists
NEW: add product extrafields available into shipping export
NEW: add ref supplier on supplier invoice
NEW: Add stats on entries & movements by fiscal year
NEW: Add subledger in various payment module
NEW: Add tag for ODT generation for localtax rates
NEW: Add the now link when creating expense report
NEW: Ask date of invoice when using the Clone feature.
NEW: auto event msg
NEW: Automatically binding for intra/export accountancy code in customer list
NEW: automatic / manual selector form
NEW: Better explanation for setup of WebDav module
NEW: Can add more lines on situation invoices at end of project when there is extra to add.
NEW: Can change the customer account of an instance
NEW: Can choose the root category to show products for TakePOS module
NEW: Can edit supplier on draft order supplier
NEW: Can enter price with or without tax when entering expense repor line
NEW: Can filter on the date of period for social contributions
NEW: Can generate invoices from the timespent entered on a project
NEW: Can update product supplier price ref
NEW: Can upload files from the edit page of expense report
NEW: Color for hover and for checked line is on by default
NEW: Column of p...arent company is available in list of third parties
NEW: conditionnal add member button by statut
NEW: constant KEEP_DISCOUNT_LINES_FROM_ORIGIN
NEW: Contact related items tab
NEW: Can create of supplier invoice from a reception
NEW: Ensure External RSS Links Open in New Window
NEW: Export available for reception module
NEW: Extend import option to Order's card and Propal's card
NEW: filter by thirdparty on report CA by prod/serv
NEW: Save space by moving the meteo on the title line
NEW: Get the list of groups of a user with the REST API.
NEW: Hidden option MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER to edit supplier on draft supplier order
NEW: Improve Displaying Shortcut Access Keys in Navigation.
NEW: Improve Expensereport, Inverse Receiver.
NEW: Improve pdf description item visibitity.
NEW: Introduce a config parameter $dolibarr_main_instance_unique_id
NEW: Introduce css "nobottomiftotal"
NEW: Introduce PhpSpreadsheet for export (need php5.6+)
NEW: Invoice creation from the timesheet
NEW: Can list remote stripe's payout in a dedicated page.
NEW: Manage account sell_intra & sell_export in page accoutancy admin default product
NEW: Manage loan schedule.
NEW: Manage status of member types.
NEW: Mass action "create bills" for validated reception
NEW: Measuring unit are now defined into an editable dictionary. Add product size/unit into product import.
NEW: Template pdf 'canelle_reception' displays linked reception lines.
NEW: Moral/physic status can be defined at member type level
NEW: Pagination into list of time spent.
NEW: Performance enhancement (Replace dirname(__FILE__) with __DIR__)
NEW: POS support in order (ex: online cart).
NEW: Preview of images into the filemanager component.
NEW: Resource module can be used in products/services (in a dedicated tab)
NEW: Retrieve invoice infos from order when billing shipment
NEW: Save and display type of membership in subscription table for more explicit historic
NEW: Setup default thirdparty type (customer or prospect/customer)
NEW: Add shipping "set draft" button and can update lines.
NEW: show in blod, the invoice amount where we came from, when making payment
NEW: Show product dimensions in product tooltips.
NEW: Show the latest date of subscription in member statistics reports.
NEW: Sort list of templates alphabetically
NEW: Stripe Payment Intent (need option to use this new Stripe api method)
NEW: Can support barcode on supplier price references.
NEW: Support tag {ccc} on payment ref
NEW: The preview of PDF files generates only 1 png file, even if several pages.
NEW: Can select a Thirdparty object in donation module if option ON.
NEW: Tooltip with VAT amount and price incl tax on lines of objects.
NEW: Unsubscribed emails are now stored in a dedicated table.
NEW: Update working chkbxlst filter for lists.
NEW: Use ajax switch into setup of donation.php and multi-currency module.
NEW: use recipient language when generating the fullname for emails.
NEW: When you create product or service, sell accountancy account by default is suggested.
NEW: Widget birthdays of the month.
NEW: Option in workflow module to set a reception billed on validate supplier bill.
NEW: Autocompletion on lists should be available on mobile applications.
NEW: Add mass action to close several members.
NEW: Add hidden option ADD_UNSPLASH_LOGIN_BACKGROUND for random background
NEW: Add hidden option to be ready for BREXIT
For Developers:
NEW: Module "DebugBar" is available as a stable module.
NEW: Add API REST for donations
NEW: Add a script 'purge-data.php' to purge data older than a defined creation date
NEW: Add constant XFRAMEOPTIONS_ALLOWALL
NEW: Add function isValidVATID() to heck syntax of a VAT ID/number.
NEW: Add document's product support in APIs
NEW: Add REST API: get the list of objects in a category.
NEW: Update Stripe library to 6.35
NEW: Upgrade jquery lib to 3.3.1
NEW: Add hook 'addHtmlHeader()'
NEW: Add hook 'createRecurringInvoices()'
NEW: Add hook 'afterSelectContactOptions'
NEW: Add hook 'getAccessForbiddenMessage'
NEW: Add hook support in accountancy index
NEW: Add hook support in list of template invoices
NEW: Add parameter 'replaceambiguouschars' on getRandomPassword function
NEW: Add property 'noteditable' in modulebuilder
NEW: Add the current modulepart into the Conf class object
NEW: Add trigger FICHINTER_UNVALIDATE
NEW: Add visibility with value 4 in framework to define fields to show
NEW: More option to tune initialization of a new module with modulebuilder.
NEW: Add REST API to list currencies
NEW: REST API Proposal, Orders, Invoices: Add contact details
NEW: hidden option to change concat order of description/product label.
NEW: Enhance management of webhooks
NEW: Generation of doc by modulebuilder can include README and CHANGELOG
NEW: massfilesarea feature is possible for external modules
NEW: Show list of enabled modules in dol_print_error().
NEW: Simplification of CSS styles of default themes.
NEW: Clean code of a lot of deprecated code.
NEW: Add hidden option to set a search entry to the top
NEW: add hidden option DISPLAY_DISCOUNTED_SUPPLIER_PRICE
NEW: add hidden option MAIN_DEFAULT_LANGUAGE_FILTER
NEW: add hidden option NO_CONCAT_DESCRIPTION
NEW: Add hidden option ACCOUNTANCY_COMBO_FOR_AUX
NEW: Add Hidden option OVERRIDE_VAT_FOR_EXPENSE_REPORT
NEW: add hidden option MAIN_DOC_UPLOAD_NOT_RENAME_BY_DEFAULT
NEW: Hidden conf to improve pdf desc item visibitity
NEW: Look and feel v10 - Add CSS 'tabBarNoTop'
WARNING:
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* PHP 5.4 is no more supported. Minimum PHP is now 5.5+.
* The PHP extension php-intl is not mandatory and must be installed to have new features working correctly.
* Method GetUrlTrackingStatus were renamed into getUrlTrackingStatus for consistency with naming rules.
* API getListOfCivility has been renamed into getListOfCivilities for consistency with naming rules.
* Deprecated function img_phone as been removed. You can use img_picto(..., 'call|call_out') instead.;
* Files for variables of themes were renamed from graph-color.php into theme_vars.inc.php to match naming
convention of extension .inc.php for files to be included.
* All methods set_draft() were renamed into setDraft().
* Signatures of methods createFromClone() has been standardized. All methods requires the object User as first parameter.
* Removed deprecated function function test_sql_and_script_inject that was replaced with testSqlAndScriptInject.
* Method load_measuring_units were renamed into selectMeasuringUnits and select_measuring_units was deprecated.
* Hidden option CHANGE_ORDER_CONCAT_DESCRIPTION were renamed into MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION.
* Method dolEscapeXML was moved from functions.lib.php into function2.lib.php (not used enough to be loaded by default).
* Removed deprecated use of string in dol_print_date(). Only date allowed.
* Deprecated property ->fk_departement is now ->state_id everywhere.
* Removed the method 4 of GETPOST (to get $_COOKIE). It was not used and not recommanded to use in Dolibarr.
* Column llx_facture.facnumber change to llx_facture.ref
* Variable $dolibarr_main_cookie_cryptkey is no more created at install (it was not used by Dolibarr). A new variable
called $dolibarr_main_instance_unique_id is now generated at each installation. It will be used by some future features.
***** ChangeLog for 9.0.4 compared to 9.0.3 ***** ***** ChangeLog for 9.0.4 compared to 9.0.3 *****
FIX: #5249 FIX: #5249
FIX: #11025 FIX: #11025
@ -220,8 +1032,10 @@ NEW: Add option PDF_DISABLE_MYCOMPANY_LOGO to disable logo on PDF
NEW: add option PROPOSAL_AUTO_ADD_AUTHOR_AS_CONTACT NEW: add option PROPOSAL_AUTO_ADD_AUTHOR_AS_CONTACT
NEW: Add option to display thirdparty adress in combolist NEW: Add option to display thirdparty adress in combolist
NEW: Add option to swap sender/recipient address on PDF NEW: Add option to swap sender/recipient address on PDF
NEW: Add option to display thirdparty adress in combolist
NEW: Add project on payment of salaries NEW: Add project on payment of salaries
NEW: Add SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME and NEW: Add SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME and
NEW: Add somes hooks in bank planned entries
NEW: Add supplier ref in item reception page NEW: Add supplier ref in item reception page
NEW: Advanced permission to ignore price min NEW: Advanced permission to ignore price min
NEW: Allow to enter a timespent with a numeric value NEW: Allow to enter a timespent with a numeric value
@ -268,7 +1082,6 @@ NEW: Generic cash fence feature (compatible with several POS modules)
For developers: For developers:
NEW: Add lib for multiselect with checkboxes NEW: Add lib for multiselect with checkboxes
NEW: Add function isValidMXRecord NEW: Add function isValidMXRecord
NEW: Add somes hooks in bank planned entries
NEW: Add hook changeRoundingMode in update_price NEW: Add hook changeRoundingMode in update_price
NEW: Add hook formconfirm to contractcard NEW: Add hook formconfirm to contractcard
NEW: Add hook for virtual stock NEW: Add hook for virtual stock
@ -735,7 +1548,7 @@ NEW: Filter export model is now by user
NEW: Finish implementation of option PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES NEW: Finish implementation of option PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES
NEW: generalize use of button to create new element from list NEW: generalize use of button to create new element from list
NEW: hidden conf AGENDA_NB_WEEKS_IN_VIEW_PER_USER to set nb weeks to show into per user view NEW: hidden conf AGENDA_NB_WEEKS_IN_VIEW_PER_USER to set nb weeks to show into per user view
NEW: hidden conf to assign category to thirparty that are neither customer nor prospect or supplier NEW: hidden conf to assign category to thirdparty that are neither customer nor prospect or supplier
NEW: hidden conf to set nb weeks to show into user view NEW: hidden conf to set nb weeks to show into user view
NEW: hidden option MAIN_DISABLE_FREE_LINES NEW: hidden option MAIN_DISABLE_FREE_LINES
NEW: improve way of adding users/sales representative to thirdparty NEW: improve way of adding users/sales representative to thirdparty

View File

@ -5,14 +5,10 @@ Il est simple d'utilisation et modulaire, vous permettant de n'activez que les f
![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_640x480.png) ![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_640x480.png)
## LICENCE ## LICENCE
Dolibarr est distribué sous les termes de la licence GNU General Public License v3+ ou supérieure. Dolibarr est distribué sous les termes de la licence GNU General Public License v3+ ou supérieure.
## INSTALLER DOLIBARR ## INSTALLER DOLIBARR
### Configuration simple ### Configuration simple
@ -23,7 +19,7 @@ Si vous avez peu de compétences techniques et que vous souhaitez installer Doli
- DoliDeb pour Debian ou Ubuntu - DoliDeb pour Debian ou Ubuntu
- DoliRpm pour Redhat, Fedora, OpenSuse, Mandriva ou Mageia - DoliRpm pour Redhat, Fedora, OpenSuse, Mandriva ou Mageia
Les packages peuvent être téléchargés à partir de [site web officiel] (https://www.dolibarr.org/). Les packages peuvent être téléchargés à partir de [site web officiel](https://www.dolibarr.org/).
### Configuration avancée ### Configuration avancée
@ -31,32 +27,32 @@ Vous pouvez aussi utiliser un serveur Web et une base de données prise en charg
- Décompressez l'archive .zip téléchargée pour copier le répertoire "dolibarr/htdocs" et tous ses fichiers à la racine du serveur Web ou récupérez-les directement à partir de GitHub (recommandé si vous connaissez git): - Décompressez l'archive .zip téléchargée pour copier le répertoire "dolibarr/htdocs" et tous ses fichiers à la racine du serveur Web ou récupérez-les directement à partir de GitHub (recommandé si vous connaissez git):
  git clone https://github.com/dolibarr/dolibarr -b x.y (où x.y est la version principale comme 3.6, 9.0, ...)   `git clone https://github.com/dolibarr/dolibarr -b x.y` (où x.y est la version principale comme 3.6, 9.0, ...)
- Configurez votre serveur Web pour qu'il utilise "*dolibarr/htdocs*" en tant que racine si votre serveur Web ne possède pas déjà de répertoire défini vers lequel pointer. - Configurez votre serveur Web pour qu'il utilise "*dolibarr/htdocs*" en tant que racine si votre serveur Web ne possède pas déjà de répertoire défini vers lequel pointer.
 
- Créez un fichier `htdocs/conf/conf.php` vide et définissez les autorisations d'*écrire* pour l'utilisateur de votre serveur Web (l'autorisation *écrire* sera supprimée une fois l'installation terminée) - Créez un fichier `htdocs/conf/conf.php` vide et définissez les autorisations d'*écrire* pour l'utilisateur de votre serveur Web (l'autorisation *écrire* sera supprimée une fois l'installation terminée)
- Depuis votre navigateur, allez à la page "install/" de dolibarr - Depuis votre navigateur, allez à la page "install/" de dolibarr
    L’URL dépendra de la façon dont votre configuration Web a été configurée pour pointer vers votre installation de dolibarr. Cela peut ressembler à: L’URL dépendra de la façon dont votre configuration Web a été configurée pour pointer vers votre installation de dolibarr. Cela peut ressembler à:
`http://localhost/dolibarr/htdocs/install/`
ou
`http://localhost/dolibarr/install/`
ou
`http://yourdolibarrvirtualhost/install/`
        http://localhost/dolibarr/htdocs/install/
        
    ou
    
        http://localhost/dolibarr/install/
        
    ou
    
    http://yourdolibarrvirtualhost/install/
   
- Suivez les instructions de l'installateur - Suivez les instructions de l'installateur
## METTRE A JOUR DOLIBARR ## METTRE A JOUR DOLIBARR
Pour mettre à jour Dolibarr depuis une vieille version vers celle ci: Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
- Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers - Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers
fournis dans ce nouveau package. fournis dans ce nouveau package.
@ -65,16 +61,13 @@ Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
*Note: Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/* *Note: Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/*
## CE QUI EST NOUVEAU ## CE QUI EST NOUVEAU
Voir fichier ChangeLog. Voir fichier ChangeLog.
## CE QUE DOLIBARR PEUT FAIRE ## CE QUE DOLIBARR PEUT FAIRE
### Modules principaux (tous optionnels): ### Modules principaux (tous optionnels)
- Annuaires des prospects et/ou client et/ou fournisseurs - Annuaires des prospects et/ou client et/ou fournisseurs
- Gestion de catalogue de produits et services - Gestion de catalogue de produits et services
@ -96,7 +89,7 @@ Voir fichier ChangeLog.
- Point de vente/Caisse enregistreuse - Point de vente/Caisse enregistreuse
- … - …
### Autres modules: ### Autres modules
- Gestion de marque-pages - Gestion de marque-pages
- Gestion des promesses de dons - Gestion des promesses de dons
@ -111,7 +104,7 @@ Voir fichier ChangeLog.
- Intégration de système de paiements (Paypal, Stripe, Paybox...) - Intégration de système de paiements (Paypal, Stripe, Paybox...)
- … - …
### Divers: ### Divers
- Multi-langue. - Multi-langue.
- Multi-utilisateurs avec différents niveaux de permissions par module. - Multi-utilisateurs avec différents niveaux de permissions par module.
@ -125,60 +118,54 @@ Voir fichier ChangeLog.
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...) - Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers). - Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
- Support natif de nombreuses fonctions spécifiques aux pays comme: - Support natif de nombreuses fonctions spécifiques aux pays comme:
- La tax espagnole TE et ISPF - La tax espagnole TE et ISPF
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM) - Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
- La loi française Finance 2016 et logiciels de caisse - La loi française Finance 2016 et logiciels de caisse
- La double taxe canadienne - La double taxe canadienne
- Le timbre fiscal tunisien - Le timbre fiscal tunisien
- Numérotation de facture de l'argentines (avec type A,B,C...) - Numérotation de facture de l'argentines (avec type A,B,C...)
- Compatible avec vos processus RGPD - Compatible avec vos processus RGPD
- ... - ...
- … - …
### Extension ### Extension
Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com). Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com).
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE ## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
Voici un liste de fonctionnalités pas encore gérées par Dolibarr: Voici un liste de fonctionnalités pas encore gérées par Dolibarr:
- Dolibarr ne contient pas de module de Gestion de la paie. - Dolibarr ne contient pas de module de Gestion de la paie.
- Les tâches du module de gestion de projets n'ont pas de dépendances entre elle. - Les tâches du module de gestion de projets n'ont pas de dépendances entre elle.
- Dolibarr n'embarque pas de Webmail intégré nativement. - Dolibarr n'embarque pas de Webmail intégré nativement.
- Dolibarr ne fait pas le café (pas encore). - Dolibarr ne fait pas le café (pas encore).
## DOCUMENTATION ## DOCUMENTATION
La documentation utilisateur, développeur et traducteur est disponible sous forme de ressources de la communauté via le site [Wiki](https://wiki.dolibarr.org). La documentation utilisateur, développeur et traducteur est disponible sous forme de ressources de la communauté via le site [Wiki](https://wiki.dolibarr.org).
## CONTRIBUER ## CONTRIBUER
Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]. Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)].
<a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a> <a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
## CREDITS ## CREDITS
Dolibarr est le résultat du travail de nombreux contributeurs depuis des années et utilise des librairies d'autres contributeurs. Dolibarr est le résultat du travail de nombreux contributeurs depuis des années et utilise des librairies d'autres contributeurs.
Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT)
## ACTUALITES ET RESEAUX SOCIAUX ## ACTUALITES ET RESEAUX SOCIAUX
Suivez le projet Dolibarr project sur les réseaux francophones Suivez le projet Dolibarr project sur les réseaux francophones
- Facebook: <https://www.facebook.com/dolibarr.fr> - [Facebook](https://www.facebook.com/dolibarr.fr)
- Google+: <https://plus.google.com/+DolibarrFrance> - [Twitter](https://www.twitter.com/dolibarr_france)
- Twitter: <https://www.twitter.com/dolibarr_france>
ou sur les réseaux anglophones ou sur les réseaux anglophones
- [Facebook](https://www.facebook.com/dolibarr) - [Facebook](https://www.facebook.com/dolibarr)
- [Google+](https://plus.google.com/+DolibarrOrg)
- [Twitter](https://www.twitter.com/dolibarr) - [Twitter](https://www.twitter.com/dolibarr)
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr) - [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM) - [YouTube](https://www.youtube.com/user/DolibarrERPCRM)

View File

@ -1,11 +1,10 @@
# DOLIBARR ERP & CRM # DOLIBARR ERP & CRM
![Downloads per day](https://img.shields.io/sourceforge/dm/dolibarr.svg) ![Downloads per day](https://img.shields.io/sourceforge/dw/dolibarr.svg)
[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
|6|7|8|9|develop| |7|8|9|10|develop|
|----------|----------|----------|----------|----------| |----------|----------|----------|----------|----------|
|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/6.0.svg)|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/7.0.svg)|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/8.0.svg)|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/9.0.svg)|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg)| |![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/7.0.svg)|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/8.0.svg)|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/9.0.svg)|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/10.0.svg)|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg)|
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…). Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
@ -17,7 +16,6 @@ You can use it as a standalone application or as a web application to be able to
![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_640x400.png) ![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_640x400.png)
## LICENSE ## LICENSE
Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version (GPL-3+). Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version (GPL-3+).
@ -26,7 +24,6 @@ See the [COPYING](https://github.com/Dolibarr/dolibarr/blob/develop/COPYING) fil
Other licenses apply for some included dependencies. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) for a full list. Other licenses apply for some included dependencies. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) for a full list.
## INSTALLING ## INSTALLING
### Simple setup ### Simple setup
@ -45,7 +42,7 @@ You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL)
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you known git): - Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you known git):
git clone https://github.com/dolibarr/dolibarr -b x.y (where x.y is main version like 3.6, 9.0, ...) `git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is main version like 3.6, 9.0, ...)
- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to. - Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
@ -53,51 +50,54 @@ You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL)
- From your browser, go to the dolibarr "install/" page - From your browser, go to the dolibarr "install/" page
The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like: The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like:
http://localhost/dolibarr/htdocs/install/ `http://localhost/dolibarr/htdocs/install/`
or or
http://localhost/dolibarr/install/ `http://localhost/dolibarr/install/`
or or
http://yourdolibarrvirtualhost/install/ `http://yourdolibarrvirtualhost/install/`
- Follow the installer instructions - Follow the installer instructions
### Saas/Cloud setup
If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See https://saas.dolibarr.org). However, this third solution is not free.
## UPGRADING ## UPGRADING
- At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package. - Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
- At first next access, Dolibarr will redirect your to the "install/" page to follow the upgrade process. - At first next access, Dolibarr will redirect your to the "install/" page to follow the upgrade process.
 If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").  If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
*Note: migration process can be safely done multiple times by calling the `/install/index.php` page* *Note: migration process can be safely done multiple times by calling the `/install/index.php` page*
## WHAT'S NEW ## WHAT'S NEW
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file. See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
## FEATURES ## FEATURES
### Main application/modules (all optional) ### Main application/modules (all optional)
- Customers, Prospects and/or Suppliers directory - Customers, Prospects (Leads) and/or Suppliers directory
- Products and/or Services catalog - Products and/or Services catalog
- Commercial proposals management - Commercial proposals management
- Customer and Supplier Orders management - Customer and Supplier Orders management
- Invoices and payment management - Invoices and payment management
- Standing orders management (European SEPA) - Standing orders management (European SEPA)
- Bank accounts management - Bank accounts management
- Accounting management
- Shared calendar/agenda (with ical and vcal export for third party tools integration) - Shared calendar/agenda (with ical and vcal export for third party tools integration)
- Opportunities and/or project management - Opportunities and/or project management
- Projects management - Projects management
- Contracts management - Contracts management
- Stock management - Warehouse/Stock management
- Shipping management - Shipping management
- Interventions management - Interventions management
- Employee's leave requests management - Employee's leave requests management
@ -107,7 +107,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Foundations members management - Foundations members management
- Mass emailing - Mass emailing
- Surveys - Surveys
- Point of Sale - Point of Sale (POS)
- … - …
### Other application/modules ### Other application/modules
@ -127,33 +127,37 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
### Other general features ### Other general features
- Localization in most major languages. - Localization in most major languages
- Multi-Users and groups with finely grained rights. - Multi-Users and groups with finely grained rights
- Multi-currency. - Multi-currency
- Multi-company by adding of an external module. - Multi-company by adding of an external module
- Very user friendly and easy to use. - Very user friendly and easy to use
- customizable Dashboard
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one) - Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
- Works with PHP 5.3+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites. - APIs
- APIs.
- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture) - An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
- Support a lot of country specific features: - Support a lot of country specific features:
- Spanish Tax RE and ISPF - Spanish Tax RE and ISPF
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM) - French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
- Canadian double taxes (federal/province) and other countries using cumulative VAT - Canadian double taxes (federal/province) and other countries using cumulative VAT
- Tunisian tax stamp - Tunisian tax stamp
- Argentina invoice numbering using A,B,C... - Argentina invoice numbering using A,B,C...
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE) - Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
- Compatible with European GDPR rules - Compatible with European GDPR rules
- ... - ...
- PDF or ODT generation for invoice, proposals, orders... - PDF or ODT generation for invoice, proposals, orders...
- … - …
### System Environment / Requirements
- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
### Extending ### Extending
Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com). Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
## WHAT DOLIBARR CAN'T DO YET ## WHAT DOLIBARR CAN'T DO YET
These are features that Dolibarr does **not** yet fully support: These are features that Dolibarr does **not** yet fully support:
@ -163,37 +167,31 @@ These are features that Dolibarr does **not** yet fully support:
- No native embedded Webmail - No native embedded Webmail
- Dolibarr can't do coffee (yet) - Dolibarr can't do coffee (yet)
## DOCUMENTATION ## DOCUMENTATION
Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org). Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org).
## CONTRIBUTING ## CONTRIBUTING
This project exists thanks to all the people who contribute. [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]. This project exists thanks to all the people who contribute. [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)].
<a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a> <a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
## CREDITS ## CREDITS
Dolibarr is the work of many contributors over the years and uses some fine libraries. Dolibarr is the work of many contributors over the years and uses some fine libraries.
See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file.
## NEWS AND SOCIAL NETWORKS ## NEWS AND SOCIAL NETWORKS
Follow Dolibarr project on: Follow Dolibarr project on:
- [Facebook](https://www.facebook.com/dolibarr) - [Facebook](https://www.facebook.com/dolibarr)
- [Google+](https://plus.google.com/+DolibarrOrg)
- [Twitter](https://www.twitter.com/dolibarr) - [Twitter](https://www.twitter.com/dolibarr)
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr) - [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM) - [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
- [GitHub](https://github.com/Dolibarr/dolibarr) - [GitHub](https://github.com/Dolibarr/dolibarr)
### Sponsors ### Sponsors
Support this project by becoming a sponsor. Your logo will show up here. 🙏 [[Become a sponsor/backer](https://opencollective.com/dolibarr#backer)] Support this project by becoming a sponsor. Your logo will show up here. 🙏 [[Become a sponsor/backer](https://opencollective.com/dolibarr#backer)]

13
SECURITY.md Normal file
View File

@ -0,0 +1,13 @@
# Security Policy
## Supported Versions
| Version | Supported |
| -------- | ------------------ |
| <= 8.0.* | :x: |
| >= 9.0.* | :white_check_mark: |
## Reporting a Vulnerability
To report a vulnerability, please send an email to security@dolibarr.org
In most cases, after fixing the security, we make an answer by email to say the issue has been fixed.

1
build/.gitignore vendored
View File

@ -5,6 +5,5 @@
/dolibarr-*.tgz /dolibarr-*.tgz
/dolibarr-*.rpm /dolibarr-*.rpm
/dolibarr-*.zip /dolibarr-*.zip
/dolibarr-*.tgz
/*.exe /*.exe
/html /html

View File

@ -3,8 +3,7 @@ README (English)
Building packages Building packages
################################################## ##################################################
All sub-directories of "build" directory contains files required to build All sub-directories of "build" directory contains files (setup or binary tools) required to build automatically Dolibarr packages.
automatically Dolibarr packages.
There are several tools: There are several tools:
@ -37,7 +36,7 @@ Note: Prerequisites to build autoexe DoliWamp package:
> perl makepack-dolibarrmodule.pl > perl makepack-dolibarrmodule.pl
- To build developper documentation, launch the script - To build developper documentation, launch the script
> perl dolybarr-doxygen-build.pl > perl dolibarr-doxygen-build.pl
Note: Note:

View File

@ -52,7 +52,7 @@ License: GPL-3+
details. details.
. .
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
. .
On Debian systems, the full text of the GNU General Public On Debian systems, the full text of the GNU General Public
License version 3 can be found in the file License version 3 can be found in the file
@ -98,7 +98,7 @@ License: GPL-2+
GNU General Public License for more details. GNU General Public License for more details.
. .
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
. .
On Debian systems, the complete text of the GNU General Public License On Debian systems, the complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-2 file. can be found in /usr/share/common-licenses/GPL-2 file.
@ -192,7 +192,7 @@ License: GPL-2+
details. details.
. .
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
. .
On Debian systems, the full text of the GNU General Public On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file License version 2 can be found in the file
@ -212,7 +212,7 @@ License: LGPL-2.1+
Lesser General Public License for more details. Lesser General Public License for more details.
. .
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
. .
On Debian systems, the full text of the GNU Lesser General Public On Debian systems, the full text of the GNU Lesser General Public
License version 2.1 can be found in the file License version 2.1 can be found in the file
@ -236,7 +236,7 @@ License: GPL-2+ or MIT
details. details.
. .
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
. .
On Debian systems, the full text of the GNU General Public On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file License version 2 can be found in the file
@ -291,7 +291,7 @@ License: GPL-2+
details. details.
. .
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
. .
On Debian systems, the full text of the GNU General Public On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file License version 2 can be found in the file
@ -311,7 +311,7 @@ License: LGPL-2.1+
Lesser General Public License for more details. Lesser General Public License for more details.
. .
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
. .
On Debian systems, the full text of the GNU Lesser General Public On Debian systems, the full text of the GNU Lesser General Public
License version 2.1 can be found in the file License version 2.1 can be found in the file
@ -338,7 +338,7 @@ License: GPL-2+
details. details.
. .
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
. .
On Debian systems, the full text of the GNU General Public On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file License version 2 can be found in the file
@ -358,7 +358,7 @@ License: LGPL-2.1+
Lesser General Public License for more details. Lesser General Public License for more details.
. .
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
. .
On Debian systems, the full text of the GNU Lesser General Public On Debian systems, the full text of the GNU Lesser General Public
License version 2.1 can be found in the file License version 2.1 can be found in the file
@ -378,7 +378,7 @@ License: LGPL-3.0+
See the GNU Lesser General Public License for more details. See the GNU Lesser General Public License for more details.
. .
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with TCPDF. If not, see <http://www.gnu.org/licenses/>. along with TCPDF. If not, see <https://www.gnu.org/licenses/>.
. .
On Debian systems, the complete text of the GNU Lesser General On Debian systems, the complete text of the GNU Lesser General
Public License version 3 can be found in "/usr/share/common-licenses/LGPL-3". Public License version 3 can be found in "/usr/share/common-licenses/LGPL-3".

View File

@ -1,31 +1,37 @@
FROM php:7.0-apache FROM php:7.2-apache
ENV HOST_USER_ID 33 ENV HOST_USER_ID 33
ENV PHP_INI_DATE_TIMEZONE 'UTC' ENV PHP_INI_DATE_TIMEZONE 'UTC'
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev \ RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev zlib1g-dev libicu-dev g++\
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd \ && docker-php-ext-install gd \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install ldap \ && docker-php-ext-install ldap \
&& docker-php-ext-install mysqli \ && docker-php-ext-install mysqli \
&& apt-get purge -y libjpeg-dev libldap2-dev && docker-php-ext-install calendar \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& apt-get autoremove --purge -y libjpeg-dev libldap2-dev zlib1g-dev libicu-dev g++
RUN mkdir /var/documents
RUN chown www-data /var/documents
COPY docker-run.sh /usr/local/bin/ COPY docker-run.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-run.sh RUN chmod +x /usr/local/bin/docker-run.sh
RUN pecl install xdebug-2.5.5 && docker-php-ext-enable xdebug RUN pecl install xdebug && docker-php-ext-enable xdebug
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' >> /usr/local/etc/php/php.ini RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_autostart=0' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.remote_autostart=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.default_enable=0' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.default_enable=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_host=docker.for.mac.host.internal' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.remote_host=docker.host' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> /usr/local/etc/php/php.ini
RUN echo '172.17.0.1 docker.host' >> /etc/hosts
EXPOSE 80 EXPOSE 80

View File

@ -23,3 +23,6 @@ The URL to go to the Dolibarr is :
The URL to go to PhpMyAdmin is (login/password is root/root) : The URL to go to PhpMyAdmin is (login/password is root/root) :
http://0.0.0.0:8080 http://0.0.0.0:8080
Setup the database connection during the installation process, please use mariad
b (name of the database container) as database host.

View File

@ -1,5 +1,5 @@
mariadb: mariadb:
image: mariadb:latest build: mariadb
environment: environment:
MYSQL_ROOT_PASSWORD: root MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: dolibarr MYSQL_DATABASE: dolibarr

View File

@ -3,7 +3,8 @@
usermod -u $HOST_USER_ID www-data usermod -u $HOST_USER_ID www-data
groupmod -g $HOST_USER_ID www-data groupmod -g $HOST_USER_ID www-data
chown -hR www-data:www-data /var/www chgrp -hR www-data /var/www/html
chmod g+rwx /var/www/html/conf
if [ ! -f /usr/local/etc/php/php.ini ]; then if [ ! -f /usr/local/etc/php/php.ini ]; then
cat <<EOF > /usr/local/etc/php/php.ini cat <<EOF > /usr/local/etc/php/php.ini

View File

@ -0,0 +1,3 @@
FROM mariadb:latest
# Enable comented out UTF8 charset/collation options
RUN sed '/utf8/ s/^#//' /etc/mysql/mariadb.cnf >/tmp/t && mv /tmp/t /etc/mysql/mariadb.cnf

View File

@ -36,7 +36,7 @@ $SOURCE="../..";
$result = open( IN, "< " . $SOURCE . "/htdocs/filefunc.inc.php" ); $result = open( IN, "< " . $SOURCE . "/htdocs/filefunc.inc.php" );
if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; } if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; }
while (<IN>) { while (<IN>) {
if ( $_ =~ /define\('DOL_VERSION','([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; } if ( $_ =~ /define\('DOL_VERSION', '([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; }
} }
close IN; close IN;
($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3); ($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3);

View File

@ -18,7 +18,7 @@
# that follow. The default is UTF-8 which is also the encoding used for all # that follow. The default is UTF-8 which is also the encoding used for all
# text before the first occurrence of this tag. Doxygen uses libiconv (or the # text before the first occurrence of this tag. Doxygen uses libiconv (or the
# iconv built into libc) for the transcoding. See # iconv built into libc) for the transcoding. See
# http://www.gnu.org/software/libiconv for the list of possible encodings. # https://www.gnu.org/software/libiconv for the list of possible encodings.
DOXYFILE_ENCODING = UTF-8 DOXYFILE_ENCODING = UTF-8
@ -587,7 +587,7 @@ INPUT = ../../htdocs ../../scripts
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
# also the default input encoding. Doxygen uses libiconv (or the iconv built # also the default input encoding. Doxygen uses libiconv (or the iconv built
# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # into libc) for the transcoding. See https://www.gnu.org/software/libiconv for
# the list of possible encodings. # the list of possible encodings.
INPUT_ENCODING = UTF-8 INPUT_ENCODING = UTF-8
@ -737,7 +737,7 @@ REFERENCES_LINK_SOURCE = YES
# If the USE_HTAGS tag is set to YES then the references to source code # If the USE_HTAGS tag is set to YES then the references to source code
# will point to the HTML generated by the htags(1) tool instead of doxygen # will point to the HTML generated by the htags(1) tool instead of doxygen
# built-in source browser. The htags tool is part of GNU's global source # built-in source browser. The htags tool is part of GNU's global source
# tagging system (see http://www.gnu.org/software/global/global.html). You # tagging system (see https://www.gnu.org/software/global/global.html). You
# will need version 4.8.6 or higher. # will need version 4.8.6 or higher.
USE_HTAGS = NO USE_HTAGS = NO

View File

@ -10,7 +10,6 @@ File added into doxygen generated documentation
<br> <br>
</div>
<!-- Global site tag (gtag.js) - Google Analytics --> <!-- Global site tag (gtag.js) - Google Analytics -->
@ -24,13 +23,30 @@ File added into doxygen generated documentation
</script> </script>
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');
fbq('init', '1998533953704960');
fbq('track', "PageView");</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1998533953704960&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->
<!-- Twitter ad collector --> <!-- Twitter ad collector -->
<script src="//platform.twitter.com/oct.js" type="text/javascript"></script> <script src="//static.ads-twitter.com/oct.js" type="text/javascript"></script>
<script type="text/javascript">twttr.conversion.trackPid('ntm4n', { tw_sale_amount: 0, tw_order_quantity: 0 });</script> <script type="text/javascript">twttr.conversion.trackPid('ntm4n', { tw_sale_amount: 0, tw_order_quantity: 0 });</script>
<noscript> <noscript>
<img height="1" width="1" style="display:none;" alt="" src="https://analytics.twitter.com/i/adsct?txn_id=ntm4n&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" /> <img height="1" width="1" style="display:none;" alt="" src="https://analytics.twitter.com/i/adsct?txn_id=ntm4n&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" />
<img height="1" width="1" style="display:none;" alt="" src="//t.co/i/adsct?txn_id=ntm4n&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" /> <img height="1" width="1" style="display:none;" alt="" src="//t.co/i/adsct?txn_id=ntm4n&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" />
</noscript> </noscript>
</body> </body>
</html> </html>

View File

@ -30,7 +30,6 @@ src="https://www.facebook.com/tr?id=1998533953704960&ev=PageView&noscript=1"
</head> </head>
<body> <body>
<div id="top">
<div class="topmaincol"> <div class="topmaincol">
<div class="divpath"> <div class="divpath">
@ -42,7 +41,7 @@ src="https://www.facebook.com/tr?id=1998533953704960&ev=PageView&noscript=1"
<table width="100%"> <table width="100%">
<tr> <tr>
<td><div id="projectname">$projectname</div> - <span id="projectnumber">$projectnumber</span></td> <td><div id="projectname">$projectname</div> - <span id="projectnumber">$projectnumber</span></td>
<td align="right"><!-- banner start --> <td class="right"><!-- banner start -->
<table cellpadding="0" cellspacing="0" class="moduletablemybanner"> <table cellpadding="0" cellspacing="0" class="moduletablemybanner">
<tr> <tr>
<td> <td>

29
build/exakat/README.md Normal file
View File

@ -0,0 +1,29 @@
== Install exakat ==
mkdir exakat
cd exakat
curl -o exakat.phar http://dist.exakat.io/index.php?file=latest
curl -o apache-tinkerpop-gremlin-server-3.3.5-bin.zip http://dist.exakat.io/apache-tinkerpop-gremlin-server-3.3.5-bin.zip
unzip apache-tinkerpop-gremlin-server-3.3.5-bin.zip
mv apache-tinkerpop-gremlin-server-3.3.5 tinkergraph
rm -rf apache-tinkerpop-gremlin-server-3.3.5-bin.zip
cd tinkergraph ./bin/gremlin-server.sh -i org.apache.tinkerpop neo4j-gremlin 3.3.5
cd ..
php exakat.phar version
php exakat.phar doctor
== Init project ==
php
Edit config.ini file to exclude some dirs:
ignore_dirs[] = "/htdocs/includes";
ignore_dirs[] = "/scripts";
ignore_dirs[] = "/build";
ignore_dirs[] = "/dev";
ignore_dirs[] = "/documents";
== Analyze project ==
php

View File

@ -11,7 +11,7 @@ LaunchProgram=Launch %1
AssocFileExtension=&Associate %1 with the %2 file extension AssocFileExtension=&Associate %1 with the %2 file extension
AssocingFileExtension=Associating %1 with the %2 file extension... AssocingFileExtension=Associating %1 with the %2 file extension...
YouWillInstallDoliWamp=You will install or upgrade DoliWamp (so Dolibarr + all required third party softwares like Apache, Mysql and PHP) on your computer. YouWillInstallDoliWamp=You will install or upgrade DoliWamp (so Dolibarr + all required third party software like Apache, Mysql and PHP) on your computer.
ThisAssistantInstallOrUpgrade=WARNING: Using an ERP CRM installed on a local computer can be dangerous: if your computer break down, you can lose all your data. Do this if you are ready to manage backup yourself seriously. If not, use an installation in Saas instead (see https://saas.dolibarr.org). ThisAssistantInstallOrUpgrade=WARNING: Using an ERP CRM installed on a local computer can be dangerous: if your computer break down, you can lose all your data. Do this if you are ready to manage backup yourself seriously. If not, use an installation in Saas instead (see https://saas.dolibarr.org).
IfYouHaveTechnicalKnowledge=Moreover, if you have technical knowledges and want to manage your Apache, Mysql and PHP yourself, you should not use this assistant and make a manual installation of Dolibarr on your existing server with Apache, Mysql and PHP. IfYouHaveTechnicalKnowledge=Moreover, if you have technical knowledges and want to manage your Apache, Mysql and PHP yourself, you should not use this assistant and make a manual installation of Dolibarr on your existing server with Apache, Mysql and PHP.
ButIfYouLook=But if you look for an automatic setup on your local computer, you''re on the good way... ButIfYouLook=But if you look for an automatic setup on your local computer, you''re on the good way...

View File

@ -1,8 +0,0 @@
README (English)
##################################################
DOLIWAMP Package tools
##################################################
This directory contains files used by makepack-dolibarr.pl
script to build the all-in-on .EXE package DoliWamp, ready
to be distributed (for Windows).

View File

@ -1,7 +1,10 @@
# DOLIWAMP, THE DOLIBARR INSTALLER FOR WINDOWS # DOLIWAMP, THE DOLIBARR INSTALLER FOR WINDOWS
DoliWamp is a special all in one package installer for Windows (Dolibarr+Mysql+Apache+PHP). DoliWamp is a special all in one package installer for Windows (Dolibarr+Mysql+Apache+PHP).
It's a dedicated Dolibarr version for Windows newbies with no technical knowledge. This package will install or upgrade Dolibarr but also and all prerequisites like the web server, and the database in one autoinstall process. It's a dedicated Dolibarr version for Windows newbies with no technical knowledge. This package will install or upgrade Dolibarr but also all prerequisites like the web server, and the database in one auto-install process.
This directory contains files used by *makepack-dolibarr.pl* script to build the all-in-on .EXE package DoliWamp, ready
to be distributed (for Windows).
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). 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).

View File

@ -402,7 +402,7 @@ $cfg['RecodingEngine'] = 'auto';
// Specify some parameters for iconv used in charset conversion. See iconv // Specify some parameters for iconv used in charset conversion. See iconv
// documentation for details: // documentation for details:
// http://www.gnu.org/software/libiconv/documentation/libiconv/iconv_open.3.html // https://www.gnu.org/software/libiconv/documentation/libiconv/iconv_open.3.html
$cfg['IconvExtraParams'] = '//TRANSLIT'; $cfg['IconvExtraParams'] = '//TRANSLIT';
// Available charsets for MySQL conversion. currently contains all which could // Available charsets for MySQL conversion. currently contains all which could

View File

@ -31,7 +31,7 @@ AppPublisher=NLTechno
AppPublisherURL=https://www.nltechno.com AppPublisherURL=https://www.nltechno.com
AppSupportURL=https://www.dolibarr.org AppSupportURL=https://www.dolibarr.org
AppUpdatesURL=https://www.dolibarr.org AppUpdatesURL=https://www.dolibarr.org
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares. AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql software.
AppCopyright=Copyright (C) 2008-2019 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre) AppCopyright=Copyright (C) 2008-2019 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre)
DefaultDirName=c:\dolibarr DefaultDirName=c:\dolibarr
DefaultGroupName=Dolibarr DefaultGroupName=Dolibarr

View File

@ -150,7 +150,7 @@ Require local
# e-mailed. This address appears on some server-generated pages, such # e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com # as error documents. e.g. admin@your-domain.com
# #
ServerAdmin webmaster@localhost ServerAdmin doliwamp@localhost
# #
# ServerName gives the name and port that the server uses to identify itself. # ServerName gives the name and port that the server uses to identify itself.
@ -772,5 +772,5 @@ SSLCertificateKeyFile "WAMPROOT/myserver.key"
#</Location> #</Location>
# Declare alias for Dolibarr, PHPMyAdmin and other softwares # Declare alias for Dolibarr, PHPMyAdmin and other software
Include "WAMPROOT/alias/*.conf" Include "WAMPROOT/alias/*.conf"

View File

@ -527,10 +527,10 @@ a:hover {
</head> </head>
<body> <body>
<table width="100%"><tr><td align="left"> <table width="100%"><tr><td class="left">
<img src="index.php?img=pngLogo"> <img src="index.php?img=pngLogo">
</td> </td>
<td align="right"> <td class="right">
<ul class="utility"> <ul class="utility">
<li><a href="?lang={$langues[$langue]['autreLangueLien1']}">{$langues[$langue]['autreLangue1']}</a> <li><a href="?lang={$langues[$langue]['autreLangueLien1']}">{$langues[$langue]['autreLangue1']}</a>
- <a href="?lang={$langues[$langue]['autreLangueLien2']}">{$langues[$langue]['autreLangue2']}</a></li> - <a href="?lang={$langues[$langue]['autreLangueLien2']}">{$langues[$langue]['autreLangue2']}</a></li>

View File

@ -5,6 +5,7 @@
// during install process to be used. // during install process to be used.
// //
// //
$force_install_type='doliwamp';
$force_install_noedit=2; // 1=To block vars specific to distrib, 2 to block all technical parameters $force_install_noedit=2; // 1=To block vars specific to distrib, 2 to block all technical parameters
$force_install_message='KeepDefaultValuesWamp'; $force_install_message='KeepDefaultValuesWamp';
$force_install_main_data_root='WAMPROOT/dolibarr_documents'; $force_install_main_data_root='WAMPROOT/dolibarr_documents';

View File

@ -458,16 +458,6 @@ variables_order = "GPCS"
; with user data. This makes most sense when coupled with track_vars - in which ; with user data. This makes most sense when coupled with track_vars - in which
; case you can access all of the GPC variables through the $HTTP_*_VARS[], ; case you can access all of the GPC variables through the $HTTP_*_VARS[],
; variables. ; variables.
;
; You should do your best to write your scripts so that they do not require
; register_globals to be on; Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
register_globals = Off
; Whether or not to register the old-style input arrays, HTTP_GET_VARS
; and friends. If you're not using them, it's recommended to turn them off,
; for performance reasons.
register_long_arrays = Off
; This directive tells PHP whether to declare the argv&argc variables (that ; This directive tells PHP whether to declare the argv&argc variables (that
; would contain the GET information). If you don't use these variables, you ; would contain the GET information). If you don't use these variables, you
@ -477,8 +467,7 @@ register_argc_argv = Off
; When enabled, the SERVER and ENV variables are created when they're first ; When enabled, the SERVER and ENV variables are created when they're first
; used (Just In Time) instead of when the script starts. If these variables ; used (Just In Time) instead of when the script starts. If these variables
; are not used within a script, having this directive on will result in a ; are not used within a script, having this directive on will result in a
; performance gain. The PHP directives register_globals, register_long_arrays, ; performance gain.
; and register_argc_argv must be disabled for this directive to have any affect.
auto_globals_jit = On auto_globals_jit = On
; Maximum size of POST data that PHP will accept. ; Maximum size of POST data that PHP will accept.
@ -653,6 +642,8 @@ default_socket_timeout = 60
; extension folders as well as the separate PECL DLL download (PHP 5). ; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive. ; Be sure to appropriately set the extension_dir directive.
; If an extension does not load, run "deplister.exe php_xxx.dll" to get list of dependency dll missing.
extension=php_bz2.dll extension=php_bz2.dll
extension=php_curl.dll extension=php_curl.dll
;extension=php_dba.dll ;extension=php_dba.dll
@ -665,6 +656,7 @@ extension=php_gd2.dll
;extension=php_ifx.dll ;extension=php_ifx.dll
;extension=php_imap.dll ;extension=php_imap.dll
;extension=php_interbase.dll ;extension=php_interbase.dll
extension=php_intl.dll
extension=php_ldap.dll extension=php_ldap.dll
extension=php_mbstring.dll extension=php_mbstring.dll
;extension=php_mcrypt.dll ;extension=php_mcrypt.dll
@ -1098,14 +1090,6 @@ session.gc_maxlifetime = 1800
; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): ; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
; cd /path/to/sessions; find -cmin +24 | xargs rm ; cd /path/to/sessions; find -cmin +24 | xargs rm
; PHP 4.2 and less have an undocumented feature/bug that allows you to
; to initialize a session variable in the global scope, albeit register_globals
; is disabled. PHP 4.3 and later will warn you, if this feature is used.
; You can disable the feature and the warning separately. At this time,
; the warning is only displayed, if bug_compat_42 is enabled.
session.bug_compat_42 = 0
session.bug_compat_warn = 1
; Check HTTP Referer to invalidate externally stored URLs containing ids. ; Check HTTP Referer to invalidate externally stored URLs containing ids.
; HTTP_REFERER has to contain this substring for the session to be ; HTTP_REFERER has to contain this substring for the session to be

View File

@ -4,3 +4,4 @@ REM ----------------------------
REM Go to admin center page REM Go to admin center page
start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/ start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/
REM FOR EDGE start microsoft-edge:"http://localhost:WAMPAPACHEPORT/"

View File

@ -5,3 +5,4 @@ REM ---------------------------
REM Go to help center page REM Go to help center page
echo Please wait... echo Please wait...
start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/support/ start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/support/
REM FOR EDGE start microsoft-edge:"http://localhost:WAMPAPACHEPORT/dolibarr/support/"

View File

@ -4,6 +4,8 @@ REM ---------------
REM If no lock file, we call install process REM If no lock file, we call install process
IF NOT EXIST dolibarr_documents\install.lock start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/install/ IF NOT EXIST dolibarr_documents\install.lock start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/install/
REM FOR EDGE IF NOT EXIST dolibarr_documents\install.lock start microsoft-edge:"http://localhost:WAMPAPACHEPORT/dolibarr/install/"
REM If lock file exists, we call home page REM If lock file exists, we call home page
IF EXIST dolibarr_documents\install.lock start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/ IF EXIST dolibarr_documents\install.lock start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/
REM FOR EDGE IF EXIST dolibarr_documents\install.lock start microsoft-edge:"http://localhost:WAMPAPACHEPORT/dolibarr/"

View File

@ -1 +1 @@
Help wanted... "Help wanted..."

View File

@ -13,7 +13,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** /**
@ -22,7 +22,7 @@
* \brief This script create a xml checksum file * \brief This script create a xml checksum file
*/ */
if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db
$sapi_type = php_sapi_name(); $sapi_type = php_sapi_name();
$script_file = basename(__FILE__); $script_file = basename(__FILE__);
@ -45,8 +45,7 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
$includecustom=0; $includecustom=0;
$includeconstants=array(); $includeconstants=array();
if (empty($argv[1])) if (empty($argv[1])) {
{
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n"; print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
exit -1; exit -1;
@ -54,14 +53,11 @@ if (empty($argv[1]))
parse_str($argv[1]); parse_str($argv[1]);
$i=0; $i=0;
while ($i < $argc) while ($i < $argc) {
{
if (! empty($argv[$i])) parse_str($argv[$i]); if (! empty($argv[$i])) parse_str($argv[$i]);
if (preg_match('/includeconstant=/',$argv[$i])) if (preg_match('/includeconstant=/', $argv[$i])) {
{
$tmp=explode(':', $includeconstant, 3); $tmp=explode(':', $includeconstant, 3);
if (count($tmp) != 3) if (count($tmp) != 3) {
{
print "Error: Bad parameter includeconstant ".$includeconstant."\n"; print "Error: Bad parameter includeconstant ".$includeconstant."\n";
exit -1; exit -1;
} }
@ -70,50 +66,39 @@ while ($i < $argc)
$i++; $i++;
} }
if (empty($release)) 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";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; exit -1;
exit -1;
} }
$savrelease = $release; $savrelease = $release;
// If release is auto, we take current version // If release is auto, we take current version
$tmpver=explode('-', $release, 2); $tmpver=explode('-', $release, 2);
if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') {
{ $release=DOL_VERSION;
$release=DOL_VERSION; if ($tmpver[1] && $tmpver[0] == 'auto') $release.='-'.$tmpver[1];
if ($tmpver[1] && $tmpver[0] == 'auto') $release.='-'.$tmpver[1];
} }
if (empty($includecustom)) if (empty($includecustom)) {
{ $tmpverbis=explode('-', $release, 2);
$tmpverbis=explode('-', $release, 2); if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') {
if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') {
{ print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
{ exit -1;
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n"; }
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; } else {
exit -1; $tmpverter=explode('-', DOL_VERSION, 2);
} if ($tmpverter[0] != $tmpverbis[0]) {
} print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
else print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
{ exit -1;
$tmpverter=explode('-', DOL_VERSION, 2); }
if ($tmpverter[0] != $tmpverbis[0]) }
{ } else {
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n"; if (! preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1;
}
}
}
else
{
if (! preg_match('/'.preg_quote(DOL_VERSION,'/').'-/',$release))
{
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n"; print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1; exit -1;
@ -124,10 +109,8 @@ print "Release : ".$release."\n";
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n"; print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
print "Include custom in signature : ".$includecustom."\n"; print "Include custom in signature : ".$includecustom."\n";
print "Include constants in signature : "; print "Include constants in signature : ";
foreach ($includeconstants as $countrycode => $tmp) foreach ($includeconstants as $countrycode => $tmp) {
{ foreach($tmp as $constname => $constvalue) {
foreach($tmp as $constname => $constvalue)
{
print $constname.'='.$constvalue." "; print $constname.'='.$constvalue." ";
} }
} }
@ -136,20 +119,18 @@ print "\n";
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml'; //$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
$outputdir=dirname(dirname(__FILE__)).'/htdocs/install'; $outputdir=dirname(dirname(__FILE__)).'/htdocs/install';
print 'Delete current files '.$outputdir.'/filelist*.xml'."\n"; print 'Delete current files '.$outputdir.'/filelist*.xml'."\n";
dol_delete_file($outputdir.'/filelist*.xml',0,1,1); dol_delete_file($outputdir.'/filelist*.xml', 0, 1, 1);
$checksumconcat=array(); $checksumconcat=array();
$outputfile=$outputdir.'/filelist-'.$release.'.xml'; $outputfile=$outputdir.'/filelist-'.$release.'.xml';
$fp = fopen($outputfile,'w'); $fp = fopen($outputfile, 'w');
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n"); fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now(), 'dayhourrfc').'" generator="'.$script_file.'">'."\n"); fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now(), 'dayhourrfc').'" generator="'.$script_file.'">'."\n");
foreach ($includeconstants as $countrycode => $tmp) foreach ($includeconstants as $countrycode => $tmp) {
{
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n"); fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
foreach($tmp as $constname => $constvalue) foreach($tmp as $constname => $constvalue) {
{
$valueforchecksum=(empty($constvalue)?'0':$constvalue); $valueforchecksum=(empty($constvalue)?'0':$constvalue);
$checksumconcat[]=$valueforchecksum; $checksumconcat[]=$valueforchecksum;
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n"); fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
@ -170,10 +151,10 @@ $files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoex
$dir=''; $dir='';
$needtoclose=0; $needtoclose=0;
foreach ($files as $filetmp) { foreach ($files as $filetmp) {
$file = $filetmp['fullname']; $file = $filetmp['fullname'];
//$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file)); //$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file)); $newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
if ($newdir!=$dir) { if ($newdir!=$dir) {
if ($needtoclose) if ($needtoclose)
fputs($fp, ' </dir>'."\n"); fputs($fp, ' </dir>'."\n");
fputs($fp, ' <dir name="'.$newdir.'" >'."\n"); fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
@ -183,7 +164,7 @@ foreach ($files as $filetmp) {
if (filetype($file)=="file") { if (filetype($file)=="file") {
$md5=md5_file($file); $md5=md5_file($file);
$checksumconcat[]=$md5; $checksumconcat[]=$md5;
fputs($fp, ' <md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n"); fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
} }
} }
fputs($fp, ' </dir>'."\n"); fputs($fp, ' </dir>'."\n");
@ -192,7 +173,7 @@ fputs($fp, '</dolibarr_htdocs_dir>'."\n");
asort($checksumconcat); // Sort list of checksum asort($checksumconcat); // Sort list of checksum
//var_dump($checksumconcat); //var_dump($checksumconcat);
fputs($fp, '<dolibarr_htdocs_dir_checksum>'."\n"); fputs($fp, '<dolibarr_htdocs_dir_checksum>'."\n");
fputs($fp, md5(join(',',$checksumconcat))."\n"); fputs($fp, md5(join(',', $checksumconcat))."\n");
fputs($fp, '</dolibarr_htdocs_dir_checksum>'."\n"); fputs($fp, '</dolibarr_htdocs_dir_checksum>'."\n");
@ -212,10 +193,10 @@ $files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoincl
$dir=''; $dir='';
$needtoclose=0; $needtoclose=0;
foreach ($files as $filetmp) { foreach ($files as $filetmp) {
$file = $filetmp['fullname']; $file = $filetmp['fullname'];
//$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); //$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file)); $newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); $newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
if ($newdir!=$dir) { if ($newdir!=$dir) {
if ($needtoclose) if ($needtoclose)
fputs($fp, ' </dir>'."\n"); fputs($fp, ' </dir>'."\n");
@ -226,7 +207,7 @@ foreach ($files as $filetmp) {
if (filetype($file)=="file") { if (filetype($file)=="file") {
$md5=md5_file($file); $md5=md5_file($file);
$checksumconcat[]=$md5; $checksumconcat[]=$md5;
fputs($fp, ' <md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n"); fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
} }
} }
fputs($fp, ' </dir>'."\n"); fputs($fp, ' </dir>'."\n");
@ -234,7 +215,7 @@ fputs($fp, '</dolibarr_script_dir>'."\n");
asort($checksumconcat); // Sort list of checksum asort($checksumconcat); // Sort list of checksum
fputs($fp, '<dolibarr_script_dir_checksum>'."\n"); fputs($fp, '<dolibarr_script_dir_checksum>'."\n");
fputs($fp, md5(join(',',$checksumconcat))."\n"); fputs($fp, md5(join(',', $checksumconcat))."\n");
fputs($fp, '</dolibarr_script_dir_checksum>'."\n"); fputs($fp, '</dolibarr_script_dir_checksum>'."\n");
fputs($fp, '</checksum_list>'."\n"); fputs($fp, '</checksum_list>'."\n");

10
build/gource/README.md Normal file
View File

@ -0,0 +1,10 @@
# Command to run gource on Dolibarr git project.
cd ~/git/dolibarr
gource -a 0.5 -c 4 -i 0 --max-files 0 --dir-name-depth 2 --max-file-lag 0.1 --max-user-speed 150 --user-friction 1 --user-scale 3 --file-filter svgs --file-filter _source --file-filter tests --file-show-filter htdocs --date-format "%d %b %Y" -logo doc/images/appicon_64.png --highlight-users --highlight-colour FFFF88 -s 0.5 -1280x720 -r 25 -title 'Dolibarr ERP CRM Genesis' --stop-at-end --filename-time 2 --user-image-dir build/gource/avatars --hide filenames
# To build a mp4 video
# Change -crf 1 to -crf 50 for max compression (best is 5)
cd ~/git/dolibarr
gource -a 0.5 -c 4 -i 0 --max-files 0 --dir-name-depth 2 --max-file-lag 0.1 --max-user-speed 150 --user-friction 1 --user-scale 3 --file-filter svgs --file-filter _source --file-filter tests --file-show-filter htdocs --date-format "%d %b %Y" -logo doc/images/appicon_64.png --highlight-users --highlight-colour FFFF88 -s 0.4 -1280x720 -r 25 -title 'Dolibarr ERP CRM Genesis' --stop-at-end --filename-time 2 --user-image-dir build/gource/avatars --hide filenames -o - | ffmpeg -y -r 25 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset slow -pix_fmt yuv420p -crf 5 -threads 0 -bf 0 dolibarr_genesis.mp4

1
build/gource/avatars/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/*.png

View File

@ -0,0 +1 @@
Directory that will be filled with avatars images of developers for gource

49
build/gource/getavatars.pl Executable file
View File

@ -0,0 +1,49 @@
#!/usr/bin/perl
#fetch Gravatars
use strict;
use warnings;
use LWP::Simple;
use Digest::MD5 qw(md5_hex);
my $size = 90;
my $output_dir = './avatars';
die("no .git/ directory found in current path\n") unless -d './avatars';
mkdir($output_dir) unless -d $output_dir;
open(GITLOG, q/git log --pretty=format:"%ae|%an" |/) or die("failed to read git-log: $!\n");
my %processed_authors;
while(<GITLOG>) {
chomp;
my($email, $author) = split(/\|/, $_);
next if $processed_authors{$author}++;
my $author_image_file = $output_dir . '/' . $author . '.png';
#skip images we have
next if -e $author_image_file;
#try and fetch image
my $grav_url = "http://www.gravatar.com/avatar/".md5_hex(lc $email)."?d=404&size=".$size;
warn "fetching image for '$author' $email ($grav_url)...\n";
my $rc = getstore($grav_url, $author_image_file);
sleep(1);
if($rc != 200) {
unlink($author_image_file);
next;
}
}
close GITLOG;

View File

@ -129,7 +129,7 @@ $BUILDROOT="$TEMP/buildroot";
$result = open( IN, "<" . $SOURCE . "/htdocs/filefunc.inc.php" ); $result = open( IN, "<" . $SOURCE . "/htdocs/filefunc.inc.php" );
if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; } if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; }
while (<IN>) { while (<IN>) {
if ( $_ =~ /define\('DOL_VERSION','([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; } if ( $_ =~ /define\('DOL_VERSION',\s*'([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; }
} }
close IN; close IN;
($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3); ($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3);
@ -361,13 +361,12 @@ if ($nboftargetok) {
} }
if (! $BUILD || $BUILD eq '0-rc') # For a major version if (! $BUILD || $BUILD eq '0-rc') # For a major version
{ {
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
} }
else # For a maintenance release else # For a maintenance release
{ {
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; #print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
} }
print "\n"; print "\n";
if (! $ret) if (! $ret)
@ -387,6 +386,8 @@ if ($nboftargetok) {
#----------------------- #-----------------------
if ($CHOOSEDTARGET{'-CHKSUM'}) if ($CHOOSEDTARGET{'-CHKSUM'})
{ {
print "Go to directory $SOURCE\n";
$olddir=getcwd();
chdir("$SOURCE"); chdir("$SOURCE");
$ret=`git ls-files . --exclude-standard --others`; $ret=`git ls-files . --exclude-standard --others`;
@ -460,15 +461,18 @@ if ($nboftargetok) {
print "Clean $BUILDROOT\n"; print "Clean $BUILDROOT\n";
$ret=`rm -f $BUILDROOT/$PROJECT/.buildpath`; $ret=`rm -f $BUILDROOT/$PROJECT/.buildpath`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`; $ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.editorconfig`; $ret=`rm -fr $BUILDROOT/$PROJECT/.codeclimate`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.externalToolBuilders`; $ret=`rm -fr $BUILDROOT/$PROJECT/.externalToolBuilders`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.git*`; $ret=`rm -fr $BUILDROOT/$PROJECT/.git*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.project`; $ret=`rm -fr $BUILDROOT/$PROJECT/.project`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.pydevproject`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.settings`; $ret=`rm -fr $BUILDROOT/$PROJECT/.settings`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.scrutinizer.yml`; $ret=`rm -fr $BUILDROOT/$PROJECT/.scrutinizer.yml`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.stickler.yml`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.travis.yml`; $ret=`rm -fr $BUILDROOT/$PROJECT/.travis.yml`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.tx`; $ret=`rm -fr $BUILDROOT/$PROJECT/.tx`;
$ret=`rm -f $BUILDROOT/$PROJECT/build.xml`; $ret=`rm -f $BUILDROOT/$PROJECT/build.xml`;
$ret=`rm -f $BUILDROOT/$PROJECT/phpstan.neon`;
$ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`; $ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`;
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`; $ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
@ -1004,7 +1008,7 @@ if ($nboftargetok) {
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/mymoduleindex.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/mymoduleindex.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_card.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_card.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_list.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_list.php`;
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/scripts/myobject.php`; $ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/scripts/mymodule.php`;
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; "; $cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; ";
$ret=`$cmd`; $ret=`$cmd`;
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; "; $cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; ";

View File

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# \file dolibarr.pl # \file dolibarr.pl
# \brief Dolibarr script install for Virtualmin Pro # \brief Dolibarr script install for Virtualmin Pro
# \author (c)2009-2018 Regis Houssin <regis.houssin@inodbox.com> # \author (c)2009-2019 Regis Houssin <regis.houssin@inodbox.com>
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@ -30,7 +30,7 @@ return "Regis Houssin";
# script_dolibarr_versions() # script_dolibarr_versions()
sub script_dolibarr_versions sub script_dolibarr_versions
{ {
return ( "9.0.0", "8.0.3", "7.0.4", "6.0.8", "5.0.7" ); return ( "10.0.0", "9.0.3", "8.0.5", "7.0.5", "6.0.8" );
} }
sub script_dolibarr_release sub script_dolibarr_release
@ -390,6 +390,7 @@ sub script_dolibarr_check_latest
{ {
local ($ver) = @_; local ($ver) = @_;
local @vers = &osdn_package_versions("dolibarr", local @vers = &osdn_package_versions("dolibarr",
$ver >= 10.0 ? "dolibarr\\-(10\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 9.0 ? "dolibarr\\-(9\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 9.0 ? "dolibarr\\-(9\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 8.0 ? "dolibarr\\-(8\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 8.0 ? "dolibarr\\-(8\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 7.0 ? "dolibarr\\-(7\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 7.0 ? "dolibarr\\-(7\\.0\\.[0-9\\.]+)\\.tgz" :

View File

@ -0,0 +1,14 @@
<?php
// Example to use PHPStan
// cd git/dolibarr
// /usr/bin/php7.2 ../phpstan.phar -l1 analyze htdocs/societe/website.php --memory-limit 2G
// Defined some constants and load Dolibarr env to reduce PHPStan bootstrap that fails to load a lot of things.
define('DOL_DOCUMENT_ROOT', __DIR__ . '/../../htdocs');
define('DOL_DATA_ROOT', __DIR__ . '/../../documents');
define('DOL_URL_ROOT', '/');
// Load the main.inc.php file to have functions llx_Header and llx_Footer defined
if (! defined("NOLOGIN")) define("NOLOGIN", '1');
global $conf, $langs, $user, $db;
include_once __DIR__ . '/../../htdocs/main.inc.php';

View File

@ -165,6 +165,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks %_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/bom
%_datadir/dolibarr/htdocs/cashdesk %_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab %_datadir/dolibarr/htdocs/collab
@ -179,6 +180,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/custom %_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/datapolicy %_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector %_datadir/dolibarr/htdocs/emailcollector
@ -200,6 +202,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder %_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/mrp
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
@ -208,6 +211,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/product
%_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/projet
%_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/societe %_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe %_datadir/dolibarr/htdocs/stripe

View File

@ -245,6 +245,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks %_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/bom
%_datadir/dolibarr/htdocs/cashdesk %_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab %_datadir/dolibarr/htdocs/collab
@ -259,6 +260,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/custom %_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/datapolicy %_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector %_datadir/dolibarr/htdocs/emailcollector
@ -280,6 +282,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder %_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/mrp
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
@ -288,6 +291,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/product
%_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/projet
%_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/societe %_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe %_datadir/dolibarr/htdocs/stripe

View File

@ -162,6 +162,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks %_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/bom
%_datadir/dolibarr/htdocs/cashdesk %_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab %_datadir/dolibarr/htdocs/collab
@ -176,6 +177,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/custom %_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/datapolicy %_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector %_datadir/dolibarr/htdocs/emailcollector
@ -197,6 +199,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder %_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/mrp
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
@ -205,6 +208,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/product
%_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/projet
%_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/societe %_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe %_datadir/dolibarr/htdocs/stripe

View File

@ -173,6 +173,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks %_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/bom
%_datadir/dolibarr/htdocs/cashdesk %_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab %_datadir/dolibarr/htdocs/collab
@ -187,6 +188,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/custom %_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/datapolicy %_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector %_datadir/dolibarr/htdocs/emailcollector
@ -208,6 +210,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder %_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/mrp
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
@ -216,6 +219,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/product
%_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/projet
%_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/societe %_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe %_datadir/dolibarr/htdocs/stripe

View File

@ -29,16 +29,6 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
ErrorDocument 401 /public/error-401.php ErrorDocument 401 /public/error-401.php
ErrorDocument 404 /public/error-404.php ErrorDocument 404 /public/error-404.php
<IfModule mod_php4.c>
php_flag magic_quotes_gpc Off
php_flag register_globals Off
</IfModule>
<IfModule mod_php5.c>
php_flag magic_quotes_gpc Off
php_flag register_globals Off
</IfModule>
# OPTIMIZE: To use gzip compressed files (for Dolibarr already compressed files). # OPTIMIZE: To use gzip compressed files (for Dolibarr already compressed files).
# Note that constant MAIN_OPTIMIZE_SPEED must have a value with bit 0 set. # Note that constant MAIN_OPTIMIZE_SPEED must have a value with bit 0 set.

View File

@ -1,60 +1,59 @@
{ {
"name": "dolibarr/dolibarr", "name" : "dolibarr/dolibarr",
"type": "project", "type" : "project",
"description": "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business", "description" : "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business",
"keywords": [ "keywords" : [
"erp", "erp",
"crm", "crm",
"invoice", "invoice",
"sme", "sme",
"proposal", "proposal",
"order", "order",
"stock", "stock",
"agenda" "agenda"
], ],
"homepage": "https://www.dolibarr.org", "homepage" : "https://www.dolibarr.org",
"license": "GPL-3.0-or-later", "license" : "GPL-3.0-or-later",
"support": { "support" : {
"issues": "https://github.com/Dolibarr/dolibarr/issues", "issues" : "https://github.com/Dolibarr/dolibarr/issues",
"forum": "https://www.dolibarr.org/forum", "forum" : "https://www.dolibarr.org/forum",
"wiki": "https://wiki.dolibarr.org", "wiki" : "https://wiki.dolibarr.org",
"source": "https://github.com/Dolibarr/dolibarr" "source" : "https://github.com/Dolibarr/dolibarr"
}, },
"config": { "config" : {
"vendor-dir": "htdocs/includes" "vendor-dir" : "htdocs/includes"
}, },
"require": { "require" : {
"php": ">=5.3.0", "php" : ">=5.5.0",
"ext-curl": "*", "ext-curl" : "*",
"ccampbell/chromephp": "4.1.0", "ckeditor/ckeditor" : "4.12.1",
"ckeditor/ckeditor": "4.5.9", "mike42/escpos-php" : "2.2",
"mike42/escpos-php": "1.2.1", "mobiledetect/mobiledetectlib" : "2.8.33",
"mobiledetect/mobiledetectlib": "2.8.17", "phpoffice/phpexcel" : "1.8.1",
"phpoffice/phpexcel": "1.8.1", "restler/framework" : "3.0.0-RC6",
"restler/framework": "3.0.0-RC6", "tecnickcom/tcpdf" : "^6.2",
"tecnickcom/tcpdf": "6.2.12" "luracast/restler" : "^3.0"
}, },
"require-dev": { "require-dev" : {
"jakub-onderka/php-parallel-lint": "^0", "jakub-onderka/php-parallel-lint" : "^0",
"jakub-onderka/php-console-highlighter": "^0", "jakub-onderka/php-console-highlighter" : "^0",
"phpunit/phpunit": "^4", "phpunit/phpunit" : "^4",
"squizlabs/php_codesniffer": "^2", "squizlabs/php_codesniffer" : "^2",
"phpunit/phpunit-selenium": "^2" "phpunit/phpunit-selenium" : "^2"
}, },
"suggest": { "suggest" : {
"ext-mysqlnd": "To use with MySQL or MariaDB", "ext-mysqlnd" : "To use with MySQL or MariaDB",
"ext-mysqli": "To use with MySQL or MariaDB", "ext-mysqli" : "To use with MySQL or MariaDB",
"ext-pgsql": "To use with PostgreSQL", "ext-pgsql" : "To use with PostgreSQL",
"ext-mssql": "To use with MSSQL (experimental)", "ext-mssql" : "To use with MSSQL (experimental)",
"ext-pdo_sqlite": "To use with SQLite (experimental)", "ext-pdo_sqlite" : "To use with SQLite (experimental)",
"ext-gd": "Image manipulation (Required but maybe built-in PHP)", "ext-gd" : "Image manipulation (Required but maybe built-in PHP)",
"ext-imagick": "Image manipulation (TCPDF)", "ext-imagick" : "Generation of thumbs from PDF",
"ext-mcrypt": "(Required but maybe built-in PHP)", "ext-mcrypt" : "(Required but maybe built-in PHP)",
"ext-openssl": "Secure connections (Emails, SOAP…)", "ext-openssl" : "Secure connections (Emails, SOAP\u2026)",
"ext-mbstring": "Handle non UTF-8 databases", "ext-mbstring" : "Handle non UTF-8 characters",
"ext-soap": "Native SOAP", "ext-soap" : "Native SOAP",
"ext-zip": "ODT and Excel support", "ext-zip" : "ODT, Excel and file compression support",
"ext-xml": "Excel support", "ext-xml" : "Excel support"
"firephp/firephp-core": "Logging to Firebug console support" }
}
} }

454
composer.lock generated
View File

@ -4,64 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "c586663818e933f26657871d86d01dc6", "content-hash": "16c94fd4f22ac17820d85ee57b0616e1",
"content-hash": "09e891bb978d35a48902a5f57760aee9",
"packages": [ "packages": [
{
"name": "ccampbell/chromephp",
"version": "4.1.0",
"source": {
"type": "git",
"url": "https://github.com/ccampbell/chromephp.git",
"reference": "c3c297615d48ae5b2a86a82311152d1ed095fcef"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ccampbell/chromephp/zipball/c3c297615d48ae5b2a86a82311152d1ed095fcef",
"reference": "c3c297615d48ae5b2a86a82311152d1ed095fcef",
"shasum": ""
},
"require": {
"php": ">=5.0.0"
},
"type": "library",
"autoload": {
"psr-0": {
"ChromePhp": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Craig Campbell",
"email": "iamcraigcampbell@gmail.com",
"homepage": "http://craig.is",
"role": "Developer"
}
],
"description": "Log variables to the Chrome console (via Chrome Logger Google Chrome extension).",
"homepage": "http://github.com/ccampbell/chromephp",
"keywords": [
"log",
"logging"
],
"time": "2013-06-26 03:44:33"
},
{ {
"name": "ckeditor/ckeditor", "name": "ckeditor/ckeditor",
"version": "4.5.11", "version": "4.12.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/ckeditor/ckeditor-releases.git", "url": "https://github.com/ckeditor/ckeditor-releases.git",
"reference": "48155a1e1c7e84736b5a166ad3f33acea2a51255" "reference": "b1a25e93ae0b038f45dcba458f4c2c18bd7318e5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ckeditor/ckeditor-releases/zipball/48155a1e1c7e84736b5a166ad3f33acea2a51255", "url": "https://api.github.com/repos/ckeditor/ckeditor-releases/zipball/b1a25e93ae0b038f45dcba458f4c2c18bd7318e5",
"reference": "48155a1e1c7e84736b5a166ad3f33acea2a51255", "reference": "b1a25e93ae0b038f45dcba458f4c2c18bd7318e5",
"shasum": "" "shasum": ""
}, },
"type": "library", "type": "library",
@ -89,7 +45,7 @@
"text", "text",
"wysiwyg" "wysiwyg"
], ],
"time": "2016-09-07 13:32:39" "time": "2019-06-28T10:41:23+00:00"
}, },
{ {
"name": "mike42/escpos-php", "name": "mike42/escpos-php",
@ -153,29 +109,27 @@
"print", "print",
"receipt" "receipt"
], ],
"time": "2016-04-25 01:14:07" "time": "2016-04-25T01:14:07+00:00"
}, },
{ {
"name": "mobiledetect/mobiledetectlib", "name": "mobiledetect/mobiledetectlib",
"version": "2.8.17", "version": "2.8.33",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/serbanghita/Mobile-Detect.git", "url": "https://github.com/serbanghita/Mobile-Detect.git",
"reference": "b87da5f63a76e9615a0c74fcf168657b1ea7e41d" "reference": "cd385290f9a0d609d2eddd165a1e44ec1bf12102"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/b87da5f63a76e9615a0c74fcf168657b1ea7e41d", "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/cd385290f9a0d609d2eddd165a1e44ec1bf12102",
"reference": "b87da5f63a76e9615a0c74fcf168657b1ea7e41d", "reference": "cd385290f9a0d609d2eddd165a1e44ec1bf12102",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.0.0" "php": ">=5.0.0"
}, },
"require-dev": { "require-dev": {
"codeclimate/php-test-reporter": "dev-master", "phpunit/phpunit": "~4.8.35||~5.7"
"johnkary/phpunit-speedtrap": "~1.0@dev",
"phpunit/phpunit": "*"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -207,7 +161,7 @@
"mobile detector", "mobile detector",
"php mobile detect" "php mobile detect"
], ],
"time": "2015-09-17 14:45:21" "time": "2018-09-01T15:05:15+00:00"
}, },
{ {
"name": "phpoffice/phpexcel", "name": "phpoffice/phpexcel",
@ -264,7 +218,8 @@
"xls", "xls",
"xlsx" "xlsx"
], ],
"time": "2015-05-01 07:00:55" "abandoned": "phpoffice/phpspreadsheet",
"time": "2015-05-01T07:00:55+00:00"
}, },
{ {
"name": "restler/framework", "name": "restler/framework",
@ -273,12 +228,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Luracast/Restler-Framework.git", "url": "https://github.com/Luracast/Restler-Framework.git",
"reference": "3388d76e73a81f871ce5baa906271071b12cd17f" "reference": "0f6b0f26152f83e43a2a86820206c455095fb2b0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/3388d76e73a81f871ce5baa906271071b12cd17f", "url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/0f6b0f26152f83e43a2a86820206c455095fb2b0",
"reference": "3388d76e73a81f871ce5baa906271071b12cd17f", "reference": "0f6b0f26152f83e43a2a86820206c455095fb2b0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -325,20 +280,20 @@
"rest", "rest",
"server" "server"
], ],
"time": "2016-06-21 12:42:18" "time": "2019-05-12T15:15:11+00:00"
}, },
{ {
"name": "tecnickcom/tcpdf", "name": "tecnickcom/tcpdf",
"version": "6.2.12", "version": "6.3.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/tecnickcom/TCPDF.git", "url": "https://github.com/tecnickcom/TCPDF.git",
"reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f" "reference": "9fde7bb9b404b945e7ea88fb7eccd23d9a4e324b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/2f732eaa91b5665274689b1d40b285a7bacdc37f", "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/9fde7bb9b404b945e7ea88fb7eccd23d9a4e324b",
"reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f", "reference": "9fde7bb9b404b945e7ea88fb7eccd23d9a4e324b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -347,7 +302,6 @@
"type": "library", "type": "library",
"autoload": { "autoload": {
"classmap": [ "classmap": [
"fonts",
"config", "config",
"include", "include",
"tcpdf.php", "tcpdf.php",
@ -368,13 +322,13 @@
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"LGPLv3" "LGPL-3.0"
], ],
"authors": [ "authors": [
{ {
"name": "Nicola Asuni", "name": "Nicola Asuni",
"email": "info@tecnick.com", "email": "info@tecnick.com",
"homepage": "http://nicolaasuni.tecnick.com" "role": "lead"
} }
], ],
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.", "description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
@ -388,7 +342,7 @@
"pdf417", "pdf417",
"qrcode" "qrcode"
], ],
"time": "2015-09-12 10:08:34" "time": "2019-09-20T09:35:01+00:00"
} }
], ],
"packages-dev": [ "packages-dev": [
@ -444,36 +398,36 @@
"constructor", "constructor",
"instantiate" "instantiate"
], ],
"time": "2015-06-14 21:17:01" "time": "2015-06-14T21:17:01+00:00"
}, },
{ {
"name": "jakub-onderka/php-console-color", "name": "jakub-onderka/php-console-color",
"version": "0.1", "version": "v0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/JakubOnderka/PHP-Console-Color.git", "url": "https://github.com/JakubOnderka/PHP-Console-Color.git",
"reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1" "reference": "d5deaecff52a0d61ccb613bb3804088da0307191"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1", "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191",
"reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1", "reference": "d5deaecff52a0d61ccb613bb3804088da0307191",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.2" "php": ">=5.4.0"
}, },
"require-dev": { "require-dev": {
"jakub-onderka/php-code-style": "1.0", "jakub-onderka/php-code-style": "1.0",
"jakub-onderka/php-parallel-lint": "0.*", "jakub-onderka/php-parallel-lint": "1.0",
"jakub-onderka/php-var-dump-check": "0.*", "jakub-onderka/php-var-dump-check": "0.*",
"phpunit/phpunit": "3.7.*", "phpunit/phpunit": "~4.3",
"squizlabs/php_codesniffer": "1.*" "squizlabs/php_codesniffer": "1.*"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"JakubOnderka\\PhpConsoleColor": "src/" "JakubOnderka\\PhpConsoleColor\\": "src/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -483,41 +437,41 @@
"authors": [ "authors": [
{ {
"name": "Jakub Onderka", "name": "Jakub Onderka",
"email": "jakub.onderka@gmail.com", "email": "jakub.onderka@gmail.com"
"homepage": "http://www.acci.cz"
} }
], ],
"time": "2014-04-08 15:00:19" "time": "2018-09-29T17:23:10+00:00"
}, },
{ {
"name": "jakub-onderka/php-console-highlighter", "name": "jakub-onderka/php-console-highlighter",
"version": "v0.3.2", "version": "v0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git",
"reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5" "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5", "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547",
"reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5", "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"jakub-onderka/php-console-color": "~0.1", "ext-tokenizer": "*",
"php": ">=5.3.0" "jakub-onderka/php-console-color": "~0.2",
"php": ">=5.4.0"
}, },
"require-dev": { "require-dev": {
"jakub-onderka/php-code-style": "~1.0", "jakub-onderka/php-code-style": "~1.0",
"jakub-onderka/php-parallel-lint": "~0.5", "jakub-onderka/php-parallel-lint": "~1.0",
"jakub-onderka/php-var-dump-check": "~0.1", "jakub-onderka/php-var-dump-check": "~0.1",
"phpunit/phpunit": "~4.0", "phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "~1.5" "squizlabs/php_codesniffer": "~1.5"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"JakubOnderka\\PhpConsoleHighlighter": "src/" "JakubOnderka\\PhpConsoleHighlighter\\": "src/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -531,7 +485,8 @@
"homepage": "http://www.acci.cz/" "homepage": "http://www.acci.cz/"
} }
], ],
"time": "2015-04-20 18:58:01" "description": "Highlight PHP code in terminal",
"time": "2018-09-29T18:48:56+00:00"
}, },
{ {
"name": "jakub-onderka/php-parallel-lint", "name": "jakub-onderka/php-parallel-lint",
@ -578,20 +533,20 @@
], ],
"description": "This tool check syntax of PHP files about 20x faster than serial check.", "description": "This tool check syntax of PHP files about 20x faster than serial check.",
"homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint", "homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint",
"time": "2015-12-15 10:42:16" "time": "2015-12-15T10:42:16+00:00"
}, },
{ {
"name": "phpdocumentor/reflection-common", "name": "phpdocumentor/reflection-common",
"version": "1.0", "version": "1.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -632,33 +587,39 @@
"reflection", "reflection",
"static analysis" "static analysis"
], ],
"time": "2015-12-27 11:43:31" "time": "2017-09-11T18:02:19+00:00"
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
"version": "3.1.1", "version": "4.3.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.5", "php": "^7.0",
"phpdocumentor/reflection-common": "^1.0@dev", "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0",
"phpdocumentor/type-resolver": "^0.2.0", "phpdocumentor/type-resolver": "~0.4 || ^1.0.0",
"webmozart/assert": "^1.0" "webmozart/assert": "^1.0"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "^0.9.4", "doctrine/instantiator": "^1.0.5",
"phpunit/phpunit": "^4.4" "mockery/mockery": "^1.0",
"phpunit/phpunit": "^6.4"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.x-dev"
}
},
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"phpDocumentor\\Reflection\\": [ "phpDocumentor\\Reflection\\": [
@ -677,29 +638,29 @@
} }
], ],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2016-09-30 07:12:33" "time": "2019-09-12T14:27:41+00:00"
}, },
{ {
"name": "phpdocumentor/type-resolver", "name": "phpdocumentor/type-resolver",
"version": "0.2", "version": "0.5.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git", "url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" "reference": "cf842904952e64e703800d094cdf34e715a8a3ae"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/cf842904952e64e703800d094cdf34e715a8a3ae",
"reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", "reference": "cf842904952e64e703800d094cdf34e715a8a3ae",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.5", "php": "^7.0",
"phpdocumentor/reflection-common": "^1.0" "phpdocumentor/reflection-common": "^1.0"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "^0.9.4", "mockery/mockery": "^1.0",
"phpunit/phpunit": "^5.2||^4.8.24" "phpunit/phpunit": "^6.4"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -709,9 +670,7 @@
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"phpDocumentor\\Reflection\\": [ "phpDocumentor\\Reflection\\": "src"
"src/"
]
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -724,41 +683,42 @@
"email": "me@mikevanriel.com" "email": "me@mikevanriel.com"
} }
], ],
"time": "2016-06-10 07:14:17" "time": "2017-12-30T13:23:38+00:00"
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
"version": "v1.6.1", "version": "1.9.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpspec/prophecy.git", "url": "https://github.com/phpspec/prophecy.git",
"reference": "58a8137754bc24b25740d4281399a4a3596058e0" "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203",
"reference": "58a8137754bc24b25740d4281399a4a3596058e0", "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"doctrine/instantiator": "^1.0.2", "doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0", "php": "^5.3|^7.0",
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
"sebastian/comparator": "^1.1", "sebastian/comparator": "^1.1|^2.0|^3.0",
"sebastian/recursion-context": "^1.0" "sebastian/recursion-context": "^1.0|^2.0|^3.0"
}, },
"require-dev": { "require-dev": {
"phpspec/phpspec": "^2.0" "phpspec/phpspec": "^2.5|^3.2",
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.6.x-dev" "dev-master": "1.8.x-dev"
} }
}, },
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"Prophecy\\": "src/" "Prophecy\\": "src/Prophecy"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -786,7 +746,7 @@
"spy", "spy",
"stub" "stub"
], ],
"time": "2016-06-07 08:13:47" "time": "2019-10-03T11:07:50+00:00"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
@ -848,20 +808,20 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2015-10-06 15:47:00" "time": "2015-10-06T15:47:00+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
"version": "1.4.1", "version": "1.4.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
"reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -895,7 +855,7 @@
"filesystem", "filesystem",
"iterator" "iterator"
], ],
"time": "2015-06-21 13:08:43" "time": "2017-11-27T13:52:08+00:00"
}, },
{ {
"name": "phpunit/php-text-template", "name": "phpunit/php-text-template",
@ -936,29 +896,34 @@
"keywords": [ "keywords": [
"template" "template"
], ],
"time": "2015-06-21 13:50:34" "time": "2015-06-21T13:50:34+00:00"
}, },
{ {
"name": "phpunit/php-timer", "name": "phpunit/php-timer",
"version": "1.0.8", "version": "1.0.9",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git", "url": "https://github.com/sebastianbergmann/php-timer.git",
"reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
"reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": "^5.3.3 || ^7.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "~4|~5" "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": { "autoload": {
"classmap": [ "classmap": [
"src/" "src/"
@ -980,20 +945,20 @@
"keywords": [ "keywords": [
"timer" "timer"
], ],
"time": "2016-05-12 18:03:57" "time": "2017-02-26T11:10:40+00:00"
}, },
{ {
"name": "phpunit/php-token-stream", "name": "phpunit/php-token-stream",
"version": "1.4.8", "version": "1.4.12",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git", "url": "https://github.com/sebastianbergmann/php-token-stream.git",
"reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16",
"reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1029,20 +994,20 @@
"keywords": [ "keywords": [
"tokenizer" "tokenizer"
], ],
"time": "2015-09-15 10:49:45" "time": "2017-12-04T08:55:13+00:00"
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "4.8.27", "version": "4.8.36",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90" "reference": "46023de9a91eec7dfb06cc56cb4e260017298517"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c062dddcb68e44b563f66ee319ddae2b5a322a90", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517",
"reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90", "reference": "46023de9a91eec7dfb06cc56cb4e260017298517",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1058,7 +1023,7 @@
"phpunit/php-text-template": "~1.2", "phpunit/php-text-template": "~1.2",
"phpunit/php-timer": "^1.0.6", "phpunit/php-timer": "^1.0.6",
"phpunit/phpunit-mock-objects": "~2.3", "phpunit/phpunit-mock-objects": "~2.3",
"sebastian/comparator": "~1.1", "sebastian/comparator": "~1.2.2",
"sebastian/diff": "~1.2", "sebastian/diff": "~1.2",
"sebastian/environment": "~1.3", "sebastian/environment": "~1.3",
"sebastian/exporter": "~1.2", "sebastian/exporter": "~1.2",
@ -1101,7 +1066,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2016-07-21 06:48:14" "time": "2017-06-21T08:07:12+00:00"
}, },
{ {
"name": "phpunit/phpunit-mock-objects", "name": "phpunit/phpunit-mock-objects",
@ -1157,20 +1122,21 @@
"mock", "mock",
"xunit" "xunit"
], ],
"time": "2015-10-02 06:51:40" "abandoned": true,
"time": "2015-10-02T06:51:40+00:00"
}, },
{ {
"name": "phpunit/phpunit-selenium", "name": "phpunit/phpunit-selenium",
"version": "2.0.2", "version": "2.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/giorgiosironi/phpunit-selenium.git", "url": "https://github.com/giorgiosironi/phpunit-selenium.git",
"reference": "2bad798ec0daf20d2854400e3bc5329ee0a7b2d1" "reference": "013037eeea481657d236431634042648797e1da8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/giorgiosironi/phpunit-selenium/zipball/2bad798ec0daf20d2854400e3bc5329ee0a7b2d1", "url": "https://api.github.com/repos/giorgiosironi/phpunit-selenium/zipball/013037eeea481657d236431634042648797e1da8",
"reference": "2bad798ec0daf20d2854400e3bc5329ee0a7b2d1", "reference": "013037eeea481657d236431634042648797e1da8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1221,26 +1187,26 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2016-03-01 10:33:56" "time": "2017-01-23T22:15:32+00:00"
}, },
{ {
"name": "sebastian/comparator", "name": "sebastian/comparator",
"version": "1.2.0", "version": "1.2.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git", "url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "937efb279bd37a375bcadf584dec0726f84dbf22" "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
"reference": "937efb279bd37a375bcadf584dec0726f84dbf22", "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3", "php": ">=5.3.3",
"sebastian/diff": "~1.2", "sebastian/diff": "~1.2",
"sebastian/exporter": "~1.2" "sebastian/exporter": "~1.2 || ~2.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "~4.4" "phpunit/phpunit": "~4.4"
@ -1285,27 +1251,27 @@
"compare", "compare",
"equality" "equality"
], ],
"time": "2015-07-26 15:48:44" "time": "2017-01-29T09:50:25+00:00"
}, },
{ {
"name": "sebastian/diff", "name": "sebastian/diff",
"version": "1.4.1", "version": "1.4.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/diff.git", "url": "https://github.com/sebastianbergmann/diff.git",
"reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4",
"reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": "^5.3.3 || ^7.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "~4.8" "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -1337,7 +1303,7 @@
"keywords": [ "keywords": [
"diff" "diff"
], ],
"time": "2015-12-08 07:14:41" "time": "2017-05-22T07:24:03+00:00"
}, },
{ {
"name": "sebastian/environment", "name": "sebastian/environment",
@ -1387,7 +1353,7 @@
"environment", "environment",
"hhvm" "hhvm"
], ],
"time": "2016-08-18 05:49:44" "time": "2016-08-18T05:49:44+00:00"
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
@ -1454,7 +1420,7 @@
"export", "export",
"exporter" "exporter"
], ],
"time": "2016-06-17 09:04:28" "time": "2016-06-17T09:04:28+00:00"
}, },
{ {
"name": "sebastian/global-state", "name": "sebastian/global-state",
@ -1505,20 +1471,20 @@
"keywords": [ "keywords": [
"global state" "global state"
], ],
"time": "2015-10-12 03:26:01" "time": "2015-10-12T03:26:01+00:00"
}, },
{ {
"name": "sebastian/recursion-context", "name": "sebastian/recursion-context",
"version": "1.0.2", "version": "1.0.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git", "url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "913401df809e99e4f47b27cdd781f4a258d58791" "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7",
"reference": "913401df809e99e4f47b27cdd781f4a258d58791", "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1558,7 +1524,7 @@
], ],
"description": "Provides functionality to recursively process PHP variables", "description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context", "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"time": "2015-11-11 19:50:13" "time": "2016-10-03T07:41:43+00:00"
}, },
{ {
"name": "sebastian/version", "name": "sebastian/version",
@ -1593,20 +1559,20 @@
], ],
"description": "Library that helps with managing the version number of Git-hosted PHP projects", "description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version", "homepage": "https://github.com/sebastianbergmann/version",
"time": "2015-06-21 13:59:46" "time": "2015-06-21T13:59:46+00:00"
}, },
{ {
"name": "squizlabs/php_codesniffer", "name": "squizlabs/php_codesniffer",
"version": "2.7.0", "version": "2.9.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed" "reference": "2acf168de78487db620ab4bc524135a13cfe6745"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/571e27b6348e5b3a637b2abc82ac0d01e6d7bbed", "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745",
"reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed", "reference": "2acf168de78487db620ab4bc524135a13cfe6745",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1671,29 +1637,97 @@
"phpcs", "phpcs",
"standards" "standards"
], ],
"time": "2016-09-01 23:53:02" "time": "2018-11-07T22:31:41+00:00"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/polyfill-ctype",
"version": "v3.1.6", "version": "v1.12.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/yaml.git", "url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "7ff51b06c6c3d5cc6686df69004a42c69df09e27" "reference": "550ebaac289296ce228a706d0867afc34687e3f4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/7ff51b06c6c3d5cc6686df69004a42c69df09e27", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
"reference": "7ff51b06c6c3d5cc6686df69004a42c69df09e27", "reference": "550ebaac289296ce228a706d0867afc34687e3f4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.5.9" "php": ">=5.3.3"
},
"suggest": {
"ext-ctype": "For best performance"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.1-dev" "dev-master": "1.12-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [
"bootstrap.php"
]
},
"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"
],
"time": "2019-08-06T08:03:45+00:00"
},
{
"name": "symfony/yaml",
"version": "v3.4.32",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "768f817446da74a776a31eea335540f9dcb53942"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/768f817446da74a776a31eea335540f9dcb53942",
"reference": "768f817446da74a776a31eea335540f9dcb53942",
"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"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
} }
}, },
"autoload": { "autoload": {
@ -1720,33 +1754,33 @@
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2016-10-24 18:41:13" "time": "2019-09-10T10:38:46+00:00"
}, },
{ {
"name": "webmozart/assert", "name": "webmozart/assert",
"version": "1.1.0", "version": "1.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/webmozart/assert.git", "url": "https://github.com/webmozart/assert.git",
"reference": "bb2d123231c095735130cc8f6d31385a44c7b308" "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308", "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
"reference": "bb2d123231c095735130cc8f6d31385a44c7b308", "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^5.3.3|^7.0" "php": "^5.3.3 || ^7.0",
"symfony/polyfill-ctype": "^1.8"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^4.6", "phpunit/phpunit": "^4.8.36 || ^7.5.13"
"sebastian/version": "^1.0.1"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.2-dev" "dev-master": "1.3-dev"
} }
}, },
"autoload": { "autoload": {
@ -1770,7 +1804,7 @@
"check", "check",
"validate" "validate"
], ],
"time": "2016-08-09 15:02:57" "time": "2019-08-24T08:43:50+00:00"
} }
], ],
"aliases": [], "aliases": [],

View File

@ -8,6 +8,15 @@ ALL:
Check "@CHANGE" Check "@CHANGE"
PrestaShopWebservice:
---------------------
Replace
$params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop');
With
$params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop', 'date');
CKEDITOR (4.6.2): CKEDITOR (4.6.2):
----------------- -----------------
* In ckeditor/ckeditor/contents.css * In ckeditor/ckeditor/contents.css
@ -18,6 +27,15 @@ With
ESCPOS:
-------
Replace
private $connector;
With
protected $connector;
NUSOAP: NUSOAP:
------- -------
* In file nusoap.php, to avoid a warning, * In file nusoap.php, to avoid a warning,
@ -34,6 +52,36 @@ Replace call to serialize_val with no bugged value
TCPDF: TCPDF:
------ ------
* Replace in tcpdf.php:
if (isset($this->imagekeys)) {
foreach($this->imagekeys as $file) {
unlink($file);
}
}
with
if (isset($this->imagekeys)) {
foreach($this->imagekeys as $file) {
// unlink($file);
}
}
* In tecnickcom/tcpdf/include/tcpdf_static, in function fopenLocal, replace
if (strpos($filename, '://') === false) {
with
if (strpos($filename, '//') === 0)
{
// Share folder on a (windows) server
// e.g.: "//[MyServerName]/[MySharedFolder]/"
//
// nothing to change
}
elseif (strpos($filename, '://') === false)
* To avoid to have QRcode changed because generated with a random mask, replace * To avoid to have QRcode changed because generated with a random mask, replace
define('QR_FIND_FROM_RANDOM', 2); define('QR_FIND_FROM_RANDOM', 2);
with with
@ -41,30 +89,6 @@ define('QR_FIND_FROM_RANDOM', false);
* Removed useless directories ("examples", "tools") * Removed useless directories ("examples", "tools")
* Fix
// initialize subsetchars
$subsetchars = array();
into
// initialize subsetchars
$subsetchars = array_fill(0, 256, true);
* Replace the continue into switch with a break:
case 're': {
// justify block
if (!TCPDF_STATIC::empty_string($this->lispacer)) {
$this->lispacer = '';
continue;
}
into
case 're': {
// justify block
if (!TCPDF_STATIC::empty_string($this->lispacer)) {
$this->lispacer = '';
break;
}
* Optionnaly, removed all fonts except * Optionnaly, removed all fonts except
dejavusans* (used by greek, arab, persan, romanian, turkish), dejavusans* (used by greek, arab, persan, romanian, turkish),
freemono* (russian), freemono* (russian),
@ -72,8 +96,8 @@ case 're': {
helvetica* (all other languages), helvetica* (all other languages),
zapfdingbats.php (for special chars like form checkboxes) zapfdingbats.php (for special chars like form checkboxes)
* Optionnaly, made freemono the default monotype font because we removed courier * Optionnaly, made freemono the default monotype font if we removed courier
In htdocs/includes/tcpdf/tcpdf.php In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
- protected $default_monospaced_font = 'courier'; - protected $default_monospaced_font = 'courier';
+ protected $default_monospaced_font = 'freemono'; + protected $default_monospaced_font = 'freemono';
@ -133,23 +157,17 @@ JQUERYFILETREE:
* Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors * Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors
PHPEXCEL:
---------
* Replace in htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE.php
continue;
with:
continue 2;
RESTLER: RESTLER:
-------- --------
Change content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
* Add 2 lines into file AutoLoader.php to complete function
private function alias($className, $currentClass)
{
...
to get
private function alias($className, $currentClass)
{
if ($className == 'Luracast\Restler\string') return;
if ($className == 'Luracast\Restler\mixed') return;
...
Change also file Luracast/Restler/explorer/index.html
+With swagger 2: +With swagger 2:

View File

@ -13,7 +13,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** /**
@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0); @set_time_limit(0);
// Load user and its permissions // Load user and its permissions
$result=$user->fetch('','admin'); // Load user for login 'admin'. Comment line to run as anonymous user. $result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) { dol_print_error('',$user->error); exit; } if (! $result > 0) { dol_print_error('', $user->error); exit; }
$user->getrights(); $user->getrights();
@ -89,13 +89,13 @@ if ($idobject > 0)
else else
{ {
$error++; $error++;
dol_print_error($db,$obj->error); dol_print_error($db, $obj->error);
} }
} }
else else
{ {
$error++; $error++;
dol_print_error($db,$obj->error); dol_print_error($db, $obj->error);
} }

View File

@ -13,7 +13,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** /**
@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0); @set_time_limit(0);
// Load user and its permissions // Load user and its permissions
$result=$user->fetch('','admin'); // Load user for login 'admin'. Comment line to run as anonymous user. $result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) { dol_print_error('',$user->error); exit; } if (! $result > 0) { dol_print_error('', $user->error); exit; }
$user->getrights(); $user->getrights();
@ -87,13 +87,13 @@ if ($idobject > 0)
else else
{ {
$error++; $error++;
dol_print_error($db,$com->error); dol_print_error($db, $com->error);
} }
} }
else else
{ {
$error++; $error++;
dol_print_error($db,$com->error); dol_print_error($db, $com->error);
} }

View File

@ -13,7 +13,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** /**
@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0); @set_time_limit(0);
// Load user and its permissions // Load user and its permissions
$result=$user->fetch('','admin'); // Load user for login 'admin'. Comment line to run as anonymous user. $result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) { dol_print_error('',$user->error); exit; } if (! $result > 0) { dol_print_error('', $user->error); exit; }
$user->getrights(); $user->getrights();
@ -86,7 +86,7 @@ if ($idobject > 0)
else else
{ {
$error++; $error++;
dol_print_error($db,$myproduct->error); dol_print_error($db, $myproduct->error);
} }
// -------------------- END OF YOUR CODE -------------------- // -------------------- END OF YOUR CODE --------------------

View File

@ -13,7 +13,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** /**
@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0); @set_time_limit(0);
// Load user and its permissions // Load user and its permissions
$result=$user->fetch('','admin'); // Load user for login 'admin'. Comment line to run as anonymous user. $result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) { dol_print_error('',$user->error); exit; } if (! $result > 0) { dol_print_error('', $user->error); exit; }
$user->getrights(); $user->getrights();
@ -77,17 +77,17 @@ if ($idobject > 0)
else else
{ {
$error++; $error++;
dol_print_error($db,$obj->error); dol_print_error($db, $obj->error);
} }
} }
else if ($obj->error == 'ErrorLoginAlreadyExists') elseif ($obj->error == 'ErrorLoginAlreadyExists')
{ {
print "User with login ".$obj->login." already exists\n"; print "User with login ".$obj->login." already exists\n";
} }
else else
{ {
$error++; $error++;
dol_print_error($db,$obj->error); dol_print_error($db, $obj->error);
} }

View File

@ -13,7 +13,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** /**
@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0); @set_time_limit(0);
// Load user and its permissions // Load user and its permissions
$result=$user->fetch('','admin'); // Load user for login 'admin'. Comment line to run as anonymous user. $result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) { dol_print_error('',$user->error); exit; } if (! $result > 0) { dol_print_error('', $user->error); exit; }
$user->getrights(); $user->getrights();

View File

@ -1,7 +1,7 @@
Example fo recurring event, 1 week, no end, exported by Google Example fo recurring event, 1 week, no end, exported by Google
# The recurring event were recorded every monday the 20150518. This is the Recurrence-id, but then # The recurring event were recorded every monday the 20150518. This is the Recurrence-id, but then
# first occurence was moved on tuesday. So this record were added. # first occurrence was moved on tuesday. So this record were added.
BEGIN:VEVENT BEGIN:VEVENT
DTSTART;TZID=Europe/Paris:20150519T100000 DTSTART;TZID=Europe/Paris:20150519T100000
DTEND;TZID=Europe/Paris:20150519T110000 DTEND;TZID=Europe/Paris:20150519T110000

View File

@ -1,5 +1,5 @@
README (English) README (English)
-------------------------------- --------------------------------
This directory contains example of well formated mail messages. This directory contains example of well formatted mail messages.
This is to help to build the CMailFile.class.php code. This is to help to build the CMailFile.class.php code.

7
dev/examples/zapier/.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
build
docs
node_modules
*.log
.environment
.env
.zapierapprc

View File

@ -0,0 +1,7 @@
language: node_js
node_js:
- 8.10.0
before_script: 'npm install -g zapier-platform-cli'
script: 'zapier test'
notifications:
email: false

View File

@ -0,0 +1,56 @@
{
"table_rowid": "id",
"id": 6764,
"ref": null,
"type_id": "5",
"type_code": "AC_RDV",
"type": null,
"type_color": null,
"code": null,
"label": "azerty",
"datec": null,
"datem": null,
"authorid": null,
"usermodid": null,
"datep": 1555365600,
"datef": 1555538399,
"durationp": 172799,
"fulldayevent": 1,
"punctual": 1,
"percentage": "-1",
"location": "",
"transparency": 1,
"priority": 0,
"userassigned": {
"1": {
"id": "1",
"transparency": 1
}
},
"userownerid": "1",
"userdoneid": null,
"usertodo": null,
"userdone": null,
"socid": null,
"contactid": null,
"elementtype": "",
"icalname": null,
"icalcolor": null,
"actions": [],
"email_msgid": null,
"email_from": null,
"email_sender": null,
"email_to": null,
"email_tocc": null,
"email_tobcc": null,
"email_subject": null,
"errors_to": null,
"import_key": null,
"linkedObjectsIds": null,
"fk_project": 0,
"modelpdf": null,
"note_public": null,
"note_private": null,
"note": "wxcvbn",
"duree": 0
}

View File

@ -0,0 +1,77 @@
/*jshint esversion: 6 */
const testAuth = (z , bundle) => {
const url = bundle.authData.url+'/api/index.php/login';
// Normally you want to make a request to an endpoint that is either specifically designed to test auth, or one that
// every user will have access to, such as an account or profile endpoint like /me.
// In this example, we'll hit httpbin, which validates the Authorization Header against the arguments passed in the URL path
const promise = z.request({
url: url,
});
// This method can return any truthy value to indicate the credentials are valid.
// Raise an error to show
return promise.then((response) => {
if (response.status === 401) {
throw new Error('The Session Key you supplied is invalid');
}
return response;
});
};
const getSessionKey = (z, bundle) => {
const url = bundle.authData.url + '/api/index.php/login';
const promise = z.request({
method: 'POST',
url: url,
body: {
login: bundle.authData.login,
password: bundle.authData.password,
}
});
return promise.then((response) => {
if (response.status === 401) {
throw new Error('The login/password you supplied is invalid');
}
const json = JSON.parse(response.content);
return {
sessionKey: json.success.token || 'secret'
};
});
};
module.exports = {
type: 'session',
// Define any auth fields your app requires here. The user will be prompted to enter this info when
// they connect their account.
fields: [
{
key: 'url',
label: 'Url of service',
required: true,
type: 'string'
},
{
key: 'login',
label: 'Login',
required: true,
type: 'string'
},
{
key: 'password',
label: 'Password',
required: true,
type: 'password'
}
],
// The test method allows Zapier to verify that the credentials a user provides are valid. We'll execute this
// method whenever a user connects their account for the first time.
test: testAuth,
// The method that will exchange the fields provided by the user for session credentials.
sessionConfig: {
perform: getSessionKey
},
// assuming "login" is a key returned from the test
connectionLabel: '{{login}}'
};

View File

@ -0,0 +1,90 @@
/*jshint esversion: 6 */
// create a particular thirdparty by name
const createThirdparty = async (z, bundle) => {
const apiurl = bundle.authData.url + '/api/index.php/thirdparties';
const response = await z.request({
method: 'POST',
url: apiurl,
body: JSON.stringify({
name: bundle.inputData.name,
name_alias: bundle.inputData.name_alias,
ref_ext: bundle.inputData.ref_ext,
ref_int: bundle.inputData.ref_int,
address: bundle.inputData.address,
zip: bundle.inputData.zip,
town: bundle.inputData.town,
country_code: bundle.inputData.country_code,
country_id: bundle.inputData.country_id,
country: bundle.inputData.country,
phone: bundle.inputData.phone,
email: bundle.inputData.email,
client: bundle.inputData.client,
fournisseur: bundle.inputData.fournisseur,
code_client: bundle.inputData.code_client,
code_fournisseur: bundle.inputData.code_fournisseur,
sens: 'fromzapier'
})
});
const result = z.JSON.parse(response.content);
// api returns an integer when ok, a json when ko
return result.response || {id: response};
};
module.exports = {
key: 'thirdparty',
noun: 'Thirdparty',
display: {
label: 'Create Thirdparty',
description: 'Creates a thirdparty.'
},
operation: {
inputFields: [
{key: 'name', required: true},
{key: 'name_alias', required: false},
{key: 'address', required: false},
{key: 'zip', required: false},
{key: 'town', required: false},
{key: 'email', required: false},
{key: 'client', type: 'integer', required: false},
{key: 'fournisseur', type: 'integer', required: false},
{key: 'code_client', required: false},
{key: 'code_fournisseur', required: false}
],
perform: createThirdparty,
sample: {
id: 1,
name: 'DUPOND',
name_alias: 'DUPOND Ltd',
address: 'Rue des Canaries',
zip: '34090',
town: 'MONTPELLIER',
phone: '0123456789',
fax: '2345678901',
email: 'robot@domain.com',
client: 1,
fournisseur: 0,
code_client: 'CU1903-1234',
code_fournisseur: 'SU1903-2345'
},
outputFields: [
{key: 'id', label: 'ID'},
{key: 'name', label: 'Name'},
{key: 'name_alias', label: 'Name alias'},
{key: 'address', label: 'Address'},
{key: 'zip', label: 'Zip'},
{key: 'town', label: 'Town'},
{key: 'phone', label: 'Phone'},
{key: 'fax', label: 'Fax'},
{key: 'email', label: 'Email'},
{key: 'client', label: 'Customer/Prospect 0/1/2/3'},
{key: 'fournisseur', label: 'Supplier 0/1'},
{key: 'code_client', label: 'Customer code'},
{key: 'code_fournisseur', label: 'Supplier code'}
]
}
};

View File

@ -0,0 +1,73 @@
/*jshint esversion: 6 */
const triggerThirdparty = require('./triggers/thirdparty');
const triggerOrder = require('./triggers/order');
const triggerAction = require('./triggers/action');
const searchThirdparty = require('./searches/thirdparty');
const createThirdparty = require('./creates/thirdparty');
const authentication = require('./authentication');
// To include the session key header on all outbound requests, simply define a function here.
// It runs runs before each request is sent out, allowing you to make tweaks to the request in a centralized spot
const includeSessionKeyHeader = (request, z, bundle) => {
if (bundle.authData.sessionKey) {
request.headers = request.headers || {};
request.headers['DOLAPIKEY'] = bundle.authData.sessionKey;
}
return request;
};
// If we get a response and it is a 401, we can raise a special error telling Zapier to retry this after another exchange.
const sessionRefreshIf401 = (response, z, bundle) => {
if (bundle.authData.sessionKey) {
if (response.status === 401) {
throw new z.errors.RefreshAuthError('Session apikey needs refreshing.');
}
}
return response;
};
// We can roll up all our behaviors in an App.
const App = {
// This is just shorthand to reference the installed dependencies you have. Zapier will
// need to know these before we can upload
version: require('./package.json').version,
platformVersion: require('zapier-platform-core').version,
authentication: authentication,
// beforeRequest & afterResponse are optional hooks into the provided HTTP client
beforeRequest: [
includeSessionKeyHeader
],
afterResponse: [
sessionRefreshIf401
],
// If you want to define optional resources to simplify creation of triggers, searches, creates - do that here!
resources: {
},
// If you want your trigger to show up, you better include it here!
triggers: {
[triggerThirdparty.key]: triggerThirdparty,
[triggerOrder.key]: triggerOrder,
[triggerAction.key]: triggerAction
},
// If you want your searches to show up, you better include it here!
searches: {
[searchThirdparty.key]: searchThirdparty,
},
// If you want your creates to show up, you better include it here!
creates: {
[createThirdparty.key]: createThirdparty,
}
};
// Finally, export the app.
module.exports = App;

405
dev/examples/zapier/package-lock.json generated Normal file
View File

@ -0,0 +1,405 @@
{
"name": "Dolibarr",
"version": "1.0.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@types/node": {
"version": "8.10.20",
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz",
"integrity": "sha512-M7x8+5D1k/CuA6jhiwuSCmE8sbUWJF0wYsjcig9WrXvwUI5ArEoUBdOXpV4JcEMrLp02/QbDjw+kI+vQeKyQgg==",
"optional": true
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"bluebird": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz",
"integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"browser-stdout": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
"integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
"dev": true
},
"combined-stream": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"commander": {
"version": "2.15.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
"dev": true
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
"content-disposition": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
"integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"diff": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
"dev": true
},
"dotenv": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz",
"integrity": "sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow=="
},
"encoding": {
"version": "0.1.12",
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
"integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
"requires": {
"iconv-lite": "~0.4.13"
}
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
},
"form-data": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
"integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "1.0.6",
"mime-types": "^2.1.12"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
"glob": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"growl": {
"version": "1.10.5",
"resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
"integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
"dev": true
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"he": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
"dev": true
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
},
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
"json-tryparse": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/json-tryparse/-/json-tryparse-1.0.5.tgz",
"integrity": "sha1-Khy6CLTjEjNo+p+2o01GQwBFeyc="
},
"jsonschema": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz",
"integrity": "sha1-PO3o4+QR03eHLu+8n98mODy8Ptk="
},
"lodash": {
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
},
"mime-db": {
"version": "1.38.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
"integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg=="
},
"mime-types": {
"version": "2.1.22",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
"integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
"requires": {
"mime-db": "~1.38.0"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"requires": {
"minimist": "0.0.8"
}
},
"mocha": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz",
"integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==",
"dev": true,
"requires": {
"browser-stdout": "1.3.1",
"commander": "2.15.1",
"debug": "3.1.0",
"diff": "3.5.0",
"escape-string-regexp": "1.0.5",
"glob": "7.1.2",
"growl": "1.10.5",
"he": "1.1.1",
"minimatch": "3.0.4",
"mkdirp": "0.5.1",
"supports-color": "5.4.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
},
"node-fetch": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.1.tgz",
"integrity": "sha512-j8XsFGCLw79vWXkZtMSmmLaOk9z5SQ9bV/tkbZVCqvgwzrjAGq66igobLofHtF63NvMTp2WjytpsNTGKa+XRIQ==",
"requires": {
"encoding": "^0.1.11",
"is-stream": "^1.0.1"
}
},
"oauth-sign": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"requires": {
"wrappy": "1"
}
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"semver": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
},
"should": {
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz",
"integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==",
"dev": true,
"requires": {
"should-equal": "^2.0.0",
"should-format": "^3.0.3",
"should-type": "^1.4.0",
"should-type-adaptors": "^1.0.1",
"should-util": "^1.0.0"
}
},
"should-equal": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz",
"integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==",
"dev": true,
"requires": {
"should-type": "^1.4.0"
}
},
"should-format": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz",
"integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=",
"dev": true,
"requires": {
"should-type": "^1.3.0",
"should-type-adaptors": "^1.0.1"
}
},
"should-type": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz",
"integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=",
"dev": true
},
"should-type-adaptors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz",
"integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==",
"dev": true,
"requires": {
"should-type": "^1.3.0",
"should-util": "^1.0.0"
}
},
"should-util": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.0.tgz",
"integrity": "sha1-yYzaN0qmsZDfi6h8mInCtNtiAGM=",
"dev": true
},
"supports-color": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
"integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
},
"zapier-platform-core": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/zapier-platform-core/-/zapier-platform-core-8.0.1.tgz",
"integrity": "sha512-vuAe7JkFQ88AeQ//NwwNEh8ZjiZr30GRWtwYo7Wo/nx1cqZwq+CRc9zJU2WRrhJfJOtOOTUF6w+pArBTtMOC5A==",
"requires": {
"@types/node": "8.10.20",
"bluebird": "3.5.0",
"content-disposition": "0.5.2",
"dotenv": "5.0.1",
"form-data": "2.3.2",
"lodash": "4.17.11",
"node-fetch": "1.7.1",
"oauth-sign": "0.9.0",
"semver": "5.6.0",
"zapier-platform-schema": "8.0.1"
}
},
"zapier-platform-schema": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/zapier-platform-schema/-/zapier-platform-schema-8.0.1.tgz",
"integrity": "sha512-97KJ0xVLtpU4BiXVaMTPQpiA0T6CQIEzWfzAWwJAWbu5336+6DMFUzDWN4bANBeD3CIsRHHPcZkP8n/17U05ag==",
"requires": {
"jsonschema": "1.1.1",
"lodash": "4.17.10"
},
"dependencies": {
"lodash": {
"version": "4.17.10",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
}
}
}
}
}

View File

@ -0,0 +1,24 @@
{
"name": "Dolibarr",
"version": "1.0.0",
"description": "An app for connecting Dolibarr to the Zapier platform.",
"repository": "Dolibarr/dolibarr",
"homepage": "https://www.dolibarr.fr/",
"author": "Frédéric France <frederic.france@netlogic.fr>",
"license": "BSD-3-Clause",
"main": "index.js",
"scripts": {
"test": "mocha --recursive"
},
"engines": {
"node": "8.10.0",
"npm": ">=5.6.0"
},
"dependencies": {
"zapier-platform-core": "8.0.1"
},
"devDependencies": {
"mocha": "^5.2.0",
"should": "^13.2.0"
}
}

View File

@ -0,0 +1,66 @@
module.exports = {
key: 'thirdparty',
// You'll want to provide some helpful display labels and descriptions
// for users. Zapier will put them into the UX.
noun: 'Thirdparty',
display: {
label: 'Find a Thirdparty',
description: 'Search for thirdparty.'
},
// `operation` is where we make the call to your API to do the search
operation: {
// This search only has one search field. Your searches might have just one, or many
// search fields.
inputFields: [
{
key: 'name',
type: 'string',
label: 'Name',
helpText: 'Name to limit to the search to (i.e. The company or %company%).'
}
],
perform: (z, bundle) => {
const url = bundle.authData.url + '/api/index.php/thirdparties/';
// Put the search value in a query param. The details of how to build
// a search URL will depend on how your API works.
const options = {
params: {
sqlfilters: "t.nom like \'%"+bundle.inputData.name+"%\'"
}
};
return z.request(url, options).then(response => JSON.parse(response.content));
},
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
// returned records, and have obviously dummy values that we can show to any user.
sample: {
id: 1,
createdAt: 1472069465,
name: 'DOE',
firstname: 'John',
authorId: 1,
directions: '1. Boil Noodles\n2.Serve with sauce',
style: 'italian'
},
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
// field definitions. The result will be used to augment the sample.
// outputFields: () => { return []; }
// Alternatively, a static field definition should be provided, to specify labels for the fields
outputFields: [
{key: 'id', label: 'ID'},
{key: 'createdAt', label: 'Created At'},
{key: 'name', label: 'Name'},
{key: 'firstname', label: 'Firstname'},
{key: 'directions', label: 'Directions'},
{key: 'authorId', label: 'Author ID'},
{key: 'style', label: 'Style'}
]
}
};

View File

@ -0,0 +1,17 @@
require('should');
const zapier = require('zapier-platform-core');
// Use this to make test calls into your app:
const App = require('../index');
const appTester = zapier.createAppTester(App);
describe('My App', () => {
it('should test something', (done) => {
const x = 1;
x.should.eql(1);
done();
});
});

View File

@ -0,0 +1,156 @@
const subscribeHook = (z, bundle) => {
// `z.console.log()` is similar to `console.log()`.
z.console.log('suscribing hook!');
// bundle.targetUrl has the Hook URL this app should call when an action is created.
const data = {
url: bundle.targetUrl,
event: bundle.event,
module: 'action',
action: bundle.inputData.action
};
const url = bundle.authData.url + '/api/index.php/zapierapi/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.
const options = {
url: url,
method: 'POST',
body: JSON.stringify(data)
};
// You may return a promise or a normal data structure from any perform method.
return z.request(options).then((response) => JSON.parse(response.content));
};
const unsubscribeHook = (z, bundle) => {
// bundle.subscribeData contains the parsed response JSON from the subscribe
// request made initially.
z.console.log('unsuscribing 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.
const options = {
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
method: 'DELETE',
};
// You may return a promise or a normal data structure from any perform method.
return z.request(options).then((response) => JSON.parse(response.content));
};
const getAction = (z, bundle) => {
// bundle.cleanedRequest will include the parsed JSON object (if it's not a
// test poll) and also a .querystring property with the URL's query string.
const action = {
id: bundle.cleanedRequest.id,
ref: bundle.cleanedRequest.ref,
ref_client: bundle.cleanedRequest.ref_client,
name: bundle.cleanedRequest.name,
firstname: bundle.cleanedRequest.firstname,
usertodo__name: bundle.cleanedRequest.usertodo__name,
location: bundle.cleanedRequest.location,
label: bundle.cleanedRequest.label,
authorId: bundle.cleanedRequest.authorId,
createdAt: bundle.cleanedRequest.createdAt,
module: bundle.cleanedRequest.module,
datep: bundle.cleanedRequest.datep,
datef: bundle.cleanedRequest.datef,
fulldayevent: bundle.cleanedRequest.fulldayevent,
transparency: bundle.cleanedRequest.transparency,
icalname: bundle.cleanedRequest.icalname,
icalcolor: bundle.cleanedRequest.icalcolor,
note: bundle.cleanedRequest.note,
note_public: bundle.cleanedRequest.note_public,
note_private: bundle.cleanedRequest.note_private,
action: bundle.cleanedRequest.action
};
return [action];
};
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/agendaevents/0',
};
return z.request(options).then((response) => [JSON.parse(response.content)]);
};
// const getActionsChoices = (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',
// };
// return z.request(options).then((response) => JSON.parse(response.content));
// };
// We recommend writing your actions separate like this and rolling them
// into the App definition at the end.
module.exports = {
key: 'action',
// You'll want to provide some helpful display labels and descriptions
// for users. Zapier will put them into the UX.
noun: 'Action',
display: {
label: 'New Agenda',
description: 'Trigger when a new agenda with action is done in Dolibarr.'
},
// `operation` is where the business logic goes.
operation: {
// `inputFields` can define the fields a user could provide,
// we'll pass them in as `bundle.inputData` later.
inputFields: [
{
key: 'action',
type: 'string',
helpText: 'Which action of agenda this should trigger on.',
choices: {
create: "Create",
modify: "Modify",
delete: "Delete",
}
}
],
type: 'hook',
performSubscribe: subscribeHook,
performUnsubscribe: unsubscribeHook,
perform: getAction,
performList: getFallbackRealAction,
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
// returned records, and have obviously dummy values that we can show to any user.
sample: {
id: 1,
createdAt: 1472069465,
name: 'Best Spagetti Ever',
authorId: 1,
action: 'create'
},
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
// field definitions. The result will be used to augment the sample.
// outputFields: () => { return []; }
// Alternatively, a static field definition should be provided, to specify labels for the fields
outputFields: [
{key: 'id', label: 'ID'},
{key: 'createdAt', label: 'Created At'},
{key: 'name', label: 'Name'},
{key: 'usertodo__name', label: 'UserToDo Name'},
{key: 'authorId', label: 'Author ID'},
{key: 'action', label: 'Action'}
]
}
};

View File

@ -0,0 +1,148 @@
const subscribeHook = (z, bundle) => {
// `z.console.log()` is similar to `console.log()`.
z.console.log('suscribing hook!');
// bundle.targetUrl has the Hook URL this app should call when an action is created.
const data = {
url: bundle.targetUrl,
event: bundle.event,
module: 'order',
action: bundle.inputData.action
};
const url = bundle.authData.url + '/api/index.php/zapierapi/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.
const options = {
url: url,
method: 'POST',
body: JSON.stringify(data)
};
// You may return a promise or a normal data structure from any perform method.
return z.request(options).then((response) => JSON.parse(response.content));
};
const unsubscribeHook = (z, bundle) => {
// bundle.subscribeData contains the parsed response JSON from the subscribe
// request made initially.
z.console.log('unsuscribing 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.
const options = {
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
method: 'DELETE',
};
// You may return a promise or a normal data structure from any perform method.
return z.request(options).then((response) => JSON.parse(response.content));
};
const getOrder = (z, bundle) => {
// bundle.cleanedRequest will include the parsed JSON object (if it's not a
// test poll) and also a .querystring property with the URL's query string.
const order = {
id: bundle.cleanedRequest.id,
ref: bundle.cleanedRequest.ref,
ref_client: bundle.cleanedRequest.ref_client,
name: bundle.cleanedRequest.name,
firstname: bundle.cleanedRequest.firstname,
directions: bundle.cleanedRequest.directions,
authorId: bundle.cleanedRequest.authorId,
createdAt: bundle.cleanedRequest.createdAt,
note_public: bundle.cleanedRequest.note_public,
note_private: bundle.cleanedRequest.note_private,
action: bundle.cleanedRequest.action
};
return [order];
};
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/orders/0',
};
return z.request(options).then((response) => [JSON.parse(response.content)]);
};
// const getActionsChoices = (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',
// };
// return z.request(options).then((response) => JSON.parse(response.content));
// };
// We recommend writing your orders separate like this and rolling them
// into the App definition at the end.
module.exports = {
key: 'order',
// You'll want to provide some helpful display labels and descriptions
// for users. Zapier will put them into the UX.
noun: 'Order',
display: {
label: 'New Order',
description: 'Trigger when a new order with action is done in Dolibarr.'
},
// `operation` is where the business logic goes.
operation: {
// `inputFields` can define the fields a user could provide,
// we'll pass them in as `bundle.inputData` later.
inputFields: [
{
key: 'action',
type: 'string',
helpText: 'Which action of order this should trigger on.',
choices: {
create: "Create",
modify: "Modify",
validate: "Validate",
}
}
],
type: 'hook',
performSubscribe: subscribeHook,
performUnsubscribe: unsubscribeHook,
perform: getOrder,
performList: getFallbackRealOrder,
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
// returned records, and have obviously dummy values that we can show to any user.
sample: {
id: 1,
createdAt: 1472069465,
name: 'Best Spagetti Ever',
authorId: 1,
directions: '1. Boil Noodles\n2.Serve with sauce',
action: 'create'
},
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
// field definitions. The result will be used to augment the sample.
// outputFields: () => { return []; }
// Alternatively, a static field definition should be provided, to specify labels for the fields
outputFields: [
{key: 'id', label: 'ID'},
{key: 'createdAt', label: 'Created At'},
{key: 'name', label: 'Name'},
{key: 'directions', label: 'Directions'},
{key: 'authorId', label: 'Author ID'},
{key: 'module', label: 'Module'},
{key: 'action', label: 'Action'}
]
}
};

View File

@ -0,0 +1,175 @@
const subscribeHook = (z, bundle) => {
// `z.console.log()` is similar to `console.log()`.
z.console.log('suscribing hook!');
// bundle.targetUrl has the Hook URL this app should call when an action is created.
const data = {
url: bundle.targetUrl,
event: bundle.event,
module: 'company',
action: bundle.inputData.action
};
const url = bundle.authData.url + '/api/index.php/zapierapi/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.
const options = {
url: url,
method: 'POST',
body: JSON.stringify(data)
};
// You may return a promise or a normal data structure from any perform method.
return z.request(options).then((response) => JSON.parse(response.content));
};
const unsubscribeHook = (z, bundle) => {
// bundle.subscribeData contains the parsed response JSON from the subscribe
// request made initially.
z.console.log('unsuscribing 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.
const options = {
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
method: 'DELETE',
};
// You may return a promise or a normal data structure from any perform method.
return z.request(options).then((response) => JSON.parse(response.content));
};
const getThirdparty = (z, bundle) => {
// bundle.cleanedRequest will include the parsed JSON object (if it's not a
// test poll) and also a .querystring property with the URL's query string.
const thirdparty = {
id: bundle.cleanedRequest.id,
name: bundle.cleanedRequest.name,
name_alias: bundle.cleanedRequest.name_alias,
firstname: bundle.cleanedRequest.firstname,
address: bundle.cleanedRequest.address,
zip: bundle.cleanedRequest.zip,
town: bundle.cleanedRequest.town,
email: bundle.cleanedRequest.email,
client: bundle.cleanedRequest.client,
fournisseur: bundle.cleanedRequest.fournisseur,
code_client: bundle.cleanedRequest.code_client,
code_fournisseur: bundle.cleanedRequest.code_fournisseur,
authorId: bundle.cleanedRequest.authorId,
createdAt: bundle.cleanedRequest.createdAt,
action: bundle.cleanedRequest.action
};
return [thirdparty];
};
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: bundle.authData.url + '/api/index.php/thirdparties/0',
};
return z.request(options).then((response) => [JSON.parse(response.content)]);
};
// 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',
// };
// return z.request(options).then((response) => JSON.parse(response.content));
// };
// const getModulesChoices = () => {
// return {
// orders: "Order",
// invoices: "Invoice",
// thirdparties: "Thirdparty",
// contacts: "Contacts"
// };
// };
// const getActionsChoices = (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`,
// };
// return z.request(options).then((response) => JSON.parse(response.content));
// };
// We recommend writing your triggers separate like this and rolling them
// into the App definition at the end.
module.exports = {
key: 'thirdparty',
// You'll want to provide some helpful display labels and descriptions
// for users. Zapier will put them into the UX.
noun: 'Thirdparty',
display: {
label: 'New Thirdparty',
description: 'Trigger when a new thirdpaty action is done in Dolibarr.'
},
// `operation` is where the business logic goes.
operation: {
// `inputFields` can define the fields a user could provide,
// we'll pass them in as `bundle.inputData` later.
inputFields: [
{
key: 'action',
type: 'string',
helpText: 'Which action of thirdparty this should trigger on.',
choices: {
create: "Create",
modify: "Modify",
validate: "Validate",
}
}
],
type: 'hook',
performSubscribe: subscribeHook,
performUnsubscribe: unsubscribeHook,
perform: getThirdparty,
performList: getFallbackRealThirdparty,
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
// returned records, and have obviously dummy values that we can show to any user.
sample: {
id: 1,
createdAt: 1472069465,
name: 'DOE',
name_alias: 'DOE Ltd',
firstname: 'John',
authorId: 1,
action: 'create'
},
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
// field definitions. The result will be used to augment the sample.
// outputFields: () => { return []; }
// Alternatively, a static field definition should be provided, to specify labels for the fields
outputFields: [
{key: 'id', label: 'ID'},
{key: 'createdAt', label: 'Created At'},
{key: 'name', label: 'Name'},
{key: 'name_alias', label: 'Name alias'},
{key: 'firstname', label: 'Firstame'},
{key: 'authorId', label: 'Author ID'},
{key: 'action', label: 'Action'},
{key: 'client', label: 'Customer/Prospect 0/1/2/3'},
{key: 'fournisseur', label: 'Supplier 0/1'},
{key: 'code_client', label: 'Customer code'},
{key: 'code_fournisseur', label: 'Supplier code'}
]
}
};

View File

@ -13,7 +13,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
* ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION
*/ */
@ -43,59 +43,59 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
define(GEN_NUMBER_FACTURE, 1); define(GEN_NUMBER_FACTURE, 1);
$year = 2016; $year = 2016;
$dates = array (mktime(12,0,0,1,3,$year), $dates = array (mktime(12, 0, 0, 1, 3, $year),
mktime(12,0,0,1,9,$year), mktime(12, 0, 0, 1, 9, $year),
mktime(12,0,0,2,13,$year), mktime(12, 0, 0, 2, 13, $year),
mktime(12,0,0,2,23,$year), mktime(12, 0, 0, 2, 23, $year),
mktime(12,0,0,3,30,$year), mktime(12, 0, 0, 3, 30, $year),
mktime(12,0,0,4,3,$year), mktime(12, 0, 0, 4, 3, $year),
mktime(12,0,0,4,3,$year), mktime(12, 0, 0, 4, 3, $year),
mktime(12,0,0,5,9,$year), mktime(12, 0, 0, 5, 9, $year),
mktime(12,0,0,5,1,$year), mktime(12, 0, 0, 5, 1, $year),
mktime(12,0,0,5,13,$year), mktime(12, 0, 0, 5, 13, $year),
mktime(12,0,0,5,19,$year), mktime(12, 0, 0, 5, 19, $year),
mktime(12,0,0,5,23,$year), mktime(12, 0, 0, 5, 23, $year),
mktime(12,0,0,6,3,$year), mktime(12, 0, 0, 6, 3, $year),
mktime(12,0,0,6,19,$year), mktime(12, 0, 0, 6, 19, $year),
mktime(12,0,0,6,24,$year), mktime(12, 0, 0, 6, 24, $year),
mktime(12,0,0,7,3,$year), mktime(12, 0, 0, 7, 3, $year),
mktime(12,0,0,7,9,$year), mktime(12, 0, 0, 7, 9, $year),
mktime(12,0,0,7,23,$year), mktime(12, 0, 0, 7, 23, $year),
mktime(12,0,0,7,30,$year), mktime(12, 0, 0, 7, 30, $year),
mktime(12,0,0,8,9,$year), mktime(12, 0, 0, 8, 9, $year),
mktime(12,0,0,9,23,$year), mktime(12, 0, 0, 9, 23, $year),
mktime(12,0,0,10,3,$year), mktime(12, 0, 0, 10, 3, $year),
mktime(12,0,0,11,12,$year), mktime(12, 0, 0, 11, 12, $year),
mktime(12,0,0,11,13,$year), mktime(12, 0, 0, 11, 13, $year),
mktime(12,0,0,1,3,($year - 1)), mktime(12, 0, 0, 1, 3, ($year - 1)),
mktime(12,0,0,1,9,($year - 1)), mktime(12, 0, 0, 1, 9, ($year - 1)),
mktime(12,0,0,2,13,($year - 1)), mktime(12, 0, 0, 2, 13, ($year - 1)),
mktime(12,0,0,2,23,($year - 1)), mktime(12, 0, 0, 2, 23, ($year - 1)),
mktime(12,0,0,3,30,($year - 1)), mktime(12, 0, 0, 3, 30, ($year - 1)),
mktime(12,0,0,4,3,($year - 1)), mktime(12, 0, 0, 4, 3, ($year - 1)),
mktime(12,0,0,4,3,($year - 1)), mktime(12, 0, 0, 4, 3, ($year - 1)),
mktime(12,0,0,5,9,($year - 1)), mktime(12, 0, 0, 5, 9, ($year - 1)),
mktime(12,0,0,5,1,($year - 1)), mktime(12, 0, 0, 5, 1, ($year - 1)),
mktime(12,0,0,5,13,($year - 1)), mktime(12, 0, 0, 5, 13, ($year - 1)),
mktime(12,0,0,5,19,($year - 1)), mktime(12, 0, 0, 5, 19, ($year - 1)),
mktime(12,0,0,5,23,($year - 1)), mktime(12, 0, 0, 5, 23, ($year - 1)),
mktime(12,0,0,6,3,($year - 1)), mktime(12, 0, 0, 6, 3, ($year - 1)),
mktime(12,0,0,6,19,($year - 1)), mktime(12, 0, 0, 6, 19, ($year - 1)),
mktime(12,0,0,6,24,($year - 1)), mktime(12, 0, 0, 6, 24, ($year - 1)),
mktime(12,0,0,7,3,($year - 1)), mktime(12, 0, 0, 7, 3, ($year - 1)),
mktime(12,0,0,7,9,($year - 1)), mktime(12, 0, 0, 7, 9, ($year - 1)),
mktime(12,0,0,7,23,($year - 1)), mktime(12, 0, 0, 7, 23, ($year - 1)),
mktime(12,0,0,7,30,($year - 1)), mktime(12, 0, 0, 7, 30, ($year - 1)),
mktime(12,0,0,8,9,($year - 1)), mktime(12, 0, 0, 8, 9, ($year - 1)),
mktime(12,0,0,9,23,($year - 1)), mktime(12, 0, 0, 9, 23, ($year - 1)),
mktime(12,0,0,10,3,($year - 1)), mktime(12, 0, 0, 10, 3, ($year - 1)),
mktime(12,0,0,11,12,$year), mktime(12, 0, 0, 11, 12, $year),
mktime(12,0,0,11,13,$year), mktime(12, 0, 0, 11, 13, $year),
mktime(12,0,0,12,12,$year), mktime(12, 0, 0, 12, 12, $year),
mktime(12,0,0,12,13,$year), mktime(12, 0, 0, 12, 13, $year),
); );
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -150,7 +150,7 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0)
$object->mode_reglement_id = 3; $object->mode_reglement_id = 3;
$fuser = new User($db); $fuser = new User($db);
$fuser->fetch(mt_rand(1,2)); $fuser->fetch(mt_rand(1, 2));
$fuser->getRights(); $fuser->getRights();
$result=$object->create($fuser); $result=$object->create($fuser);
@ -163,10 +163,10 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0)
$prodid = mt_rand(1, $num_prods); $prodid = mt_rand(1, $num_prods);
$product=new Product($db); $product=new Product($db);
$result=$product->fetch($prodids[$prodid]); $result=$product->fetch($prodids[$prodid]);
$result=$object->addline($product->description, $product->price, mt_rand(1,5), 0, 0, 0, $prodids[$prodid], 0, '', '', 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type); $result=$object->addline($product->description, $product->price, mt_rand(1, 5), 0, 0, 0, $prodids[$prodid], 0, '', '', 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type);
if ($result < 0) if ($result < 0)
{ {
dol_print_error($db,$propal->error); dol_print_error($db, $propal->error);
} }
$xnbp++; $xnbp++;
} }
@ -178,11 +178,11 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0)
} }
else else
{ {
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
} }
else else
{ {
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
} }

View File

@ -14,14 +14,14 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
* ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION
*/ */
/** /**
* \file dev/initdata/generate-order.php * \file dev/initdata/generate-order.php
* \brief Script example to inject random orders (for load tests) * \brief Script example to inject random orders (for load tests)
*/ */
// Test si mode batch // Test si mode batch
@ -49,59 +49,59 @@ require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
define(GEN_NUMBER_COMMANDE, 10); define(GEN_NUMBER_COMMANDE, 10);
$year = 2016; $year = 2016;
$dates = array (mktime(12,0,0,1,3,$year), $dates = array (mktime(12, 0, 0, 1, 3, $year),
mktime(12,0,0,1,9,$year), mktime(12, 0, 0, 1, 9, $year),
mktime(12,0,0,2,13,$year), mktime(12, 0, 0, 2, 13, $year),
mktime(12,0,0,2,23,$year), mktime(12, 0, 0, 2, 23, $year),
mktime(12,0,0,3,30,$year), mktime(12, 0, 0, 3, 30, $year),
mktime(12,0,0,4,3,$year), mktime(12, 0, 0, 4, 3, $year),
mktime(12,0,0,4,3,$year), mktime(12, 0, 0, 4, 3, $year),
mktime(12,0,0,5,9,$year), mktime(12, 0, 0, 5, 9, $year),
mktime(12,0,0,5,1,$year), mktime(12, 0, 0, 5, 1, $year),
mktime(12,0,0,5,13,$year), mktime(12, 0, 0, 5, 13, $year),
mktime(12,0,0,5,19,$year), mktime(12, 0, 0, 5, 19, $year),
mktime(12,0,0,5,23,$year), mktime(12, 0, 0, 5, 23, $year),
mktime(12,0,0,6,3,$year), mktime(12, 0, 0, 6, 3, $year),
mktime(12,0,0,6,19,$year), mktime(12, 0, 0, 6, 19, $year),
mktime(12,0,0,6,24,$year), mktime(12, 0, 0, 6, 24, $year),
mktime(12,0,0,7,3,$year), mktime(12, 0, 0, 7, 3, $year),
mktime(12,0,0,7,9,$year), mktime(12, 0, 0, 7, 9, $year),
mktime(12,0,0,7,23,$year), mktime(12, 0, 0, 7, 23, $year),
mktime(12,0,0,7,30,$year), mktime(12, 0, 0, 7, 30, $year),
mktime(12,0,0,8,9,$year), mktime(12, 0, 0, 8, 9, $year),
mktime(12,0,0,9,23,$year), mktime(12, 0, 0, 9, 23, $year),
mktime(12,0,0,10,3,$year), mktime(12, 0, 0, 10, 3, $year),
mktime(12,0,0,11,12,$year), mktime(12, 0, 0, 11, 12, $year),
mktime(12,0,0,11,13,$year), mktime(12, 0, 0, 11, 13, $year),
mktime(12,0,0,1,3,($year - 1)), mktime(12, 0, 0, 1, 3, ($year - 1)),
mktime(12,0,0,1,9,($year - 1)), mktime(12, 0, 0, 1, 9, ($year - 1)),
mktime(12,0,0,2,13,($year - 1)), mktime(12, 0, 0, 2, 13, ($year - 1)),
mktime(12,0,0,2,23,($year - 1)), mktime(12, 0, 0, 2, 23, ($year - 1)),
mktime(12,0,0,3,30,($year - 1)), mktime(12, 0, 0, 3, 30, ($year - 1)),
mktime(12,0,0,4,3,($year - 1)), mktime(12, 0, 0, 4, 3, ($year - 1)),
mktime(12,0,0,4,3,($year - 1)), mktime(12, 0, 0, 4, 3, ($year - 1)),
mktime(12,0,0,5,9,($year - 1)), mktime(12, 0, 0, 5, 9, ($year - 1)),
mktime(12,0,0,5,1,($year - 1)), mktime(12, 0, 0, 5, 1, ($year - 1)),
mktime(12,0,0,5,13,($year - 1)), mktime(12, 0, 0, 5, 13, ($year - 1)),
mktime(12,0,0,5,19,($year - 1)), mktime(12, 0, 0, 5, 19, ($year - 1)),
mktime(12,0,0,5,23,($year - 1)), mktime(12, 0, 0, 5, 23, ($year - 1)),
mktime(12,0,0,6,3,($year - 1)), mktime(12, 0, 0, 6, 3, ($year - 1)),
mktime(12,0,0,6,19,($year - 1)), mktime(12, 0, 0, 6, 19, ($year - 1)),
mktime(12,0,0,6,24,($year - 1)), mktime(12, 0, 0, 6, 24, ($year - 1)),
mktime(12,0,0,7,3,($year - 1)), mktime(12, 0, 0, 7, 3, ($year - 1)),
mktime(12,0,0,7,9,($year - 1)), mktime(12, 0, 0, 7, 9, ($year - 1)),
mktime(12,0,0,7,23,($year - 1)), mktime(12, 0, 0, 7, 23, ($year - 1)),
mktime(12,0,0,7,30,($year - 1)), mktime(12, 0, 0, 7, 30, ($year - 1)),
mktime(12,0,0,8,9,($year - 1)), mktime(12, 0, 0, 8, 9, ($year - 1)),
mktime(12,0,0,9,23,($year - 1)), mktime(12, 0, 0, 9, 23, ($year - 1)),
mktime(12,0,0,10,3,($year - 1)), mktime(12, 0, 0, 10, 3, ($year - 1)),
mktime(12,0,0,11,12,$year), mktime(12, 0, 0, 11, 12, $year),
mktime(12,0,0,11,13,$year), mktime(12, 0, 0, 11, 13, $year),
mktime(12,0,0,12,12,$year), mktime(12, 0, 0, 12, 12, $year),
mktime(12,0,0,12,13,$year), mktime(12, 0, 0, 12, 13, $year),
); );
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if ($ret <= 0) if ($ret <= 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -113,13 +113,13 @@ $societesid = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe where client in (1, 3)"; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe where client in (1, 3)";
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) { if ($resql) {
$num_thirdparties = $db->num_rows($resql); $num_thirdparties = $db->num_rows($resql);
$i = 0; $i = 0;
while ($i < $num_thirdparties) { while ($i < $num_thirdparties) {
$i++; $i++;
$row = $db->fetch_row($resql); $row = $db->fetch_row($resql);
$societesid[$i] = $row[0]; $societesid[$i] = $row[0];
} }
} }
else { print "err"; } else { print "err"; }
@ -127,35 +127,32 @@ $commandesid = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande";
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) { if ($resql) {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
$i = 0; $i = 0;
while ($i < $num) { while ($i < $num) {
$i++; $i++;
$row = $db->fetch_row($resql); $row = $db->fetch_row($resql);
$commandesid[$i] = $row[0]; $commandesid[$i] = $row[0];
} }
} }
else { print "err"; } else { print "err"; }
$prodids = array(); $prodids = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1";
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql) {
{ $num_prods = $db->num_rows($resql);
$num_prods = $db->num_rows($resql); $i = 0;
$i = 0; while ($i < $num_prods) {
while ($i < $num_prods) $i++;
{
$i++;
$row = $db->fetch_row($resql); $row = $db->fetch_row($resql);
$prodids[$i] = $row[0]; $prodids[$i] = $row[0];
} }
} }
print "Build ".GEN_NUMBER_COMMANDE." orders\n"; print "Build ".GEN_NUMBER_COMMANDE." orders\n";
for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++) for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
{ {
@ -177,14 +174,14 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
$listofuserid=array(12,13,16); $listofuserid=array(12,13,16);
$fuser = new User($db); $fuser = new User($db);
$fuser->fetch($listofuserid[mt_rand(0,2)]); $fuser->fetch($listofuserid[mt_rand(0, 2)]);
$fuser->getRights(); $fuser->getRights();
$db->begin(); $db->begin();
$result=$object->create($fuser); $result=$object->create($fuser);
if ($result >= 0) if ($result >= 0)
{ {
$nbp = mt_rand(2, 5); $nbp = mt_rand(2, 5);
$xnbp = 0; $xnbp = 0;
while ($xnbp < $nbp) while ($xnbp < $nbp)
@ -192,32 +189,31 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
$prodid = mt_rand(1, $num_prods); $prodid = mt_rand(1, $num_prods);
$product=new Product($db); $product=new Product($db);
$result=$product->fetch($prodids[$prodid]); $result=$product->fetch($prodids[$prodid]);
$result=$object->addline($product->description, $product->price, mt_rand(1,5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type); $result=$object->addline($product->description, $product->price, mt_rand(1, 5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type);
if ($result <= 0) if ($result <= 0)
{ {
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
$xnbp++; $xnbp++;
} }
$result=$object->valid($fuser); $result=$object->valid($fuser);
if ($result > 0) if ($result > 0)
{ {
$db->commit(); $db->commit();
print " OK with ref ".$object->ref."\n"; print " OK with ref ".$object->ref."\n";
} }
else else
{ {
print " KO\n"; print " KO\n";
$db->rollback(); $db->rollback();
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
} }
else else
{ {
print " KO\n"; print " KO\n";
$db->rollback(); $db->rollback();
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
} }

View File

@ -14,7 +14,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
* ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION
*/ */
@ -49,7 +49,7 @@ include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
define(GEN_NUMBER_PRODUIT, 100000); define(GEN_NUMBER_PRODUIT, 100000);
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -61,8 +61,8 @@ $user->getrights();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) { if ($resql) {
$num = $db->num_rows($resql); $i = 0; $num = $db->num_rows($resql); $i = 0;
while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; } while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; }
} }
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
@ -85,16 +85,14 @@ for ($s = 0 ; $s < GEN_NUMBER_PRODUIT ; $s++)
{ {
print "Product ".$s; print "Product ".$s;
$produit = new Product($db); $produit = new Product($db);
$produit->type = mt_rand(0,1); $produit->type = mt_rand(0, 1);
$produit->status = 1; $produit->status = 1;
$produit->ref = ($produit->type?'S':'P').time().$s; $produit->ref = ($produit->type?'S':'P').time().$s;
$produit->label = 'Label '.time().$s; $produit->label = 'Label '.time().$s;
$produit->description = 'Description '.time().$s; $produit->description = 'Description '.time().$s;
$produit->price = mt_rand(1,1000); $produit->price = mt_rand(1, 1000);
$produit->tva_tx = "19.6"; $produit->tva_tx = "19.6";
$ret=$produit->create($user); $ret=$produit->create($user);
if ($ret < 0) print "Error $ret - ".$produit->error."\n"; if ($ret < 0) print "Error $ret - ".$produit->error."\n";
else print " OK with ref ".$produit->ref."\n"; else print " OK with ref ".$produit->ref."\n";
} }

View File

@ -14,7 +14,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
* ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION
*/ */
@ -45,59 +45,59 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
define(GEN_NUMBER_PROPAL, 10); define(GEN_NUMBER_PROPAL, 10);
$year = 2016; $year = 2016;
$dates = array (mktime(12,0,0,1,3,$year), $dates = array (mktime(12, 0, 0, 1, 3, $year),
mktime(12,0,0,1,9,$year), mktime(12, 0, 0, 1, 9, $year),
mktime(12,0,0,2,13,$year), mktime(12, 0, 0, 2, 13, $year),
mktime(12,0,0,2,23,$year), mktime(12, 0, 0, 2, 23, $year),
mktime(12,0,0,3,30,$year), mktime(12, 0, 0, 3, 30, $year),
mktime(12,0,0,4,3,$year), mktime(12, 0, 0, 4, 3, $year),
mktime(12,0,0,4,3,$year), mktime(12, 0, 0, 4, 3, $year),
mktime(12,0,0,5,9,$year), mktime(12, 0, 0, 5, 9, $year),
mktime(12,0,0,5,1,$year), mktime(12, 0, 0, 5, 1, $year),
mktime(12,0,0,5,13,$year), mktime(12, 0, 0, 5, 13, $year),
mktime(12,0,0,5,19,$year), mktime(12, 0, 0, 5, 19, $year),
mktime(12,0,0,5,23,$year), mktime(12, 0, 0, 5, 23, $year),
mktime(12,0,0,6,3,$year), mktime(12, 0, 0, 6, 3, $year),
mktime(12,0,0,6,19,$year), mktime(12, 0, 0, 6, 19, $year),
mktime(12,0,0,6,24,$year), mktime(12, 0, 0, 6, 24, $year),
mktime(12,0,0,7,3,$year), mktime(12, 0, 0, 7, 3, $year),
mktime(12,0,0,7,9,$year), mktime(12, 0, 0, 7, 9, $year),
mktime(12,0,0,7,23,$year), mktime(12, 0, 0, 7, 23, $year),
mktime(12,0,0,7,30,$year), mktime(12, 0, 0, 7, 30, $year),
mktime(12,0,0,8,9,$year), mktime(12, 0, 0, 8, 9, $year),
mktime(12,0,0,9,23,$year), mktime(12, 0, 0, 9, 23, $year),
mktime(12,0,0,10,3,$year), mktime(12, 0, 0, 10, 3, $year),
mktime(12,0,0,11,12,$year), mktime(12, 0, 0, 11, 12, $year),
mktime(12,0,0,11,13,$year), mktime(12, 0, 0, 11, 13, $year),
mktime(12,0,0,1,3,($year - 1)), mktime(12, 0, 0, 1, 3, ($year - 1)),
mktime(12,0,0,1,9,($year - 1)), mktime(12, 0, 0, 1, 9, ($year - 1)),
mktime(12,0,0,2,13,($year - 1)), mktime(12, 0, 0, 2, 13, ($year - 1)),
mktime(12,0,0,2,23,($year - 1)), mktime(12, 0, 0, 2, 23, ($year - 1)),
mktime(12,0,0,3,30,($year - 1)), mktime(12, 0, 0, 3, 30, ($year - 1)),
mktime(12,0,0,4,3,($year - 1)), mktime(12, 0, 0, 4, 3, ($year - 1)),
mktime(12,0,0,4,3,($year - 1)), mktime(12, 0, 0, 4, 3, ($year - 1)),
mktime(12,0,0,5,9,($year - 1)), mktime(12, 0, 0, 5, 9, ($year - 1)),
mktime(12,0,0,5,1,($year - 1)), mktime(12, 0, 0, 5, 1, ($year - 1)),
mktime(12,0,0,5,13,($year - 1)), mktime(12, 0, 0, 5, 13, ($year - 1)),
mktime(12,0,0,5,19,($year - 1)), mktime(12, 0, 0, 5, 19, ($year - 1)),
mktime(12,0,0,5,23,($year - 1)), mktime(12, 0, 0, 5, 23, ($year - 1)),
mktime(12,0,0,6,3,($year - 1)), mktime(12, 0, 0, 6, 3, ($year - 1)),
mktime(12,0,0,6,19,($year - 1)), mktime(12, 0, 0, 6, 19, ($year - 1)),
mktime(12,0,0,6,24,($year - 1)), mktime(12, 0, 0, 6, 24, ($year - 1)),
mktime(12,0,0,7,3,($year - 1)), mktime(12, 0, 0, 7, 3, ($year - 1)),
mktime(12,0,0,7,9,($year - 1)), mktime(12, 0, 0, 7, 9, ($year - 1)),
mktime(12,0,0,7,23,($year - 1)), mktime(12, 0, 0, 7, 23, ($year - 1)),
mktime(12,0,0,7,30,($year - 1)), mktime(12, 0, 0, 7, 30, ($year - 1)),
mktime(12,0,0,8,9,($year - 1)), mktime(12, 0, 0, 8, 9, ($year - 1)),
mktime(12,0,0,9,23,($year - 1)), mktime(12, 0, 0, 9, 23, ($year - 1)),
mktime(12,0,0,10,3,($year - 1)), mktime(12, 0, 0, 10, 3, ($year - 1)),
mktime(12,0,0,11,12,$year), mktime(12, 0, 0, 11, 12, $year),
mktime(12,0,0,11,13,$year), mktime(12, 0, 0, 11, 13, $year),
mktime(12,0,0,12,12,$year), mktime(12, 0, 0, 12, 12, $year),
mktime(12,0,0,12,13,$year), mktime(12, 0, 0, 12, 13, $year),
); );
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -174,7 +174,7 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
$object = new Propal($db); $object = new Propal($db);
$fuser = new User($db); $fuser = new User($db);
$fuser->fetch(mt_rand(1,2)); $fuser->fetch(mt_rand(1, 2));
$fuser->getRights(); $fuser->getRights();
$object->contactid = $contids[$socids[$socid]][0]; $object->contactid = $contids[$socids[$socid]][0];
@ -193,10 +193,10 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
$prodid = mt_rand(1, $num_prods); $prodid = mt_rand(1, $num_prods);
$product=new Product($db); $product=new Product($db);
$result=$product->fetch($prodids[$prodid]); $result=$product->fetch($prodids[$prodid]);
$result=$object->addline($product->description, $product->price, mt_rand(1,5), 0, 0, 0, $prodids[$prodid], 0); $result=$object->addline($product->description, $product->price, mt_rand(1, 5), 0, 0, 0, $prodids[$prodid], 0);
if ($result < 0) if ($result < 0)
{ {
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
$xnbp++; $xnbp++;
} }
@ -211,11 +211,11 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
{ {
print " KO\n"; print " KO\n";
$db->rollback(); $db->rollback();
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
} }
else else
{ {
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
} }

View File

@ -14,7 +14,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
* ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION
*/ */
@ -52,7 +52,7 @@ $listoflastname = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Doroth
define(GEN_NUMBER_SOCIETE, 10); define(GEN_NUMBER_SOCIETE, 10);
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -64,22 +64,34 @@ $user->getrights();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) { if ($resql) {
$num = $db->num_rows($resql); $i = 0; $num = $db->num_rows($resql); $i = 0;
while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; } while ($i < $num) {
$row = $db->fetch_row($resql);
$productsid[$i] = $row[0];
$i++;
}
} }
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) { if ($resql) {
$num = $db->num_rows($resql); $i = 0; $num = $db->num_rows($resql); $i = 0;
while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; } while ($i < $num) {
$row = $db->fetch_row($resql);
$societesid[$i] = $row[0];
$i++;
}
} else { print "err"; } } else { print "err"; }
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) { if ($resql) {
$num = $db->num_rows($resql); $i = 0; $num = $db->num_rows($resql); $i = 0;
while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; } while ($i < $num) {
$row = $db->fetch_row($resql);
$commandesid[$i] = $row[0];
$i++;
}
} else { print "err"; } } else { print "err"; }
@ -91,22 +103,22 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
$soc = new Societe($db); $soc = new Societe($db);
$soc->name = "Company num ".time()."$s"; $soc->name = "Company num ".time()."$s";
$soc->town = $listoftown[mt_rand(0, count($listoftown)-1)]; $soc->town = $listoftown[mt_rand(0, count($listoftown)-1)];
$soc->client = mt_rand(1,2); // Une societe sur 2 est prospect, l'autre client $soc->client = mt_rand(1, 2); // Une societe sur 2 est prospect, l'autre client
$soc->fournisseur = mt_rand(0,1); // Une societe sur 2 est fournisseur $soc->fournisseur = mt_rand(0, 1); // Une societe sur 2 est fournisseur
$soc->code_client='CU'.time()."$s"; $soc->code_client='CU'.time()."$s";
$soc->code_fournisseur='SU'.time()."$s"; $soc->code_fournisseur='SU'.time()."$s";
$soc->tva_assuj=1; $soc->tva_assuj=1;
$soc->country_id=1; $soc->country_id=1;
$soc->country_code='FR'; $soc->country_code='FR';
// Un client sur 3 a une remise de 5% // Un client sur 3 a une remise de 5%
$user_remise=mt_rand(1,3); if ($user_remise==3) $soc->remise_percent=5; $user_remise=mt_rand(1, 3); if ($user_remise==3) $soc->remise_percent=5;
print "> client=".$soc->client.", fournisseur=".$soc->fournisseur.", remise=".$soc->remise_percent."\n"; print "> client=".$soc->client.", fournisseur=".$soc->fournisseur.", remise=".$soc->remise_percent."\n";
$soc->note_private = 'Company created by the script generate-societe.php'; $soc->note_private = 'Company created by the script generate-societe.php';
$socid = $soc->create(); $socid = $soc->create();
if ($socid >= 0) if ($socid >= 0)
{ {
$rand = mt_rand(1,4); $rand = mt_rand(1, 4);
print "> Generates $rand contact(s)\n"; print "> Generates $rand contact(s)\n";
for ($c = 0 ; $c < $rand ; $c++) for ($c = 0 ; $c < $rand ; $c++)
{ {
@ -116,7 +128,6 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
$contact->firstname = $listoflastname[mt_rand(0, count($listoflastname)-1)]; $contact->firstname = $listoflastname[mt_rand(0, count($listoflastname)-1)];
if ( $contact->create($user) ) if ( $contact->create($user) )
{ {
} }
} }
@ -127,5 +138,3 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
print "Error: ".$soc->error."\n"; print "Error: ".$soc->error."\n";
} }
} }

View File

@ -14,7 +14,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
* WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE * WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE
*/ */
@ -35,7 +35,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
} }
// Recupere root dolibarr // Recupere root dolibarr
$path=preg_replace('/import-products.php/i','',$_SERVER["PHP_SELF"]); $path=preg_replace('/import-products.php/i', '', $_SERVER["PHP_SELF"]);
require $path."../../htdocs/master.inc.php"; require $path."../../htdocs/master.inc.php";
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@ -57,7 +57,7 @@ $error=0;
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".implode(',',$argv)); dol_syslog($script_file." launched with arg ".implode(',', $argv));
$mode = $argv[1]; $mode = $argv[1];
$filepath = $argv[2]; $filepath = $argv[2];
@ -66,7 +66,7 @@ $defaultlang = empty($argv[3])?'en_US':$argv[3];
$startlinenb = empty($argv[4])?1:$argv[4]; $startlinenb = empty($argv[4])?1:$argv[4];
$endlinenb = empty($argv[5])?0:$argv[5]; $endlinenb = empty($argv[5])?0:$argv[5];
if (empty($mode) || ! in_array($mode,array('test','confirm','confirmforced')) || empty($filepath)) { if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [defaultlang] [startlinenb] [endlinenb]\n"; print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [defaultlang] [startlinenb] [endlinenb]\n";
print "Usage: $script_file test myfilepath.csv fr_FR 2 1002\n"; print "Usage: $script_file test myfilepath.csv fr_FR 2 1002\n";
print "\n"; print "\n";
@ -78,7 +78,7 @@ if (! file_exists($filepath)) {
exit(-1); exit(-1);
} }
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -93,7 +93,7 @@ if (! $confirmed)
$input = trim(fgets(STDIN)); $input = trim(fgets(STDIN));
} }
// Open input and ouput files // Open input and output files
$fhandle = fopen($filepath, 'r'); $fhandle = fopen($filepath, 'r');
if (! $fhandle) if (! $fhandle)
{ {

View File

@ -14,7 +14,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
* WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE * WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE
*/ */
@ -35,7 +35,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
} }
// Recupere root dolibarr // Recupere root dolibarr
$path=preg_replace('/import-thirdparties.php/i','',$_SERVER["PHP_SELF"]); $path=preg_replace('/import-thirdparties.php/i', '', $_SERVER["PHP_SELF"]);
require $path."../../htdocs/master.inc.php"; require $path."../../htdocs/master.inc.php";
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@ -57,7 +57,7 @@ $error=0;
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".implode(',',$argv)); dol_syslog($script_file." launched with arg ".implode(',', $argv));
$mode = $argv[1]; $mode = $argv[1];
$filepath = $argv[2]; $filepath = $argv[2];
@ -66,7 +66,7 @@ $filepatherr = $filepath.'.err';
$startlinenb = empty($argv[3])?1:$argv[3]; $startlinenb = empty($argv[3])?1:$argv[3];
$endlinenb = empty($argv[4])?0:$argv[4]; $endlinenb = empty($argv[4])?0:$argv[4];
if (empty($mode) || ! in_array($mode,array('test','confirm','confirmforced')) || empty($filepath)) { if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n"; print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";
print "Usage: $script_file test myfilepath.csv 2 1002\n"; print "Usage: $script_file test myfilepath.csv 2 1002\n";
print "\n"; print "\n";
@ -78,7 +78,7 @@ if (! file_exists($filepath)) {
exit(-1); exit(-1);
} }
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -93,7 +93,7 @@ if (! $confirmed)
$input = trim(fgets(STDIN)); $input = trim(fgets(STDIN));
} }
// Open input and ouput files // Open input and output files
$fhandle = fopen($filepath, 'r'); $fhandle = fopen($filepath, 'r');
if (! $fhandle) if (! $fhandle)
{ {
@ -199,13 +199,13 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
{ {
$salesrep=new User($db); $salesrep=new User($db);
$tmp=explode(' ',$fields[3],2); $tmp=explode(' ', $fields[3], 2);
$salesrep->firstname = trim($tmp[0]); $salesrep->firstname = trim($tmp[0]);
$salesrep->lastname = trim($tmp[1]); $salesrep->lastname = trim($tmp[1]);
if ($salesrep->lastname) $salesrep->login = strtolower(substr($salesrep->firstname, 0, 1)) . strtolower(substr($salesrep->lastname, 0)); if ($salesrep->lastname) $salesrep->login = strtolower(substr($salesrep->firstname, 0, 1)) . strtolower(substr($salesrep->lastname, 0));
else $salesrep->login=strtolower($salesrep->firstname); else $salesrep->login=strtolower($salesrep->firstname);
$salesrep->login=preg_replace('/ /','',$salesrep->login); $salesrep->login=preg_replace('/ /', '', $salesrep->login);
$salesrep->fetch(0,$salesrep->login); $salesrep->fetch(0, $salesrep->login);
$result = $object->add_commercial($user, $salesrep->id); $result = $object->add_commercial($user, $salesrep->id);
if ($result < 0) if ($result < 0)

View File

@ -14,7 +14,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
* WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE * WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE
*/ */
@ -35,7 +35,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
} }
// Recupere root dolibarr // Recupere root dolibarr
$path=preg_replace('/import-users.php/i','',$_SERVER["PHP_SELF"]); $path=preg_replace('/import-users.php/i', '', $_SERVER["PHP_SELF"]);
require $path."../../htdocs/master.inc.php"; require $path."../../htdocs/master.inc.php";
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@ -57,7 +57,7 @@ $error=0;
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".implode(',',$argv)); dol_syslog($script_file." launched with arg ".implode(',', $argv));
$mode = $argv[1]; $mode = $argv[1];
$filepath = $argv[2]; $filepath = $argv[2];
@ -66,7 +66,7 @@ $filepatherr = $filepath.'.err';
$startlinenb = empty($argv[3])?1:$argv[3]; $startlinenb = empty($argv[3])?1:$argv[3];
$endlinenb = empty($argv[4])?0:$argv[4]; $endlinenb = empty($argv[4])?0:$argv[4];
if (empty($mode) || ! in_array($mode,array('test','confirm','confirmforced')) || empty($filepath)) { if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n"; print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";
print "Usage: $script_file test myfilepath.csv 2 1002\n"; print "Usage: $script_file test myfilepath.csv 2 1002\n";
print "\n"; print "\n";
@ -78,7 +78,7 @@ if (! file_exists($filepath)) {
exit(-1); exit(-1);
} }
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -93,7 +93,7 @@ if (! $confirmed)
$input = trim(fgets(STDIN)); $input = trim(fgets(STDIN));
} }
// Open input and ouput files // Open input and output files
$fhandle = fopen($filepath, 'r'); $fhandle = fopen($filepath, 'r');
if (! $fhandle) if (! $fhandle)
{ {
@ -127,12 +127,12 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
$object = new User($db); $object = new User($db);
$object->statut = 1; $object->statut = 1;
$tmp=explode(' ',$fields[3],2); $tmp=explode(' ', $fields[3], 2);
$object->firstname = trim($tmp[0]); $object->firstname = trim($tmp[0]);
$object->lastname = trim($tmp[1]); $object->lastname = trim($tmp[1]);
if ($object->lastname) $object->login = strtolower(substr($object->firstname, 0, 1)) . strtolower(substr($object->lastname, 0)); if ($object->lastname) $object->login = strtolower(substr($object->firstname, 0, 1)) . strtolower(substr($object->lastname, 0));
else $object->login=strtolower($object->firstname); else $object->login=strtolower($object->firstname);
$object->login=preg_replace('/ /','',$object->login); $object->login=preg_replace('/ /', '', $object->login);
$object->password = 'init'; $object->password = 'init';
print "Process line nb ".$i.", login ".$object->login; print "Process line nb ".$i.", login ".$object->login;

View File

@ -13,7 +13,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
* THIS SCRIPT DELETE ALL MAIN TABLE CONTENT * THIS SCRIPT DELETE ALL MAIN TABLE CONTENT
* WARNING, DO NOT USE ON A PRODUCTION INSTANCE * WARNING, DO NOT USE ON A PRODUCTION INSTANCE
@ -35,7 +35,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
} }
// Recupere root dolibarr // Recupere root dolibarr
$path=preg_replace('/purge-data.php/i','',$_SERVER["PHP_SELF"]); $path=preg_replace('/purge-data.php/i', '', $_SERVER["PHP_SELF"]);
require $path."../../htdocs/master.inc.php"; require $path."../../htdocs/master.inc.php";
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.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.'/contact/class/contact.class.php';
@ -53,133 +53,177 @@ $error=0;
// List of sql to execute // List of sql to execute
$sqls=array( $sqls=array(
'user'=>array( 'user'=>array(
'DELETE FROM '.MAIN_DB_PREFIX."user_rights WHERE fk_user IN (SELECT rowid FROM ".MAIN_DB_PREFIX."user WHERE admin = 0 and login != 'admin')", "DELETE FROM ".MAIN_DB_PREFIX."user_rights WHERE fk_user IN (SELECT rowid FROM ".MAIN_DB_PREFIX."user WHERE admin = 0 and login != 'admin') AND fk_user IN (select rowid FROM ".MAIN_DB_PREFIX."user where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX."user WHERE admin = 0 and login != 'admin'", "DELETE FROM ".MAIN_DB_PREFIX."user WHERE admin = 0 and login != 'admin' AND datec < '__DATE__'",
),
'event'=>array(
//"DELETE FROM ".MAIN_DB_PREFIX."actioncomm WHERE lineid IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."actioncomm WHERE datec < '__DATE__'",
),
'payment'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."paiement_facture where fk_facture IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."paiement where rowid NOT IN (SELECT fk_paiement FROM ".MAIN_DB_PREFIX."paiement_facture)",
), ),
'bank'=>array( 'bank'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'bank_account', "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'bank_class', "DELETE FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'bank_url', "DELETE FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__'",
'DELETE FROM '.MAIN_DB_PREFIX.'bank',
), ),
'contract'=>array( 'bankaccount'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'contratdet', "DELETE FROM ".MAIN_DB_PREFIX."bank_account WHERE datec < '__DATE__'",
'DELETE FROM '.MAIN_DB_PREFIX.'contrat',
), ),
'invoice'=>array( 'invoice'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'paiement_facture', '@payment',
'DELETE FROM '.MAIN_DB_PREFIX.'facture_rec', "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except where fk_facture_source IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'facturedet', "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except where fk_facture IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'facture WHERE fk_facture_source IS NOT NULL', "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except where fk_facture_line IN (select rowid FROM ".MAIN_DB_PREFIX."facturedet as fd WHERE fd.fk_facture IN (select rowid from ".MAIN_DB_PREFIX."facture where datec < '__DATE__'))",
'DELETE FROM '.MAIN_DB_PREFIX.'facture', "DELETE FROM ".MAIN_DB_PREFIX."facture_rec where datec < '__DATE__'",
"DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE fk_facture IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')",
"UPDATE ".MAIN_DB_PREFIX."facture SET fk_facture_source = NULL WHERE fk_facture_source IN (select f2.rowid FROM (select * from ".MAIN_DB_PREFIX."facture) as f2 where f2.datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__'",
),
'accounting'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."accounting_bookkeeping where doc_date < '__DATE__'",
), ),
'proposal'=>array( 'proposal'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'propaldet', "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE fk_propal IN (select rowid FROM ".MAIN_DB_PREFIX."propal where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'propal', "DELETE FROM ".MAIN_DB_PREFIX."propal WHERE datec < '__DATE__'",
), ),
'supplier_proposal'=>array( "supplier_proposal"=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'supplier_proposaldet', "DELETE FROM ".MAIN_DB_PREFIX."supplier_proposaldet WHERE fk_supplier_proposal IN (select rowid FROM ".MAIN_DB_PREFIX."propal where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'supplier_proposal', "DELETE FROM ".MAIN_DB_PREFIX."supplier_proposal where datec < '__DATE__'",
),
'supplier_order'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet',
'DELETE FROM '.MAIN_DB_PREFIX.'commande_fournisseur',
),
'supplier_invoice'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det',
'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn',
),
'delivery'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'livraisondet',
'DELETE FROM '.MAIN_DB_PREFIX.'livraison',
),
'shipment'=>array(
'@delivery',
'DELETE FROM '.MAIN_DB_PREFIX.'expeditiondet_batch',
'DELETE FROM '.MAIN_DB_PREFIX.'expeditiondet_extrafields',
'DELETE FROM '.MAIN_DB_PREFIX.'expeditiondet',
'DELETE FROM '.MAIN_DB_PREFIX.'expedition_extrafields',
'DELETE FROM '.MAIN_DB_PREFIX.'expedition',
), ),
'order'=>array( 'order'=>array(
'@shipment', '@shipment',
'DELETE FROM '.MAIN_DB_PREFIX.'commandedet', "DELETE FROM ".MAIN_DB_PREFIX."commandedet WHERE fk_commande IN (select rowid FROM ".MAIN_DB_PREFIX."commande where date_creation < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'commande', "DELETE FROM ".MAIN_DB_PREFIX."commande where date_creation < '__DATE__'",
),
'supplier_order'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE fk_commande IN (select rowid FROM ".MAIN_DB_PREFIX."commande_fournisseur where date_creation < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur where date_creation < '__DATE__'",
),
'supplier_invoice'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."facture_fourn_det WHERE fk_facture_fourn IN (select rowid FROM ".MAIN_DB_PREFIX."facture_fourn where datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."facture_fourn where datec < '__DATE__'",
),
'shipment'=>array(
'@delivery',
"DELETE FROM ".MAIN_DB_PREFIX."expeditiondet_batch WHERE fk_expeditiondet IN (select rowid FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'))",
"DELETE FROM ".MAIN_DB_PREFIX."expeditiondet_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'))",
"DELETE FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."expedition_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'",
),
'delivery'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."livraisondet WHERE fk_livraison IN (select rowid FROM ".MAIN_DB_PREFIX."livraison where date_creation < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."livraison where date_creation < '__DATE__'",
),
'contract'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."contratdet_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."contratdet WHERE fk_contrat IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__'))",
"DELETE FROM ".MAIN_DB_PREFIX."contratdet WHERE fk_contrat IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."contrat_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."contrat WHERE datec < '__DATE__'",
), ),
'intervention'=>array( 'intervention'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'fichinterdet', "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet WHERE fk_fichinter IN (select rowid FROM ".MAIN_DB_PREFIX."fichinter where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'fichinter', "DELETE FROM ".MAIN_DB_PREFIX."fichinter where datec < '__DATE__'",
),
'stock'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."stock_mouvement WHERE datem < '__DATE__'",
), ),
'product'=>array( 'product'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'categorie_product', "DELETE FROM ".MAIN_DB_PREFIX."categorie_product WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'product_lang', "DELETE FROM ".MAIN_DB_PREFIX."product_lang WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'product_price', "DELETE FROM ".MAIN_DB_PREFIX."product_price_by_qty WHERE fk_product_price IN (select rowid FROM ".MAIN_DB_PREFIX."product_price where fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'))",
'DELETE FROM '.MAIN_DB_PREFIX.'product_fournisseur_price', "DELETE FROM ".MAIN_DB_PREFIX."product_price WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'product_batch', "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'product_stock', "DELETE FROM ".MAIN_DB_PREFIX."product_batch WHERE fk_product_stock IN (select rowid FROM ".MAIN_DB_PREFIX."product_stock where fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'))",
'DELETE FROM '.MAIN_DB_PREFIX.'product_lot', "DELETE FROM ".MAIN_DB_PREFIX."product_stock WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'product', "DELETE FROM ".MAIN_DB_PREFIX."product_lot WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'",
), ),
'project'=>array( 'project'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'projet_task_time', // TODO set fk_project to null on object that refer to project
'DELETE FROM '.MAIN_DB_PREFIX.'projet_task', "DELETE FROM ".MAIN_DB_PREFIX."projet_task_time WHERE fk_task IN (select rowid FROM ".MAIN_DB_PREFIX."projet_task WHERE fk_projet IN (select rowid FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__'))",
'DELETE FROM '.MAIN_DB_PREFIX.'projet', "DELETE FROM ".MAIN_DB_PREFIX."projet_task WHERE fk_projet IN (select rowid FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__'",
), ),
'contact'=>array( 'contact'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'categorie_contact', "DELETE FROM ".MAIN_DB_PREFIX."categorie_contact WHERE fk_socpeople IN (select rowid FROM ".MAIN_DB_PREFIX."socpeople where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'socpeople', "DELETE FROM ".MAIN_DB_PREFIX."socpeople where datec < '__DATE__'",
), ),
'thirdparty'=>array( 'thirdparty'=>array(
'@contact', '@contact',
'DELETE FROM '.MAIN_DB_PREFIX.'cabinetmed_cons', "DELETE FROM ".MAIN_DB_PREFIX."cabinetmed_cons WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')",
'UPDATE '.MAIN_DB_PREFIX.'adherent SET fk_soc = NULL', "UPDATE ".MAIN_DB_PREFIX."adherent SET fk_soc = NULL WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'categorie_fournisseur', "DELETE FROM ".MAIN_DB_PREFIX."categorie_fournisseur WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'categorie_societe', "DELETE FROM ".MAIN_DB_PREFIX."categorie_societe WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'societe_remise_except', "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'societe_rib', "DELETE FROM ".MAIN_DB_PREFIX."societe_rib WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'societe', "DELETE FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__'",
) )
); );
/* /*
* Main * Main
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".implode(',',$argv)); dol_syslog($script_file." launched with arg ".implode(',', $argv));
$mode = $argv[1]; $mode = $argv[1];
$option = $argv[2]; $option = $argv[2];
$date = $argv[3];
if (empty($mode) || ! in_array($mode,array('test','confirm'))) { if (empty($mode) || ! in_array($mode, array('test','confirm'))) {
print "Usage: $script_file (test|confirm) (all|option) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n"; print "\n";
print "option can be ".implode(',',array_keys($sqls))."\n"; print "option can be ".implode(',', array_keys($sqls))."\n";
exit(-1);
}
if (empty($option))
{
print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "option must be defined with a value in list ".implode(',', array_keys($sqls))."\n";
exit(-1);
}
if ($option != 'all')
{
$listofoptions=explode(',', $option);
foreach($listofoptions as $cursoroption)
{
if (! in_array($cursoroption, array_keys($sqls))) {
print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "option '".$cursoroption."' must be in list ".implode(',', array_keys($sqls))."\n";
exit(-1);
}
}
}
if (empty($date) || (! preg_match('/\d\d\d\d\-\d\d\-\d\d$/', $date) && $date != 'all')) {
print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "date can be 'all' or 'YYYY-MM-DD' to delete record before YYYY-MM-DD\n";
exit(-1); exit(-1);
} }
if (empty($option) || ! in_array($option, array_merge(array('all'),array_keys($sqls))) ) { if ($date == 'all') $date = '2199-01-01';
print "Usage: $script_file (test|confirm) (all|option) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "option can be ".implode(',',array_keys($sqls))."\n";
exit(-1);
}
// Replace database handler // Replace database handler
if (! empty($argv[3])) if (! empty($argv[4]))
{ {
$db->close(); $db->close();
unset($db); unset($db);
$db=getDoliDBInstance($argv[3], $argv[4], $argv[5], $argv[6], $argv[7], $argv[8]); $db=getDoliDBInstance($argv[4], $argv[5], $argv[6], $argv[7], $argv[8], $argv[9]);
$user=new User($db); $user=new User($db);
} }
//var_dump($user->db->database_name); //var_dump($user->db->database_name);
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'An admin user with login "admin" must exists to use this script.'."\n"; print 'An admin user with login "admin" must exists to use this script.'."\n";
@ -189,6 +233,7 @@ if (! $ret > 0)
print "Purge all data for this database:\n"; print "Purge all data for this database:\n";
print "Before = ".$date."\n";
print "Server = ".$db->database_host."\n"; print "Server = ".$db->database_host."\n";
print "Database name = ".$db->database_name."\n"; print "Database name = ".$db->database_name."\n";
print "Database port = ".$db->database_port."\n"; print "Database port = ".$db->database_port."\n";
@ -206,23 +251,27 @@ if (! $confirmed)
* Process sql requests of a family * Process sql requests of a family
* *
* @param string $family Name of family key of array $sqls * @param string $family Name of family key of array $sqls
* @param string $date Date value
* @return int -1 if KO, 1 if OK * @return int -1 if KO, 1 if OK
*/ */
function processfamily($family) function processfamily($family, $date)
{ {
global $db, $sqls; global $db, $sqls;
$error=0; $error=0;
foreach($sqls[$family] as $sql) foreach($sqls[$family] as $sql)
{ {
if (preg_match('/^@/',$sql)) if (preg_match('/^@/', $sql))
{ {
$newfamily=preg_replace('/@/','',$sql); $newfamily=preg_replace('/@/', '', $sql);
processfamily($newfamily); processfamily($newfamily, $date);
continue; continue;
} }
$sql = preg_replace('/__DATE__/', $date, $sql);
print "Run sql: ".$sql."\n"; print "Run sql: ".$sql."\n";
$resql=$db->query($sql); $resql=$db->query($sql);
if (! $resql) if (! $resql)
{ {
@ -247,25 +296,29 @@ function processfamily($family)
$db->begin(); $db->begin();
$oldfamily=''; $listofoptions=explode(',', $option);
foreach($sqls as $family => $familysql) foreach($listofoptions as $cursoroption)
{ {
if ($option && $option != 'all' && $option != $family) continue; $oldfamily='';
foreach($sqls as $family => $familysql)
if ($family != $oldfamily) print "Process action for family ".$family."\n";
$oldfamily = $family;
$result=processfamily($family);
if ($result < 0)
{ {
$error++; if ($cursoroption && $cursoroption != 'all' && $cursoroption != $family) continue;
break;
if ($family != $oldfamily) print "Process action for family ".$family."\n";
$oldfamily = $family;
$result=processfamily($family, $date);
if ($result < 0)
{
$error++;
break;
}
} }
} }
if ($error || $mode != 'confirm') if ($error || $mode != 'confirm')
{ {
print "Rollback any changes.\n"; print "\nRollback any changes.\n";
$db->rollback(); $db->rollback();
} }
else else
@ -275,4 +328,3 @@ else
} }
$db->close(); $db->close();

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Some files were not shown because too many files have changed in this diff Show More