forked from Wavyzz/dolibarr
Compare commits
214 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf57e7e88b | ||
|
|
a186e16568 | ||
|
|
52138372ce | ||
|
|
a27538f582 | ||
|
|
a621032643 | ||
|
|
32646cb7f4 | ||
|
|
74b67eb6c6 | ||
|
|
644f365455 | ||
|
|
667890247c | ||
|
|
c727bbb530 | ||
|
|
e2b5315e23 | ||
|
|
2462daf1ed | ||
|
|
9c7381601f | ||
|
|
35a25599e5 | ||
|
|
9bfeb5e424 | ||
|
|
973a2ede97 | ||
|
|
d3fc152001 | ||
|
|
e8fd551043 | ||
|
|
34b3113bb7 | ||
|
|
90854dc2bf | ||
|
|
b44ddaa696 | ||
|
|
d10f277bba | ||
|
|
03a9daa3e6 | ||
|
|
e5193f16cc | ||
|
|
9abde6c057 | ||
|
|
a52ae607ba | ||
|
|
6aa8ba8935 | ||
|
|
5ad7894849 | ||
|
|
2c1571c514 | ||
|
|
f782ac6654 | ||
|
|
1e54e695b2 | ||
|
|
f2eb3c1a55 | ||
|
|
41a970c90f | ||
|
|
3d9b2a1676 | ||
|
|
7be0e0da1c | ||
|
|
bb01ad7d9a | ||
|
|
c81c91755d | ||
|
|
cd2b9538c1 | ||
|
|
eeaa4f8205 | ||
|
|
380cae761a | ||
|
|
192510316b | ||
|
|
6f83c8c6f3 | ||
|
|
8213756c37 | ||
|
|
a254412c61 | ||
|
|
cc1a3080d0 | ||
|
|
b5f887b3e4 | ||
|
|
694357d48e | ||
|
|
c4f80b4e71 | ||
|
|
ece9f3037a | ||
|
|
8dd44246b0 | ||
|
|
76470c9548 | ||
|
|
19be5f662d | ||
|
|
3eebbc0b14 | ||
|
|
d27c0b31fc | ||
|
|
a1534955a1 | ||
|
|
79371f66b0 | ||
|
|
4569cb82b2 | ||
|
|
04d33f4594 | ||
|
|
af6e95aa79 | ||
|
|
5d942c9d1a | ||
|
|
cc57d3dbc1 | ||
|
|
87b187bded | ||
|
|
df0b20aad3 | ||
|
|
e085c3989a | ||
|
|
e67c208b57 | ||
|
|
e13038dc30 | ||
|
|
744b84cb09 | ||
|
|
5c3b0847c2 | ||
|
|
f1af7ca2f2 | ||
|
|
035bc32323 | ||
|
|
a70d45b3ab | ||
|
|
1574254dcf | ||
|
|
1c129fd3ea | ||
|
|
97575854d0 | ||
|
|
2e744a4517 | ||
|
|
1ad8700810 | ||
|
|
1c8c98ac0f | ||
|
|
92cb95a184 | ||
|
|
96c7a9f77c | ||
|
|
3ebdb89133 | ||
|
|
d819d427c3 | ||
|
|
db81b32a5d | ||
|
|
793e43c7c6 | ||
|
|
d9bac75a63 | ||
|
|
e4c1978e12 | ||
|
|
a0154503f4 | ||
|
|
a9c76f2e44 | ||
|
|
5b6133ad62 | ||
|
|
90c3c90864 | ||
|
|
cacff0c2d4 | ||
|
|
22f6d204a2 | ||
|
|
b110ca6ead | ||
|
|
400f6b244b | ||
|
|
cde290c78a | ||
|
|
b23b82bd6f | ||
|
|
7dfb369a98 | ||
|
|
265aeb76e6 | ||
|
|
5ee74d7c07 | ||
|
|
1541e20870 | ||
|
|
53709cf509 | ||
|
|
10e32c056e | ||
|
|
8728ad2eff | ||
|
|
5de6c193ff | ||
|
|
1f6e9a1a9e | ||
|
|
26c6908f66 | ||
|
|
08685cc6b0 | ||
|
|
7bdfc998bf | ||
|
|
76a0caf116 | ||
|
|
c57dc82eaa | ||
|
|
f16166c47c | ||
|
|
d82c1f34e0 | ||
|
|
0a72aed3d7 | ||
|
|
856b010a45 | ||
|
|
9d6ddced56 | ||
|
|
36ba158a8b | ||
|
|
140cca7596 | ||
|
|
a5b8d0cd4b | ||
|
|
d149596043 | ||
|
|
cf05f38e54 | ||
|
|
57ebcf94c0 | ||
|
|
826bde0656 | ||
|
|
d84d09556c | ||
|
|
7937a798b7 | ||
|
|
ce8312c744 | ||
|
|
cf4beafb68 | ||
|
|
9a72f147d1 | ||
|
|
f5343c55c3 | ||
|
|
1361abffe5 | ||
|
|
9d2fb782fa | ||
|
|
632147ad88 | ||
|
|
1129222064 | ||
|
|
7cb657c991 | ||
|
|
efb9d184e4 | ||
|
|
44d4ab6f9c | ||
|
|
8f96383186 | ||
|
|
db975bbcc2 | ||
|
|
23249751d5 | ||
|
|
7af883abc1 | ||
|
|
e365a14b5a | ||
|
|
e188855dca | ||
|
|
9aa5c94612 | ||
|
|
ba724204a4 | ||
|
|
8518c772fb | ||
|
|
33e40c12c8 | ||
|
|
19b9412c13 | ||
|
|
23749b57ec | ||
|
|
3959d12a39 | ||
|
|
dd8d4e9e98 | ||
|
|
9247bbcc1d | ||
|
|
01c6de1085 | ||
|
|
6d918ad1c7 | ||
|
|
ff696e0dad | ||
|
|
3dcd1aa05d | ||
|
|
8dfe4fe05f | ||
|
|
65d59405da | ||
|
|
0e2e8fe27f | ||
|
|
7232e38dbe | ||
|
|
f2c282305e | ||
|
|
54b81312b5 | ||
|
|
1336d3e791 | ||
|
|
eb8d7f92c3 | ||
|
|
c998abe54e | ||
|
|
181991ee47 | ||
|
|
c8bcd01a10 | ||
|
|
983e28691b | ||
|
|
29950a6afa | ||
|
|
00b617d17f | ||
|
|
fc0c4295bd | ||
|
|
17773f8414 | ||
|
|
e1af439a6d | ||
|
|
bd52613331 | ||
|
|
3875d26a2f | ||
|
|
db3d16f080 | ||
|
|
bc230dbfc2 | ||
|
|
371c75e76a | ||
|
|
3a32787f15 | ||
|
|
57052e2fba | ||
|
|
2da16ade6c | ||
|
|
68ac62d09c | ||
|
|
5910d10021 | ||
|
|
eba377cdf0 | ||
|
|
10f0434116 | ||
|
|
6d00097c89 | ||
|
|
fc4a16b356 | ||
|
|
d0508d557b | ||
|
|
422191def1 | ||
|
|
620d7109b5 | ||
|
|
332fa77d90 | ||
|
|
c3d539abff | ||
|
|
6abe6462e6 | ||
|
|
505517d142 | ||
|
|
1c43a83a8b | ||
|
|
571d130c3c | ||
|
|
88cd8fface | ||
|
|
87bb971d75 | ||
|
|
65c4a21898 | ||
|
|
9d89e48d15 | ||
|
|
68bc85124b | ||
|
|
456f25d57e | ||
|
|
74f3b98ea9 | ||
|
|
cd09099409 | ||
|
|
d09d036f06 | ||
|
|
b28180d759 | ||
|
|
a0378549b8 | ||
|
|
bdf8c3ddc6 | ||
|
|
35e48f3a27 | ||
|
|
9d285ea232 | ||
|
|
35ebaf7b79 | ||
|
|
16c290f735 | ||
|
|
f88abb9a6f | ||
|
|
0d467972cd | ||
|
|
08f21e3fc4 | ||
|
|
9d234a8541 | ||
|
|
ca6dd8850a |
13
.gitattributes
vendored
13
.gitattributes
vendored
@@ -11,31 +11,26 @@
|
||||
*.htm text eol=lf
|
||||
*.html text eol=lf
|
||||
*.js text eol=lf
|
||||
*.json text eol=lf
|
||||
*.css text eol=lf
|
||||
*.lang text eol=lf
|
||||
*.txt text eol=lf
|
||||
*.md text eol=lf
|
||||
*.pp text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.yml text eol=lf
|
||||
*.yaml text eol=lf
|
||||
*.conf text eol=lf
|
||||
|
||||
.bash_aliases text eol=lf
|
||||
|
||||
# Denote all files that are truly binary and should not be modified.
|
||||
*.bmp binary
|
||||
*.frm binary
|
||||
*.ico binary
|
||||
*.jpeg binary
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.odt binary
|
||||
*.odf binary
|
||||
*.frm binary
|
||||
*.MYD binary
|
||||
*.MYI binary
|
||||
*.odf binary
|
||||
*.odt binary
|
||||
*.png binary
|
||||
|
||||
|
||||
# Export ignores to generate clean production tarballs
|
||||
/build export-ignore
|
||||
|
||||
6
.github/CODE_OF_CONDUCT.md
vendored
6
.github/CODE_OF_CONDUCT.md
vendored
@@ -77,8 +77,8 @@ contact@dolibarr.org
|
||||
|
||||
## 10. License and attribution
|
||||
|
||||
This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](https://creativecommons.org/licenses/by-sa/3.0/).
|
||||
This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
|
||||
|
||||
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](https://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
|
||||
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
|
||||
|
||||
Retrieved on November 22, 2016 from [https://citizencodeofconduct.org/](http://citizencodeofconduct.org/)
|
||||
Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/)
|
||||
|
||||
14
.github/CONTRIBUTING.md
vendored
14
.github/CONTRIBUTING.md
vendored
@@ -4,17 +4,14 @@ How to contribute to Dolibarr
|
||||
Bug reports and feature requests
|
||||
--------------------------------
|
||||
|
||||
<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.
|
||||
<a name="not-a-support-forum"></a>*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](https://www.dolibarr.org/forum).
|
||||
|
||||
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
|
||||
Default **language here is english**. So please prepare your contributions in english.
|
||||
|
||||
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
|
||||
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
|
||||
3. Tell us the version you are using! (look at /htdocs/admin/system/dolibarr.php? and check if you are using the latest version)
|
||||
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible).
|
||||
5. Delete unnecessary submissions.
|
||||
6. **Check your Message at Preview before sending.**
|
||||
4. Tell us the version you are using!
|
||||
3. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible).
|
||||
|
||||
|
||||
|
||||
@@ -29,8 +26,7 @@ Default **language here is english**. So please prepare your contributions in en
|
||||
4. Commit and push your changes.
|
||||
5. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
|
||||
|
||||
<span id="branches" name="branches"></span>
|
||||
### Branches
|
||||
### <a name="branches"></a>Branches
|
||||
|
||||
Unless you're fixing a bug, all pull requests should be made against the *develop* branch.
|
||||
|
||||
@@ -145,7 +141,7 @@ 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 retrieve 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.
|
||||
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.
|
||||
|
||||
|
||||
### Resources
|
||||
|
||||
17
.github/workflows/exakat.yml
vendored
17
.github/workflows/exakat.yml
vendored
@@ -1,17 +0,0 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: "Exakat analysis"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 20 * * *"
|
||||
|
||||
jobs:
|
||||
exakat:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Exakat
|
||||
uses: docker://exakat/exakat-ga
|
||||
with:
|
||||
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
|
||||
ignore_dirs: '/htdocs/includes,/build,/dev,/doc,/scripts,/test'
|
||||
6
.github/workflows/stale-issues-safe.yml
vendored
6
.github/workflows/stale-issues-safe.yml
vendored
@@ -14,11 +14,11 @@ jobs:
|
||||
- uses: Dolibarr/stale@staleunstale
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).'
|
||||
stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days (you should still be able to re-open it if required).'
|
||||
stale-label: 'Issue Stale (automatic label)'
|
||||
exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,hacktoberfest,hacktoberfest-accepted,good first issue,Bug Security (CVE),Analysis of PR in progress'
|
||||
exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,Hacktoberfest,good first issue,Bug Security (CVE),Analysis of PR in progres'
|
||||
days-before-stale: 365
|
||||
days-before-close: 10
|
||||
days-before-close: 15
|
||||
operations-per-run: 100
|
||||
dry-run: false
|
||||
|
||||
15
.gitignore
vendored
15
.gitignore
vendored
@@ -37,21 +37,8 @@ htdocs/includes/jakub-onderka/
|
||||
htdocs/includes/phpdocumentor/
|
||||
htdocs/includes/phpspec/
|
||||
htdocs/includes/phpunit/
|
||||
htdocs/includes/php-parallel-lint/
|
||||
htdocs/includes/sebastian/
|
||||
htdocs/includes/squizlabs/
|
||||
htdocs/includes/symfony/
|
||||
htdocs/includes/webmozart/
|
||||
htdocs/.well-known/apple-developer-merchantid-domain-association
|
||||
|
||||
# Node Modules
|
||||
build/yarn-error.log
|
||||
build/node_modules/
|
||||
node_modules/
|
||||
|
||||
#yarn
|
||||
yarn.lock
|
||||
|
||||
#package-lock
|
||||
package-lock.json
|
||||
|
||||
doc/install.lock
|
||||
|
||||
@@ -17,10 +17,8 @@ filter:
|
||||
- build/*
|
||||
- dev/*
|
||||
- doc/*
|
||||
- documents/*
|
||||
- htdocs/includes/*
|
||||
- node_modules/*
|
||||
- test/*
|
||||
- htdocs/includes/*
|
||||
paths:
|
||||
- htdocs/*
|
||||
- scripts/*
|
||||
|
||||
97
.travis.yml
97
.travis.yml
@@ -1,6 +1,6 @@
|
||||
# This script is used by Travis CI to run automatically Continuous test integration
|
||||
# from Dolibarr GitHub repository.
|
||||
# For syntax, see https://docs.travis-ci.com/user/languages/php/
|
||||
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
|
||||
|
||||
# We use dist: xenial to have php 5.6+ available
|
||||
os: linux
|
||||
@@ -9,9 +9,6 @@ dist: xenial
|
||||
|
||||
language: php
|
||||
|
||||
git:
|
||||
depth: 1
|
||||
|
||||
# Start on every boot
|
||||
services:
|
||||
- memcached
|
||||
@@ -41,23 +38,16 @@ env:
|
||||
|
||||
jobs:
|
||||
fast_finish: true
|
||||
#allow_failures:
|
||||
#- php: nightly
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
include:
|
||||
- stage: PHP 5.6-7.4
|
||||
if: type = push
|
||||
- if: type = push
|
||||
php: '5.6'
|
||||
env: DB=postgresql
|
||||
- stage: PHP 5.6-7.4
|
||||
if: type = pull_request OR type = push
|
||||
- if: type = pull_request OR type = push
|
||||
php: '7.4'
|
||||
env: DB=mysql
|
||||
- stage: PHP Dev
|
||||
if: type = push AND branch = develop
|
||||
php: nightly
|
||||
env: DB=mysql
|
||||
- stage: PHP Dev
|
||||
if: type = push AND branch = 14.0
|
||||
- if: type = push AND branch = develop
|
||||
php: nightly
|
||||
env: DB=mysql
|
||||
|
||||
@@ -80,6 +70,13 @@ before_install:
|
||||
phpenv config-rm xdebug.ini
|
||||
echo
|
||||
|
||||
- |
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo "Check pgloader version"
|
||||
pgloader --version
|
||||
echo
|
||||
fi
|
||||
|
||||
install:
|
||||
- |
|
||||
echo "Updating Composer"
|
||||
@@ -93,30 +90,24 @@ install:
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer - for $TRAVIS_PHP_VERSION"
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ]; then
|
||||
echo "Installing Composer dependencies (PHP Unit, Parallel Lint & PHP CodeSniffer"
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then
|
||||
composer -n require phpunit/phpunit ^4 \
|
||||
jakub-onderka/php-parallel-lint ^0 \
|
||||
jakub-onderka/php-console-highlighter ^0 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$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' ]; then
|
||||
composer -n require phpunit/phpunit ^5 \
|
||||
php-parallel-lint/php-parallel-lint ^1 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
jakub-onderka/php-parallel-lint ^0 \
|
||||
jakub-onderka/php-console-highlighter ^0 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
|
||||
composer -n require phpunit/phpunit ^6 \
|
||||
php-parallel-lint/php-parallel-lint ^1 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then
|
||||
composer -n require phpunit/phpunit ^7 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
# phpunit 9 is required for php 8
|
||||
if [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^7 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^5 \
|
||||
jakub-onderka/php-parallel-lint ^0 \
|
||||
jakub-onderka/php-console-highlighter ^0 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
echo
|
||||
@@ -178,10 +169,6 @@ before_script:
|
||||
mysql --version | head -
|
||||
mysql -e "SELECT VERSION();" | head -
|
||||
psql --version
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo "Check pgloader version"
|
||||
pgloader --version
|
||||
fi
|
||||
echo
|
||||
|
||||
- |
|
||||
@@ -271,27 +258,20 @@ script:
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking PHP syntax errors (only 1 version to not overload travis and avoid duplicate tests)"
|
||||
echo "Checking PHP syntax errors"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
#parallel-lint --exclude htdocs/includes --blame .
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
if [ "$TRAVIS_PHP_VERSION" = "7.4" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --blame .
|
||||
fi
|
||||
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes --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
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking coding style (only for Pull Requests builds and 1 version to not overload travis and avoid duplicate tests)"
|
||||
echo "Checking coding style (excluding Pull Requests builds to not overload travis, excluding also some jobs to avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4" ]; then
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4" ] && [ "$DB" = "mysql" ]; 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
|
||||
@@ -405,22 +385,9 @@ script:
|
||||
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
|
||||
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log
|
||||
php upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log
|
||||
php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log
|
||||
php upgrade.php 13.0.0 14.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade13001400.log
|
||||
php upgrade2.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-2.log
|
||||
php step5.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-3.log
|
||||
ls -alrt $TRAVIS_BUILD_DIR/
|
||||
|
||||
- |
|
||||
echo "Enabling new modules"
|
||||
# Enable modules not enabled into original dump
|
||||
set -e
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_PRODUCTBATCH,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_STRIPE,MAIN_MODULE_EXPENSEREPORT > $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KNOWLEDGEMANAGEMENT,MAIN_MODULE_EVENTORGANIZATION,MAIN_MODULE_PARTNERSHIP >> $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 $?
|
||||
cd -
|
||||
set +e
|
||||
|
||||
30
.tx/config
30
.tx/config
@@ -128,12 +128,6 @@ source_file = htdocs/langs/en_US/errors.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.eventorganization]
|
||||
file_filter = htdocs/langs/<lang>/eventorganization.lang
|
||||
source_file = htdocs/langs/en_US/eventorganization.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.exports]
|
||||
file_filter = htdocs/langs/<lang>/exports.lang
|
||||
source_file = htdocs/langs/en_US/exports.lang
|
||||
@@ -170,12 +164,6 @@ source_file = htdocs/langs/en_US/hrm.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.intracommreport]
|
||||
file_filter = htdocs/langs/<lang>/intracommreport.lang
|
||||
source_file = htdocs/langs/en_US/intracommreport.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.install]
|
||||
file_filter = htdocs/langs/<lang>/install.lang
|
||||
source_file = htdocs/langs/en_US/install.lang
|
||||
@@ -188,12 +176,6 @@ source_file = htdocs/langs/en_US/interventions.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.knowledgemanagement]
|
||||
file_filter = htdocs/langs/<lang>/knowledgemanagement.lang
|
||||
source_file = htdocs/langs/en_US/knowledgemanagement.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.languages-not-res]
|
||||
file_filter = htdocs/langs/<lang>/languages.lang
|
||||
source_file = htdocs/langs/en_US/languages.lang
|
||||
@@ -290,12 +272,6 @@ source_file = htdocs/langs/en_US/other.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.partnership]
|
||||
file_filter = htdocs/langs/<lang>/partnership.lang
|
||||
source_file = htdocs/langs/en_US/partnership.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.paybox]
|
||||
file_filter = htdocs/langs/<lang>/paybox.lang
|
||||
source_file = htdocs/langs/en_US/paybox.lang
|
||||
@@ -350,12 +326,6 @@ source_file = htdocs/langs/en_US/receptions.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.recruitment]
|
||||
file_filter = htdocs/langs/<lang>/recruitment.lang
|
||||
source_file = htdocs/langs/en_US/recruitment.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.resource]
|
||||
file_filter = htdocs/langs/<lang>/resource.lang
|
||||
source_file = htdocs/langs/en_US/resource.lang
|
||||
|
||||
2
COPYING
2
COPYING
@@ -1,7 +1,7 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
60
COPYRIGHT
60
COPYRIGHT
@@ -1,83 +1,73 @@
|
||||
|
||||
Copyright and license
|
||||
----------------------
|
||||
License
|
||||
-------
|
||||
|
||||
The Dolibarr software as a whole is distributed under 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+). More information: https://www.gnu.org/licenses/gpl-3.0.txt.
|
||||
A copy of this license is available in the COPYING file.
|
||||
Dolibarr depends on third-party components and code snippets released under their own license (obviously, all compatible with the one of Dolibarr).
|
||||
These dependencies are listed in the bottom of this file.
|
||||
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+).
|
||||
More information: https://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
|
||||
The Dolibarr images resources (available in the doc directory) is distributed under the Creative Commons Attribution 4.0 International license (CC BY 4.0).
|
||||
|
||||
|
||||
The name Dolibarr is a trademark initially registered by Laurent Destailleur and ceased to the Dolibarr foundation. You can use the name Dolibarr
|
||||
for your own need as long as you follow the rules defined on the page https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22
|
||||
The use of the name DoliStore is also restricted to the same rules defined on https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22
|
||||
|
||||
|
||||
|
||||
Licence of dependencies of third-party components used by Dolibarr (all compatible with the Licence of Dolibarr):
|
||||
Dolibarr uses some external libraries released under different licenses. This is compatibility summary:
|
||||
|
||||
Component Version License GPL Compatible Usage
|
||||
-------------------------------------------------------------------------------------
|
||||
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)
|
||||
CKEditor 4.12.1 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||
Escpos-php 2.2 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
GeoIP2 0.2.0 Apache License 2.0 Yes Lib to make geoip convert
|
||||
GeoIP2 0.2.0 LGPL-2.1+ Yes Lib to make geoip convert
|
||||
Mobiledetect 2.8.34 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
|
||||
ParseDown 1.6 MIT License Yes Markdown parser
|
||||
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
|
||||
PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers
|
||||
PHPSpreadSheet 1.8.2 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
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
|
||||
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
|
||||
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
PSR/Logs 1.0 Library for logs (used by DebugBar)
|
||||
PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet)
|
||||
Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
|
||||
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)
|
||||
Sabre 3.2.2 BSD Yes DAV support
|
||||
Swift Mailer 5.4.2-DEV MIT License Yes Comprehensive mailing tools for PHP
|
||||
Stripe 7.67.0 MIT Licence Yes Library for Stripe module
|
||||
Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP
|
||||
Stripe 6.43.1 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:
|
||||
Ace 1.4.8 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
ChartJS 2.9.4 MIT License Yes JS library for graph
|
||||
jQuery 3.5.1 MIT License Yes JS library
|
||||
ChartJS 2.9.3 MIT License Yes JS library for graph
|
||||
jQuery 3.4.1 MIT License Yes JS library
|
||||
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
|
||||
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css
|
||||
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
|
||||
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
||||
jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images)
|
||||
jQuery Jeditable 1.7.1 GPL and MIT License Yes JS library plugin jeditable (to edit in place)
|
||||
jQuery jNotify 1.1.00 Apache License 2.0 Yes JS library plugin jNotify (to use ajax popups)
|
||||
jQuery jNotify 1.1.00 Apache Software License 2.0 Yes JS library plugin jNotify (to use ajax popups)
|
||||
jQuery jPicker 1.1.6 GPL and MIT License Yes JS library for color picker with not defined list of colors
|
||||
jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes JS library for filetree
|
||||
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for filetree
|
||||
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
|
||||
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
|
||||
jsGanttImproved 2.7.3 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
|
||||
SwaggerUI 2.2.10 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
|
||||
|
||||
Image libraries:
|
||||
Octicons 8.1 MIT Yes
|
||||
|
||||
Font libraries:
|
||||
Fontawesome 5.13 Font Awesome Free Licence Yes
|
||||
Fontawesome 5.13 Font Awesome Free licence Yes
|
||||
|
||||
|
||||
For more licenses compatibility informations: https://www.gnu.org/licenses/licenses.en.html
|
||||
For licenses compatibility informations:
|
||||
https://www.gnu.org/licenses/licenses.en.html
|
||||
|
||||
|
||||
Authors
|
||||
Copyright / Authors
|
||||
-------------------
|
||||
|
||||
See page https://github.com/Dolibarr/dolibarr/graphs/contributors
|
||||
|
||||
742
ChangeLog
742
ChangeLog
@@ -2,711 +2,6 @@
|
||||
English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
***** ChangeLog for 14.0.1 compared to 14.0.0 *****
|
||||
|
||||
FIX: $conf->task used but it does not exist, use $conf->projet instead
|
||||
FIX: #18181
|
||||
FIX: #18212 : Add url field
|
||||
FIX: #18267
|
||||
FIX: #18289 #18294
|
||||
FIX: #18341 lang not loaded
|
||||
FIX: #18389 Accountancy - Bug on LDcompta10 export for supplier invoice
|
||||
FIX: #18399 Fix shipment validation email template override.
|
||||
FIX: Accountancy - Debug Export Sage50 / CIEL Compta / CIEL Compta Evo (Format XIMPORT)
|
||||
FIX: Accountancy - Rules to delete & modify transaction not applied in ledger & subledger
|
||||
FIX: Accountancy - Search date on journal
|
||||
FIX: Accountancy - SQL error on select journal on journal
|
||||
FIX: Accountancy - SQL error when insert a manuel transaction
|
||||
FIX: add include missing file '/core/actions_dellink.inc.php' in project card
|
||||
FIX: avoid to have link to create bookmark on page to create bookmark
|
||||
FIX: bad approver shown on holiday once approved
|
||||
FIX: bad closing div on error message
|
||||
FIX: cannot add time spentd when column ref is not displayed
|
||||
FIX: Can't remove a permission of a group
|
||||
FIX: Can't set cost price when product is not on purchase
|
||||
FIX: compatibility postgresql
|
||||
FIX: filter on status Draft in modulebuilder
|
||||
FIX: holiday card: hooks uninitialized
|
||||
FIX: Invoice - Missing button to reopen an abandoned situation invoice
|
||||
FIX: Link of download main doc on vat list
|
||||
FIX: look and field v14
|
||||
FIX: Missing column Date validation in ledger & subledger
|
||||
FIX: on admin/pdf.php (with javascript enabled) if you set some boolean confs then click on "save", all boolean values are reset
|
||||
FIX: on supplier order, JOIN with product fourn price table must be done with fk_soc too to avoid display several times a same line (because of same supplier product ref)
|
||||
FIX: postgresql filter select search extrafield
|
||||
FIX: shipping validation workflow: 'ORDER_NEW' trigger called from wrong object
|
||||
FIX: show info of company into user dropdown
|
||||
FIX: totalDayAll hours in tasks
|
||||
FIX: update product lot
|
||||
FIX: using Tulip, deposit mask was not saved
|
||||
FIX: #yogosha6907
|
||||
|
||||
|
||||
***** ChangeLog for 14.0.0 compared to 13.0.0 *****
|
||||
|
||||
For users:
|
||||
----------
|
||||
NEW: Module Recruitment to follow application to job positions is now stable.
|
||||
NEW: Feature to make Stock Inventories
|
||||
NEW: Several security issues after a second private bug hunting campaign.
|
||||
NEW: A lot of fix into english text after a small proofreading campaign (still not perfect, but really better)
|
||||
NEW: All main menu entries are using the picto of the module
|
||||
NEW: Add a copy to clipboard button on some fields
|
||||
NEW: Add an example of scheduled job to send email reminder for unpaid invoices
|
||||
NEW: Add some color and picto for the direction of movement
|
||||
NEW: add the column "Channel" into the list of orders
|
||||
NEW: Add the column "alias" of company in the list of proposal, order, invoice
|
||||
NEW: Add the column "Office phone" and "User mobile" in user list
|
||||
NEW: Add the column "Price level" in thirdparty list
|
||||
NEW: Add some company information in the dropdown login menu
|
||||
NEW: Add edit/delete action icons on categories list pages
|
||||
NEW: Add hidden option to auto load input line extrafield into new lines
|
||||
NEW: Add import profile to import BOM
|
||||
NEW: Add link picto to the stock movement on the detail of production
|
||||
NEW: Add mass action "Set tag" for product/service, user, thirdparty, warehouse, project, bank account, members
|
||||
NEW: Add bulk action Validate and Set to billed on order list.
|
||||
NEW: Add possibility to exports userGroups fields on user exports
|
||||
NEW: Can search on lots or serials into the quick search bar
|
||||
NEW: Add support for Friday as a non working day
|
||||
NEW: auto notification with module Notification can use templated emails
|
||||
NEW: Can clone a cron job
|
||||
NEW: Can create a lot from the list view (Look and feel standardization).
|
||||
NEW: Can filter on extrafields date on lists
|
||||
NEW: Can filter on rowid in list of blocked logs
|
||||
NEW: Can hide columns "time consumed" on timesheet per week
|
||||
NEW: Can set an employee on each social contribution
|
||||
NEW: Can set order of execution of hooks
|
||||
NEW: Can toggle FCKeditor on public/private notes
|
||||
NEW: Check update availability for externals modules using a button on module page
|
||||
NEW: Choose lines to use while creating intervention card from origin
|
||||
NEW: Columns shipment method, payment mode, payment term in proposal and order list
|
||||
NEW: Conf for default actioncomm status
|
||||
NEW: Dictionary for availability - Add a column position
|
||||
NEW: Can set a user related to a social contribution
|
||||
NEW: ICS Direct debit can be set with a different value for each bank account
|
||||
NEW: LDAP: usergroup search can be filtered
|
||||
NEW: Make public bookmarks editable by admin users only
|
||||
NEW: If main logo not defined, can use the squarred logo on login page
|
||||
NEW: The manifest file can use the squared image if available
|
||||
NEW: Enhance the multicurrency rate editor
|
||||
NEW: Normalise Type company field with ajax combobox
|
||||
NEW: preload product description on selection for customer propal/order/invoice
|
||||
NEW: Search usergroups & resources
|
||||
NEW: Setup Page for module creation with module builder enhancement #FoundationFunding
|
||||
NEW: Show picto of module into the list of dictionaries
|
||||
NEW: Show the total of payment on the payment confirmation page
|
||||
NEW: The global setup for Mandatory fields can now be done on combo list too.
|
||||
NEW: translate in "en_US" to complete PR 16980
|
||||
NEW: Update the list of taxes available by default for France
|
||||
NEW: Salary payment request and Salary payment are 2 different steps in workflow on Salary payment recording
|
||||
NEW: VAT payment request and VAT payment are now 2 different steps in workflow on VAT payment recording
|
||||
NEW: VAT report - Optimisation & collapse by rate
|
||||
NEW: When a doc file is shared, link is visible from the main page of doc.
|
||||
NEW: #16378 more E-Mail Contact substitution Values for better salutation
|
||||
NEW: option to keep the "Automatically create the payment" checkbox empty on the tax creation page
|
||||
|
||||
Accountancy
|
||||
NEW: Add FEC import
|
||||
NEW: Add a confirmation form with options on export (for notified export and validate operations)
|
||||
NEW: Add select date from/to in already bind customer and supplier list
|
||||
NEW: FEC / FEC2 export - Add new field DateLimitReglmt
|
||||
NEW: In ledger & journals, show link on bank transaction
|
||||
NEW: Possibility to filter on journals in balance
|
||||
NEW: Add a page to list subledger accounts
|
||||
NEW: Multiselect journal code filter on journal / balance / ledger
|
||||
NEW: Add first step to close fiscal year
|
||||
|
||||
Agenda
|
||||
NEW: add support for Friday as a non working day
|
||||
NEW: can show the leave dates/holidays on the agenda view
|
||||
NEW: Support color for types of event
|
||||
|
||||
Bank
|
||||
NEW: Bank Entries : display user linked to a salary or a taxes
|
||||
NEW: Add bulk actions for Bank Transfer
|
||||
|
||||
ECM/GED
|
||||
NEW: add DB fields note_public and note_private for ECM module
|
||||
NEW: can filter files in ECM/GED on status Shared / Not shared
|
||||
|
||||
Invoices
|
||||
NEW: add a check to avoid an invoice date in the future
|
||||
NEW: add the total of margin in invoice list
|
||||
NEW: can set a percentage when creating an invoice from another object
|
||||
NEW: Support down payment on supplier invoice (& some adjustments)
|
||||
|
||||
Margin
|
||||
NEW: add the total of margin in invoice list
|
||||
NEW: add the total of margin in page by user
|
||||
|
||||
Members
|
||||
NEW: #17292 default subscription amount by adherent type
|
||||
NEW: option to automatically create a login/user when a new subscription of a member is done online
|
||||
NEW: option to select membership type on the online payment page for membership subscription or renewal
|
||||
|
||||
Products
|
||||
NEW: Add price min and price min including tax into product export
|
||||
NEW: Add a ref in product customer price
|
||||
NEW: customer ref for product customer prices
|
||||
NEW: Set status of all variants when changing status of parent
|
||||
|
||||
Projects/Tasks
|
||||
NEW: option to automatically close an open project when all its tasks are done (=progress 100%)
|
||||
NEW: can show the project ref into PDF documents
|
||||
NEW: when we add contacts/users to a project, ask to also affect them on tasks
|
||||
NEW: Can hide columns "time consumed" on timesheet per week
|
||||
|
||||
Proposals
|
||||
NEW: add bulk action to set a commercial proposal to status "Refused"
|
||||
NEW: can set a warehouse in a proposal
|
||||
NEW: date and user signature on proposal (Issue 16062) #16980
|
||||
|
||||
Shipment
|
||||
NEW: add option in Workflow module to set a shipment as closed
|
||||
|
||||
TakePOS
|
||||
NEW: delayed payment in TakePOS #14456?
|
||||
NEW: display date range if exist in TakePOS
|
||||
NEW: display resiliate status in TakePOS for member
|
||||
NEW: edit sales lines rights in TakePOS
|
||||
NEW: option for TakePOS to show the total price without tax
|
||||
NEW: more permissions in TakePOS (can edit added line, can modify once order sent to kitchen)
|
||||
|
||||
Third Party / Contacts
|
||||
NEW: add contact tag and bulk email status on the thirdparty + contact create form
|
||||
NEW: can set a warehouse on a thirdparty
|
||||
|
||||
Tickets
|
||||
NEW: can use captcha on public page to create a ticket #16347
|
||||
NEW: can set if a ticket group is visible on public interface or not
|
||||
|
||||
Warehouse/Stock
|
||||
NEW: Feature to make Stock Inventories
|
||||
NEW: can make massive stock transfers from a CSV file
|
||||
NEW: Stock movement list - add more complete date field
|
||||
NEW: can set a warehouse in a proposal
|
||||
NEW: can set a warehouse on a thirdparty
|
||||
|
||||
Website Module
|
||||
NEW: #17113 Can upload a favicon in website module
|
||||
NEW: add a new permission "Export website"
|
||||
NEW: add last date of modification for website pages in the list of pages
|
||||
NEW: Save old page with .old extension on disk when editing a website page
|
||||
|
||||
Workflows
|
||||
NEW: add option in Workflow module to set a shipment as closed
|
||||
|
||||
|
||||
for Admins
|
||||
NEW: Add a security center page with all information and advices related to the security of your instance
|
||||
NEW: Add a performance center page with all information and advices related to the performance of your instance
|
||||
|
||||
Modules
|
||||
NEW: Module Recruitment is now stable
|
||||
NEW: start new experimental module Event Organization Management
|
||||
NEW: start new experimental module Partnership Management
|
||||
NEW: start new experimental module Knowledge Management
|
||||
NEW: start new experimental module Workstations Management
|
||||
NEW: Check update availability for externals modules using a button on module page
|
||||
Module SimplePOS is deprecated - TakePOS is recommended for the future
|
||||
|
||||
new Options
|
||||
NEW: add option CONTRACT_ALLOW_EXTERNAL_DOWNLOAD to make generated doc automatically shared
|
||||
NEW: add option SUPPLIER_PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD to make generated doc automatically shared
|
||||
NEW: add option MAIN_SECURITY_ANTI_SSRF_SERVER_IP to define list of IPs that are local IPs
|
||||
NEW: add option SOCIETE_DISABLE_WORKFORCE to hide staff field
|
||||
NEW: add constant MAIN_BUGTRACK_URL to set a custom url to redirect to when clicking on link "declare a bug"
|
||||
NEW: add constant ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY to manage binding with accountancy account declared on thirdparty card
|
||||
NEW: add constant MAIN_PRODUCT_PERENTITY_SHARED to manage some informations (Accounting account) when product is shared on several entities
|
||||
NEW: add constant MAIN_COMPANY_PERENTITY_SHARED to manage some informations (Accounting account) when company is shared on several entities
|
||||
|
||||
|
||||
For developers:
|
||||
---------------
|
||||
NEW: Can edit an object property in module builder
|
||||
NEW: Add data-eec=1 for EEC countries on select for js interaction
|
||||
NEW: Add experimental repair script to switch to dynamic row format and utf8mb4 encoding
|
||||
NEW: Add function showValueWithClipboardCPButton() to add a copy/paste
|
||||
NEW: Upgrade Stripe PHP lib to 7.67.0
|
||||
NEW: Support sepa_debit in stripe paymentmethods list
|
||||
NEW: Update doleditor.class.php for easily activate SCAYT
|
||||
NEW: Add triggers in the function add_object_linked(), updateObjectLinked() and deleteObjectLinked()
|
||||
NEW: Add triggers OBJECT_LINK_INSERT, OBJECT_LINK_UPDATE et OBJECT_LINK_DELETE in the function add_object_linked(), updateObjectLinked() and deleteObjectLinked()
|
||||
NEW: can set a target image in dolcropresize function
|
||||
NEW: can set a label as placeholder for combo lists
|
||||
NEW: Add pagination on Get Products response API
|
||||
NEW: Add the DefaultValues CRUD class
|
||||
NEW: Extrafields of documents lines are inside the lines, not any more on separate TR
|
||||
NEW: unit selection on object edit line
|
||||
|
||||
APIs
|
||||
NEW: API add option $includeifobjectisused to get a product
|
||||
NEW: API get the list of product ids only
|
||||
NEW: add link to OpenAPI specifications XML file in REST API module setup: swagger.json file can be included into external tools like redoc
|
||||
NEW: add native compression in REST APIs
|
||||
NEW: Product Variants API, add variant stock to response by parameter
|
||||
NEW: Product API route added to get product stock and product with or without variants #13739 #17390
|
||||
|
||||
Hooks
|
||||
NEW: hook printFieldListTitle for cabyprodserv.php
|
||||
NEW: hook to allow external modules to add their own shortlist of recent objects
|
||||
NEW: SQL-altering hooks in the turnover by product report
|
||||
NEW: add form confirm hook on company card
|
||||
NEW: add hook addSectionECMAuto method to add custom directory into ECM auto files
|
||||
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* Module SimplePOS is deprecated. If you need a POS module, please use the module TakePOS.
|
||||
* The ICS value for direct debit or credit transfer is now stored on each bank account instead of into the global setup.
|
||||
* API /setup/shipment_methods has been replaced with API /setup/shipping_methods
|
||||
* Field "total" renamed into "total_ht" for table llx_facture, llx_facture_rec for better field name consistency
|
||||
* Field "tva" renamed into "total_tva" for table llx_propal, llx_supplier_proposal, llx_commande, llx_commande_fournisseur for better field name consistency
|
||||
* Field "total" renamed into "total_ttc" for table llx_propal, llx_supplier_proposal for better field name consistency
|
||||
* If your database is PostgreSQL, you must use version 9.1.0 or more (Dolibarr need the SQL function CONCAT)
|
||||
* If your database is MySQL or MariaDB, you need at least version 5.1
|
||||
* Function set_price_level() has been renamed into setPriceLevel() to follow camelcase rules
|
||||
* Removed deprecated substitution key __REFCLIENT__ (replaced with __REF_CLIENT__)
|
||||
* Removed constant MAIN_COUNTRIES_IN_EEC. You can now set if country is in Europe or not from the dictionary of countries.
|
||||
* v14 seems to work correctly on PHP v8 but it generates a lot of verbose warnings. Currently, v14 i snot yet officialy supported with PHP 8.
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.4 compared to 13.0.3 *****
|
||||
|
||||
FIX: Allow disabling of a module (not a dangerous action) even if there is problem with token (due to bugged modules).
|
||||
FIX: 13.0 - fatal - missing inclusion of ajax.lib.php for calling `ajax_autocompleter()`
|
||||
FIX: #17919 pictures in docs.
|
||||
FIX: #18006
|
||||
FIX: Accountancy - if we define a date start, automatic binding try to continue to solve old binding
|
||||
FIX: Accoutancy Limit date payment not registered on purchases operations
|
||||
FIX: Can't edit replacement invoice
|
||||
FIX: deposit can create credit note in payment conf
|
||||
FIX: division by zero on create
|
||||
FIX: holiday: balances not updated correctly with pgsql because of case sensitivity field
|
||||
FIX: holiday: status filter parameter has been renamed but not in links it was used
|
||||
FIX: List and Create Companies Left Menus
|
||||
FIX: method exists
|
||||
FIX: need to add payment sum to getlibstatus function in object linked block
|
||||
FIX: permission to close a proposal when using advanced permissions
|
||||
FIX: Problem of z-index with popup and top menu
|
||||
FIX: same thing on supplier orders
|
||||
FIX: Status of invoice when making a replacement invoice
|
||||
FIX: update contact birthday alert
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.3 compared to 13.0.2 *****
|
||||
|
||||
FIX: 13.0 warning - missing quotes around 'label'
|
||||
FIX: #16143 Old PG requires "()" on DROP FUNCTION
|
||||
FIX: #16843
|
||||
FIX: #17060
|
||||
FIX: #17192 - With tz < 0, event is show in bad day on calendar views
|
||||
FIX: #17363
|
||||
FIX: #17476 releve.php: Fix SQL statement
|
||||
FIX: #17967
|
||||
Fix: #17906 : fix access denied
|
||||
FIX: Accountancy - Import in general ledger
|
||||
FIX: Accountancy - Quadra export - wrong data on credit
|
||||
FIX: Accountancy - Warning on the pages of the preparatory statements of accounting entries
|
||||
FIX: Add function price2num for rounding values in productAlertStock box
|
||||
FIX: Add parameter to function price2num()
|
||||
FIX: Cannot delete a batch material from item receipts
|
||||
FIX: cast int
|
||||
FIX: Change parameters MF to MS for price2num() function
|
||||
FIX: create event from contact card preselect contact correctly
|
||||
FIX: create sociales : keep values error form
|
||||
FIX: dol_print_date for %a and %b with some timezone
|
||||
FIX: email is not case sensitive
|
||||
FIX: error for duplicate thirdparty found correctly returned by ws
|
||||
FIX: Espadon PDF shippment model with long public note now working
|
||||
FIX: esupplier order: error 500 when using packaging with product where it is not defined
|
||||
FIX: Filter on debit/credit
|
||||
FIX: Filter on supplier payment list
|
||||
FIX: fix checkbox displayed according to module project setup parameters - work in progress
|
||||
FIX: inconsistency in margin recording with option "Force to sale price"
|
||||
FIX: invoice PDF generation after payment
|
||||
FIX: mask selector fournisseur if module not activate
|
||||
FIX: merge thirparty also work for bank URL entry
|
||||
FIX: Missing extrafields into export of agenda record
|
||||
FIX: missing parameter in select for POP
|
||||
FIX: missing return edit if update error
|
||||
FIX: missing token on dolGetButtonAction for action delete
|
||||
FIX: payment creation: re-generate invoice PDF with correct display options
|
||||
FIX: payment validation: invoices PDF were no re-generated, make it with correct display options
|
||||
FIX: Periodicity by default on fiscal year, according to the now date, we have plus 1 year added
|
||||
FIX: pgsql: prevent 'WHERE 1'
|
||||
FIX: PHP version requirement in composer.json
|
||||
FIX: project visibility field with two option
|
||||
FIX: saving template email
|
||||
FIX: search accented words in product description (consumption page)
|
||||
FIX: Search on date in accountancy
|
||||
FIX: selection of project for reception must use
|
||||
FIX: shhhhhh ! There is nothing here...
|
||||
FIX: Show input field checkbox selection
|
||||
FIX: Show Ref.Supplier in LinkToObjectBlock
|
||||
FIX: SQL Error show_contacts : socialnetworks
|
||||
FIX: Start hour on ACCOUNTING_DATE_START_BINDING
|
||||
FIX: supplier order: error 500 when using packaging with product where it is not defined
|
||||
FIX: test must be === and not ==
|
||||
FIX: test on link type
|
||||
FIX: type link extrafield case for advanced target emailing
|
||||
FIX: Write right on document
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.2 compared to 13.0.1 *****
|
||||
|
||||
FIX: 11.0 - $this->socid injected in query without checking for empty value
|
||||
FIX: #16096 #16085 Any call of ajax pages must provide the token
|
||||
FIX: #16296
|
||||
FIX: #16325
|
||||
FIX: #16341 : Fetch the Product ExtraFields in Shippment lines
|
||||
FIX: #16366
|
||||
FIX: #16393 Do not sanitize <!DOCTYPE html>
|
||||
FIX: #16420 #16423 #16488 #16477
|
||||
FIX: #16431
|
||||
FIX: #16465
|
||||
FIX: #16480
|
||||
FIX: #16485
|
||||
FIX: #16487
|
||||
FIX: #16503
|
||||
FIX: #16530
|
||||
FIX: #16533
|
||||
FIX: #16629
|
||||
FIX: #16671 Can not generate zip file of documents in backup tool
|
||||
FIX: Add "Now" link on social charges creation card
|
||||
FIX: avoid undefined URL and missing token
|
||||
FIX: Bad project filter in ticket list
|
||||
FIX: Buttons to disable bindings not working
|
||||
FIX: class not found when creating recuring invoice from invoice+discount
|
||||
FIX: File attachment on lots/batches
|
||||
FIX: handling $heightforinfotot when he's superior to a page height on Supplier Invoice
|
||||
FIX: hourglass and hide button to pay
|
||||
FIX: massaction validate invoice do not regenerate PDF
|
||||
FIX: missing mp4 video mime
|
||||
FIX: picto on shipment to reset qty to 0. Some quantities were not reset.
|
||||
FIX: Protection to avoid #16504
|
||||
FIX: rounding amount on card updating
|
||||
FIX: rounding amount on social charges card updating
|
||||
FIX: select list dependencies now work for ModuleBuilder sellist field
|
||||
FIX: status in popup of member in widget
|
||||
FIX: status on tooltip on widgets
|
||||
FIX: Timezone management for datetime on list of events
|
||||
FIX: Timezone management for datetime with modulebuilder and extrafields
|
||||
FIX: Total_ht not show in contract link element
|
||||
FIX: use post instead get
|
||||
FIX: use var "saved_url" instead global var "$url"
|
||||
FIX: Various payment - Missing fields for check transmitter & bank name
|
||||
FIX: warning if setup of chart of account is not yet done.
|
||||
FIX: wrong extension
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.1 compared to 13.0.0 *****
|
||||
|
||||
FIX: 10.0 before crediting a withdrawal receipt, check whether it has been credited already.
|
||||
FIX: 11.0 when a mandatory extrafield of type sellist contains '0' it should be considered empty and trigger an error message upon insertion
|
||||
FIX: 11.0 when a new intervention is created from an object, a new $extrafields object is instantiated but not initialized
|
||||
FIX: create MO, Column 'tms' cannot be null
|
||||
FIX: #14290 #15900
|
||||
FIX: #16076 patch user/list.php for extrafields
|
||||
FIX: #16077 patch wrong timezone
|
||||
FIX: #16079 error of service date at duplicated invoice
|
||||
FIX: #16080 mailing list title
|
||||
FIX: #16084 DB error at projects
|
||||
FIX: #16107
|
||||
FIX: #16118 Timezone problem on some fields
|
||||
FIX: #16131
|
||||
FIX: #16135
|
||||
FIX: #16143
|
||||
FIX: #16156
|
||||
FIX: #16160
|
||||
FIX: #16165 Create customer discount without VAT
|
||||
FIX: #16185
|
||||
FIX: #16189 fix download/see check deposit PDF
|
||||
FIX: #16215
|
||||
FIX: Accountancy - label_operation is used instead of label_compte
|
||||
FIX: Add critical price patch
|
||||
FIX: Assignement of actors on tasks
|
||||
FIX: Bad dates on info tabs
|
||||
FIX: cash fence for takepos with multientity
|
||||
FIX: CSRF errors on margin forms
|
||||
FIX: encoding status in graph of vendor proposals
|
||||
FIX: Fix detect dispached product and set to received completely when the supplier order have services (support STOCK_SUPPORTS_SERVICES)
|
||||
FIX: hide/unhide external ICS calendars
|
||||
FIX: link to create event when task is in a project with a thirdparty
|
||||
FIX: Localtax must be converted with price2num
|
||||
FIX: manage price min for PRODUIT_CUSTOMER_PRICES
|
||||
FIX: Missing language ico
|
||||
FIX: Must not be able to edit vat of all lines if not draft
|
||||
FIX: Bad "htdocs" found into a path
|
||||
FIX: removed no more used proc update_modified_column_date_m on pgsql (its presence triggered errors)
|
||||
FIX: Vulnerability report by Ricardo Matias
|
||||
FIX: select default mail template
|
||||
FIX: Select transport mode function when creating a supplier invoice and add unique key to the table llx_c_transport_mode in migrate sql
|
||||
FIX: Merge of thirdparties : "unknow column fk_soc" + "Delivery" label
|
||||
FIX: SQL Error in group by with postgres or mysql strict mode
|
||||
FIX: TakePOS : load date function
|
||||
FIX: Timeout during import
|
||||
FIX: Trigger on expense report was not fired
|
||||
FIX: User creation of expense report not visible
|
||||
FIX: warning when adding a line if $remise_percent is an empty string
|
||||
FIX: status late on purchase orders
|
||||
FIX: ODT generation very slow
|
||||
FIX: amount in summary of report
|
||||
FIX: VAT value when code contains number
|
||||
FIX: payment term label on PDF
|
||||
FIX: date selector when using reduced year (like on smartphone)
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.0 compared to 12.0.0 *****
|
||||
|
||||
For users:
|
||||
----------
|
||||
NEW: Module "Credit transfer SEPA" to manage payment of vendors using bank credit transfer SEPA files.
|
||||
NEW: Module Intracomm report
|
||||
NEW: Module Reception (for a more accurate management of your receptions) moved from experimental to stable.
|
||||
NEW: Module Recruitment to manage Job position and applications.
|
||||
NEW: Several security issues after a private bug bounty campaign.
|
||||
NEW: Accountancy - add chart of sub accounts
|
||||
NEW: Accountancy - add options to disable binding on sales, purchases & expense reports independently of the modules
|
||||
NEW: Accountancy balance - add a menu entry to show subtotal by group
|
||||
NEW: Accountancy - change menu disposition
|
||||
NEW: Accountancy - on transfers, select the periodicity by default
|
||||
NEW: Accountancy - add export for Gestinum (v3 & v5) #15180
|
||||
NEW: new currency rate editor
|
||||
NEW: Solve blocking feature. Can increase stock of a Kit without changing subproduct stock.
|
||||
NEW: add a widget to show the customers with outstanding limits reached
|
||||
NEW: add 2 rules for emailcollector: Message send/not sent from Dolibarr
|
||||
NEW: add a counter of number of words for pages in website module
|
||||
NEW: add a page to list Stock at a given date in the past
|
||||
NEW: add a start date to begin binding in accountancy
|
||||
NEW: add a statistics page to list popularity of products on invoices
|
||||
NEW: add calendar selection for agenda view
|
||||
NEW: Support documents generation for ticket edition (PDF or ODT)
|
||||
NEW: add column payment term into list of supplier invoices
|
||||
NEW: add column quantity in product margin page
|
||||
NEW: add column vat rate in page to define accounting account on product/service
|
||||
NEW: add costprice in fields of products list
|
||||
NEW: add an import profile for CUSTOMER ORDER, PO, PROPOSAL MODULE, SUPPLIER INVOICE
|
||||
NEW: add employee link in expense report binding page
|
||||
NEW: add EORI No. as ProfID5 #15382
|
||||
NEW: add export for various payments
|
||||
NEW: add Extrafields labels and values in mail on create ticket
|
||||
NEW: add Extrafields support on ECM module
|
||||
NEW: add filter rules "is answer" and "is not answer" in email collector
|
||||
NEW: add focus when editing on product/stock/product.php -> close #14548
|
||||
NEW: add free text on each terminal of cash desk
|
||||
NEW: add global search for customer payments and vendor payments
|
||||
NEW: add global search for miscellaneous payments
|
||||
NEW: add helper function for table headers with numbers
|
||||
NEW: add link to edit property from the search result of website pages
|
||||
NEW: add link to reset qty on supplier dispatch page
|
||||
NEW: add MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER const to remove header stored by email collector
|
||||
NEW: add Manufacturing Orders attached files into the automatic ECM view
|
||||
NEW: add margin info in invoice list
|
||||
NEW: add mass action to set category on a list of website pages
|
||||
NEW: add mass deletion for events
|
||||
NEW: add mass deletion for draft invoices
|
||||
NEW: add more filters on monthly statement list
|
||||
NEW: add option TAKEPOS_CAN_FORCE_BANK_ACCOUNT_DURING_PAYMENT
|
||||
NEW: add option to define a default warehouse at user level
|
||||
NEW: add option to include products without alert in replenish
|
||||
NEW: add order by lastname and firstname by default in get sales representatives
|
||||
NEW: add PDF document templates for warehouses (list of stock)
|
||||
NEW: add a prospect status for the contact with managment of custom icon
|
||||
NEW: add public note on products ; this also partially fix the #14342
|
||||
NEW: add quick dropdown menu in top right menu (experimental with MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN)
|
||||
NEW: add region in export companies and contacts
|
||||
NEW: add rights on margin info on invoice list
|
||||
NEW: add search param for close date on order list
|
||||
NEW: add show preview for mail attachement on form mail
|
||||
NEW: add State/Province origin for products
|
||||
NEW: add the workflow interaction close intervention on closing ticket
|
||||
NEW: add tracking number in list and search_all items
|
||||
NEW: add vcard for adherent and user
|
||||
NEW: add week number for month view in agenda
|
||||
NEW: Algeria data (VAT and forme_juridique)
|
||||
NEW: allow click on all header numbers on commerce area
|
||||
NEW: allow to reopen interventions (green button)
|
||||
NEW: allow zero quantity on supplier/vendor order line
|
||||
NEW: better currency rate editor
|
||||
NEW: can build vendor invoice from vendor orders
|
||||
NEW: can change a product in lines of a recurring invoice or contract
|
||||
NEW: can set the size of the logo on PDF documents
|
||||
NEW: can change VAT rate of all lines of a draft object in one step
|
||||
NEW: can define date range of validity of a login during creation
|
||||
NEW: can disable, from edit page, the whole web site
|
||||
NEW: can edit and set sales representatives directly on thirdparty card
|
||||
NEW: can edit the list of sending email profiles
|
||||
NEW: can enable/disable users in bulk actions
|
||||
NEW: can filter on accounting system ref in export of chart of account
|
||||
NEW: can filter on container type, language and tags in the list of web pages
|
||||
NEW: can hide eatby, sellby dates with option PRODUCT_DISABLE_EATBY and PRODUCT_DISABLE_SELLBY
|
||||
NEW: can import proposals, sales orders, supplier invoices
|
||||
NEW: can set a dedicated SMTP config for sending email from public ticket interface
|
||||
NEW: can set tags/categories to website pages
|
||||
NEW: can set type of price without tax per default for new sale price creation
|
||||
NEW: can use desired stock of a given warehouse for replenishment
|
||||
NEW: common behavior for monthly leave list view
|
||||
NEW: convert all subscription in datetime
|
||||
NEW: date shipment from order accepts hours
|
||||
NEW: price level compatibility for variant
|
||||
NEW: display stat for BOM on "object referent"/linked Object product tab
|
||||
NEW: Email configuration - allow auto signed certificate when smtp ssl activated
|
||||
NEW: enable free emails input with select2
|
||||
NEW: Events in agenda for contact
|
||||
NEW: filter on progress column in task list
|
||||
NEW: filter product list by country and/or state/province
|
||||
NEW: format tickets sent by mail in public interface
|
||||
NEW: form to add customer/supplier into categories
|
||||
NEW: Framework is ready for CSRF token protection on explicit GET URLs
|
||||
NEW: helper functions for export with phpspreadsheet
|
||||
NEW: hide closed contract lines
|
||||
NEW: hide label in PDF for variants
|
||||
NEW: if specific help page is available, we change color of icon
|
||||
NEW: include the tag editor of page as a popup into website editor
|
||||
NEW: introduce constant FACTUREFOURN_REUSE_NOTES_ON_CREATE_FROM
|
||||
NEW: introducing new modal boxes in TakePOS
|
||||
NEW: keep TakePOS terminal when login/logout
|
||||
NEW: link on balance to the ledger
|
||||
NEW: MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER const in email collector
|
||||
NEW: manage errors on update extra fields in ticket card
|
||||
NEW: mass-actions for the event list view
|
||||
NEW: more filter for "View change logs"
|
||||
NEW: multiselect type and date to date filter
|
||||
NEW: new line template: hidden conf to fill service dates from the last service line
|
||||
NEW: PDF model storm for delivery
|
||||
NEW: possibilty to group payments by mode and show their subtotal
|
||||
NEW: Priority and transparency from external calendar events
|
||||
NEW: Products - Nature of product is now a dictionary #13287
|
||||
NEW: Products Import/Export 'default warehouse' and 'use batch number' fields
|
||||
NEW: Purchase price table: added filterable table columns
|
||||
NEW: rate editor for multicurrency
|
||||
NEW: ref_ext field for Commande lines, order lines, Attributes and Combinations, Invoice lines, payments, order lines
|
||||
NEW: remove new lines in mail on add ticket message
|
||||
NEW: Rule "email to" accept wildcard *
|
||||
NEW: save filter of the project homepage
|
||||
NEW: select-able columns on customer and supplier invoice paymnet list
|
||||
NEW: select-able columns on miscellaneous payments + more data columns
|
||||
NEW: select-able columns on social taxes list
|
||||
NEW: send context and remove new lines on create ticket
|
||||
NEW: show category filter on lists only when user have rights to read categories
|
||||
NEW: show header number and make it clickable in warehouse area, payment area, shipment area
|
||||
NEW: show image of user in the combo select of users
|
||||
NEW: show label on batch card
|
||||
NEW: show links for select and multi-select in category extra field
|
||||
NEW: show module and permission ids on user/group rights (only admin)
|
||||
NEW: show place from events on import calender
|
||||
NEW: show references in contract form on interventions
|
||||
NEW: show tags and status in search list of website pages
|
||||
NEW: show user on external calender events (when found)
|
||||
NEW: subject title with company name instead of application title in ticket message
|
||||
NEW: Support for Samba4 AD
|
||||
NEW: TakePOS appearance tab with more visual parameters
|
||||
NEW: TakePOS add alert before changing thirdparty
|
||||
NEW: TakePOS add third order printer
|
||||
NEW: TakePOS can change thirdparty with barcode scan
|
||||
NEW: TakePOS can create a thirdparty customer from TakePOS frontend
|
||||
NEW: TakePOS connector compatibility with RECEIPT PRINTERS module
|
||||
NEW: TakePOS add delayed payment
|
||||
NEW: TakePOS display date range if exist
|
||||
NEW: TakePOS display resiliate status for members
|
||||
NEW: TakePOS Gift Receipt
|
||||
NEW: TakePOS multicurrency compatibility
|
||||
NEW: TakePOS multicurrency total
|
||||
NEW: TakePOS print payment method and change
|
||||
NEW: TakePOS restrict thirdparty to customer
|
||||
NEW: TakePOS show available stock
|
||||
NEW: TakePOS Weighing Scale compatibility with TakePOS connector #14725
|
||||
NEW: Thirdparty Import new fields: mother company,outstanding debt limit,bank account,incoterms
|
||||
NEW: Thirdparty module : box on customer/supplier tab for invoice outsantding amount late
|
||||
NEW: Ticket classification on create from email collector
|
||||
NEW: Ticket message notifications when edited from public interface
|
||||
NEW: Ticket translate classification labels in ticket
|
||||
NEW: VAT rate for Angola #15606
|
||||
NEW: VAT and juridical status for Algeria
|
||||
NEW: VAT report - Invert constant to show by default zero VAT in reports
|
||||
NEW: website page fields selection
|
||||
NEW: website - global header of a website can also have dynamic content
|
||||
NEW: when creating a user from a member linked to a thirdparty, you can choose to create it as external or internal user
|
||||
NEW: add clone button on miscellaneous payment
|
||||
NEW: add option to put the product label in bold in the PDF templates if configured #15065
|
||||
NEW: add option "If the feature to manage kits of module Stock is used, show details of subproducts of a kit on PDF."
|
||||
|
||||
|
||||
For developers:
|
||||
---------------
|
||||
NEW: add __MEMBER_TYPE__ and __TYPE__ substitution key
|
||||
NEW: add function dolButtonToOpenUrlInDialogPopup() to be able to open page into a popup
|
||||
NEW: show line number on intervention card (via MAIN_VIEW_LINE_NUMBER)
|
||||
NEW: add some fields to link website page to an other object
|
||||
NEW: fill ECM src object fields in dol_add_file_process
|
||||
NEW: conf to allow to show the full tree in warehouse popup
|
||||
NEW: can use parameter ?THEME_DARKMODEENABLED=2 for a preview of theme in dark mode
|
||||
NEW: can force the antivirus from conf file or autoprepend ini setup
|
||||
NEW: can add event to log into blockedlog module with a constant
|
||||
NEW: add property cssview when declaring fields of an object
|
||||
NEW: can use dynamic code into the 'enabled' property of DAO fields
|
||||
NEW: field ref_ext in llx_commandedet
|
||||
NEW: fields ref_ext for Attributes and Combinations
|
||||
NEW: OAuth SCOPE for Admin SDK
|
||||
NEW: standardizes API thirdparties by email like other object
|
||||
NEW: Triggers Attributes and Attributes values
|
||||
NEW: add incoterms data into the substitution array
|
||||
NEW: add send context for ticket
|
||||
NEW: add a message in error_log after detection of SQL or script injection
|
||||
NEW: add validation of MX domain for emails
|
||||
NEW: calculate the virtual stock in transverse mode ( not on getEntity('commande'), ... but on getEntity('stock') )
|
||||
NEW: Graphics can be horizontal bars
|
||||
NEW: add param to not show links when output tags
|
||||
|
||||
APIs
|
||||
NEW: API get contacts list of a given order
|
||||
NEW: API endpoint getContacts and clean results
|
||||
NEW: API can update a payment
|
||||
NEW: API get member by thirdparty
|
||||
NEW: API get thirdparty by barcode
|
||||
NEW: API get users by email / login
|
||||
NEW: fetch contact by email with REST API
|
||||
NEW: get state dictionnary by REST API
|
||||
NEW: improve Product API for variant products
|
||||
NEW: retrieve discount from invoice from API
|
||||
NEW: Thirdparty REST API: endpoint to set price level
|
||||
NEW: use new category API for project list view
|
||||
|
||||
HOOKs
|
||||
NEW: add hook on propal card
|
||||
NEW: add hooks on newpayment page to allow external payment modules
|
||||
NEW: add hooks on stats pages
|
||||
NEW: add formConfirm hook on product page
|
||||
NEW: add two hooks printFieldListFrom and printFieldSearchParam
|
||||
NEW: add hook "loginCheckSecurityAccess"
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* The object "livraison" has been renamed into "delivery" (directory, class, keys, methods with livraison in name ...).
|
||||
* All properties ->contactid have been renamed into ->contact_id
|
||||
* All properties ->titre have been renamed into ->title
|
||||
* Property $paiementid in API 'api_supplier_invoices.php' has been renamed into into $payment_mode_id
|
||||
* Property 'num_paiement' has been renamed 'num_payment' everywhere for better code consistency.
|
||||
* The deprecated subsitution key __SIGNATURE__ has been removed. Replace it with __USER_SIGNATURE__ if you used the old syntax in your email templates.
|
||||
* The hidden option HOLIDAY_MORE_PUBLIC_HOLIDAYS has been removed. Use instead the dictionary table if you need to define custom days of holiday.
|
||||
* If you build a class that implement CommonObject to use the incoterm properties or methods (->fk_incoterm, ->label_incoterm, ->location_incoterm),
|
||||
you must now also include declaration of the Trait 'CommonIncoterm' in your class. All incoterm functions were moved into this Trait.
|
||||
* The GETPOST(..., 'alpha') has now the same behaviour than GETPOST(..., 'alphanohtml') so no html will be allowed. Use GETPOST(..., 'restricthtml') to accept HTML.
|
||||
* If you have links in your code with '&action=add', '&action=update', '&action=delete' as a parameter, you must also add '&token='.newToken() as another parameter to avoid CSRF protection errors.
|
||||
* The API addPayment for api_invoice has evolved to accept amount into a foreign currency. You must provide array(amount=>X,mutlicurrency_ammount=>Y) instead of simple amount.
|
||||
* The method select_thirdparty(), deprecated since 3.8, into html.form.class.php has been removed.
|
||||
* Depreciate all methods with name ->valide(). Use instead methods ->validate().
|
||||
* Function showStripePaymentUrl, getStripePaymentUrl, showPaypalPaymentUrl and getPaypalPaymentUrl has been removed. The generic one showOnlinePaymentUrl and getOnlinePaymentUrl are always used.
|
||||
* Context for hook showSocinfoOnPrint has been moved from "showsocinfoonprint" to "main"
|
||||
* Library htdocs/includes/phpoffice/phpexcel as been removed (replaced with htdocs/includes/phpoffice/PhpSpreadsheet)
|
||||
* Database transaction in your triggers must be correctly balanced (one close for one open). If not, an error will be returned by the trigger, even if trigger did return error code.
|
||||
* Dolibarr v13 is still compatible with any PHP version between 5.6.0 and 7.4.*; Unit tests are OK with PHP 8.0 but some warnings or troubles may appears with PHP 8.0.
|
||||
* All your Ajax services must contains such a line at begin of file: if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 12.0.5 compared to 12.0.4 *****
|
||||
FIX: before crediting a withdrawal receipt, check whether it has been credited already
|
||||
@@ -884,7 +179,7 @@ FIX: Look and feel v12: First tab must be name of object
|
||||
FIX: missing entity check
|
||||
FIX: missing param for hook
|
||||
FIX: Missing transaction on PO actions
|
||||
FIX: MySQL Strict mode
|
||||
FIX: MySql Strict mode
|
||||
FIX: param entity in html form file
|
||||
FIX: Problems on FEC format
|
||||
FIX: round stock value on product list
|
||||
@@ -903,7 +198,6 @@ FIX: Visualization rights correction on last modified contacts box
|
||||
FIX: Wrong redirection
|
||||
FIX: Yogosha report 4425 (backport)
|
||||
|
||||
|
||||
***** ChangeLog for 12.0.2 compared to 12.0.1 *****
|
||||
FIX: computation of the bottom margin of <body> returns NaN because body is not loaded yet
|
||||
FIX: DebugBar hides content at page bottom
|
||||
@@ -992,8 +286,8 @@ FIX: SQL Problem in customer invoice list
|
||||
FIX: SQL Problem in social contribution list
|
||||
FIX: SQL Problem in supplier invoice list
|
||||
FIX: SQL syntax error when editing extrafields
|
||||
FIX: SQL type
|
||||
FIX: TakePOS 12 hook
|
||||
FIX: Sql type
|
||||
FIX: takepos 12 hook
|
||||
FIX: Update form erased extrafields that were hidden
|
||||
FIX: Update of extrafields date
|
||||
FIX: Update of extrafiels on draft object
|
||||
@@ -1007,7 +301,7 @@ For users:
|
||||
|
||||
NEW: Module MO (Manufacturing Order) is available as stable module.
|
||||
NEW: Receipt printer module moved from 'development' to 'experimental'
|
||||
NEW: add option MAIN_VIEW_LINE_NUMBER_IN_LIST for some lists
|
||||
NEW: Add option MAIN_VIEW_LINE_NUMBER_IN_LIST for some lists.
|
||||
NEW: add numbering module for TakePOS module
|
||||
NEW: 2 new options when creating an invoice from time spent on a project : by period or by task
|
||||
NEW: Accountancy add column thirdparty on binding page
|
||||
@@ -1018,19 +312,19 @@ NEW: Accountancy - Add possibility to manage a short alternative label for accou
|
||||
NEW: Accountancy - General ledger - Add an option to search not reconciled lines
|
||||
NEW: Add accountancy code of thirdparty in contact and supplier export
|
||||
NEW: support webp image format
|
||||
NEW: add checkbox "overwrite if exists" into ECM/DMS module
|
||||
NEW: Add checkbox "overwrite if exists" into ECM/DMS module
|
||||
NEW: add a link to notes in members list
|
||||
NEW: add a parameter to group same products in TakePOS
|
||||
NEW: add a parameter to sort product by label in TakePOS
|
||||
NEW: add a profil to import contact categories
|
||||
NEW: add company extrafields into order export
|
||||
NEW: Add a profil to import contact categories
|
||||
NEW: Add company extrafields into order export
|
||||
NEW: add const CASHDESK_FORCE_DECREASE_STOCK to force batch decrementation
|
||||
NEW: add const TAKEPOS_NUMPAD_USE_PAYMENT_ICON to use icons on payment buttons
|
||||
NEW: add csv separator setup in module admin
|
||||
NEW: add dedicated substitutions keys for extrafields of type date and datetime
|
||||
NEW: add default warehouse for dispatch
|
||||
NEW: add due date in feature "Export accounting documents"
|
||||
NEW: add duration information for fichinter
|
||||
NEW: Add due date in feature "Export accounting documents"
|
||||
NEW: Add duration information for fichinter
|
||||
NEW: Start support of Dark theme into ELDY theme
|
||||
NEW: Add field author public alias for blog post on website module
|
||||
NEW: Add "finished" field on product list
|
||||
@@ -1230,14 +524,14 @@ Following changes may create regressions for some external modules, but were nec
|
||||
|
||||
WARNING FOR DOLIWAMP USERS ONLY:
|
||||
|
||||
Only people that installed Dolibarr using the all-in-one auto-installer for Windows called "DoliWAMP" are concerned by the following warnings:
|
||||
Only people that installed Dolibarr using the all-in-one autoinstaller for Windows called "DoliWAMP" are concerned by the following warnings:
|
||||
|
||||
* DoliWAMP auto-installer for Windows is no more available on 32 bits systems. Use standard package if you need to use such architecture.
|
||||
* It is not possible to migrate from an installation done with the old DoliWAMP auto-installer for Windows by using this new one.
|
||||
You must make a backup of your database, make a fresh installation using the new installer and reload your backup.
|
||||
Don't forget that DoliWAMP is a good solution to make a quick test of Dolibarr on your local computer but is not recommended as a production
|
||||
solution on a local desktop since a local desktop computer has often no backup and security policy, or not as good as on a server (when there is one).
|
||||
DoliWAMP remains a solution for fast test or demo purposes. Prefer using standard packages for production.
|
||||
* DoliWAMP autoinstaller for Windows is not more available on 32bits systems. Use standard package if you need to use such architecture.
|
||||
* It is not possible to migrate from an installation done with the old DoliWAMP autoinstaller for Windows by using this new one. You must make a backup
|
||||
of your database, make a fresh installation using the new installer and reload.
|
||||
* Don't forget that DoliWAMP is a good solution to make a quick test of Dolibarr on your local computer but was never recommanded as a production
|
||||
solution on a local desktop since a desktop computer has not a backup and security policy as good as on a server (when there is one).
|
||||
DoliWAMP remains a solution for fast test or demo purposes.
|
||||
|
||||
|
||||
***** ChangeLog for 11.0.5 compared to 11.0.4 *****
|
||||
@@ -4217,7 +3511,7 @@ Following changes may create regression for some external modules, but were nece
|
||||
entities and to review completely the rights of the groups and the users.
|
||||
* Use getEntity('xxx') instead getEntity('xxx', 1) and use getEntity('xxx', 0) instead getEntity('xxx')
|
||||
* Some other change were done in the way we read permission of a user when module multicompany is enabled. You can
|
||||
retrieve the old behavior by adding constant MULTICOMPANY_BACKWARD_COMPATIBILITY to 1.
|
||||
retreive the old behavior by adding constant MULTICOMPANY_BACKWARD_COMPATIBILITY to 1.
|
||||
* The hook formObjectOptions was not implemented correctly in previous version. Sometimes, you had to return output
|
||||
content by doing a print into function, sometimes by returning content into "resprint". This has been fixed to follow
|
||||
hook specifications so you must return output into "resprint".
|
||||
@@ -6963,7 +6257,7 @@ For users:
|
||||
- Fix: [Bug #958] LocalTax2 for Spain fails on Suppliers
|
||||
- Fix: [ bug #972 ] Auto completion contact field do not take account the min caract number before search
|
||||
- Fix: [ bug #971 ] html.form.class.php select_contact with autocomplete do not exclude id from exclude array
|
||||
- Fix: Expedition creation, can retrieve product from other expedition
|
||||
- Fix: Expedition creation, can retreive product from other expedition
|
||||
|
||||
For translators:
|
||||
- Update language files.
|
||||
|
||||
34
DCO
34
DCO
@@ -1,34 +0,0 @@
|
||||
Developer Certificate of Origin
|
||||
Version 1.1
|
||||
|
||||
Copyright (C) 2002 - Today, The Dolibarr team and its contributors.
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
|
||||
Developer's Certificate of Origin 1.1
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
(a) The contribution was created in whole or in part by me and I
|
||||
have the right to submit it under the open source license
|
||||
indicated in the file; or
|
||||
|
||||
(b) The contribution is based upon previous work that, to the best
|
||||
of my knowledge, is covered under an appropriate open source
|
||||
license and I have the right under that license to submit that
|
||||
work with modifications, whether created in whole or in part
|
||||
by me, under the same open source license (unless I am
|
||||
permitted to submit under a different license), as indicated
|
||||
in the file; or
|
||||
|
||||
(c) The contribution was provided directly to me by some other
|
||||
person who certified (a), (b) or (c) and I have not modified
|
||||
it.
|
||||
|
||||
(d) I understand and agree that this project and the contribution
|
||||
are public and that a record of the contribution (including all
|
||||
personal information I submit with it, including my sign-off) is
|
||||
maintained indefinitely and may be redistributed consistent with
|
||||
this project or the open source license(s) involved.
|
||||
6
INSTALL
Normal file
6
INSTALL
Normal file
@@ -0,0 +1,6 @@
|
||||
INSTALL
|
||||
-------
|
||||
|
||||
English: See README.md file.
|
||||
|
||||
French: Voir fichier README-FR.md.
|
||||
22
README-FR.md
22
README-FR.md
@@ -6,14 +6,12 @@
|
||||
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans).
|
||||
Il est simple d'utilisation et modulaire, vous permettant de n'activez que les fonctions dont vous avez besoin (contacts, fournisseurs, factures, commandes, stocks, agenda, ...).
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## LICENCE
|
||||
|
||||
Dolibarr est distribué sous les termes de la licence GNU General Public License v3+ ou supérieure.
|
||||
|
||||
|
||||
## INSTALLER DOLIBARR
|
||||
|
||||
### Configuration simple
|
||||
@@ -54,7 +52,6 @@ Vous pouvez aussi utiliser un serveur Web et une base de données prise en charg
|
||||
|
||||
- Suivez les instructions de l'installateur
|
||||
|
||||
|
||||
## METTRE A JOUR DOLIBARR
|
||||
|
||||
Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
|
||||
@@ -67,11 +64,9 @@ 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/*
|
||||
|
||||
|
||||
## CE QUI EST NOUVEAU
|
||||
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
|
||||
Voir fichier ChangeLog.
|
||||
|
||||
## CE QUE DOLIBARR PEUT FAIRE
|
||||
|
||||
@@ -87,17 +82,15 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Calendrier/Agenda partagé (avec export ical, vcal)
|
||||
- Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...)
|
||||
- Gestion de contrats de services
|
||||
- Gestion de stock et inventaires
|
||||
- Gestion de stock
|
||||
- Gestion des expéditions
|
||||
- Gestion des demandes de congès
|
||||
- Gestion des notes de frais
|
||||
- Gestion de recrutement
|
||||
- GED (Gestion Electronique de Documents)
|
||||
- EMailings de masse
|
||||
- Réalisation de sondages
|
||||
- Gestion d'adhérents
|
||||
- Point de vente/Caisse enregistreuse
|
||||
- … (près de 100 modules disponibles en standard, près de 1000 autre sur la place de marché d'extensions)
|
||||
- …
|
||||
|
||||
### Autres modules
|
||||
|
||||
@@ -142,36 +135,31 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
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
|
||||
|
||||
Voici un liste de fonctionnalités pas encore gérées par Dolibarr:
|
||||
|
||||
- Dolibarr ne contient pas de module de génération de feuille de 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.
|
||||
- Dolibarr n'embarque pas de Webmail intégré nativement.
|
||||
- Dolibarr ne fait pas le café (pas encore).
|
||||
|
||||
|
||||
## 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).
|
||||
|
||||
|
||||
## CONTRIBUER
|
||||
|
||||
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>
|
||||
|
||||
|
||||
## CREDITS
|
||||
|
||||
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)
|
||||
|
||||
|
||||
## ACTUALITES ET RESEAUX SOCIAUX
|
||||
|
||||
Suivez le projet Dolibarr project sur les réseaux francophones
|
||||
|
||||
148
README.md
148
README.md
@@ -2,20 +2,16 @@
|
||||
|
||||

|
||||

|
||||
[](https://php.net/)
|
||||
[](https://github.com/Dolibarr/dolibarr)
|
||||
|
||||
Dolibarr ERP & CRM is a modern software package that helps 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…).
|
||||
|
||||
It's an Open Source Software suite (written in PHP with optional JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
|
||||
It's an Open Source Software (written in PHP language) designed for small, medium or large companies, foundations and freelancers.
|
||||
|
||||
You can freely use, study, modify or distribute it according to its licence.
|
||||
You can freely use, study, modify or distribute it according to its Free Software licence.
|
||||
|
||||
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
|
||||
You can use it as a standalone application or as a web application to be able to access it from the Internet or a LAN.
|
||||
|
||||
Dolibarr has a large community ready to help you, free forums and [preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)
|
||||
|
||||

|
||||

|
||||
|
||||
## LICENSE
|
||||
|
||||
@@ -31,23 +27,19 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
|
||||
|
||||
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions:
|
||||
|
||||
- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_DoliWamp)
|
||||
- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian)
|
||||
- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp)
|
||||
- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian
|
||||
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
|
||||
|
||||
Releases can be downloaded from [official website](https://www.dolibarr.org/).
|
||||
|
||||
### Advanced setup
|
||||
|
||||
You can use a web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
|
||||
You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
|
||||
|
||||
On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
||||
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Versions).
|
||||
|
||||
#### Generic install steps:
|
||||
|
||||
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
|
||||
- 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 know git as it makes it easier if you want to upgrade later):
|
||||
- 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, ...)
|
||||
|
||||
@@ -71,7 +63,6 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
||||
|
||||
- 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.
|
||||
@@ -79,173 +70,122 @@ If you don't have time to install it yourself, you can try some commercial 'read
|
||||
|
||||
## UPGRADING
|
||||
|
||||
Dolibarr supports upgrading usually wihtout the need for any (commercial) support (depending on if you use any commercial extensions) and supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!
|
||||
|
||||
- At first make a backup of your Dolibarr files & than [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
|
||||
- At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr
|
||||
- Check that your installed PHP version is supported by the new version [see PHP support](./doc/phpmatrix.md).
|
||||
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
|
||||
- At first next access, Dolibarr will redirect you 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 in the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
|
||||
- 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*").
|
||||
|
||||
*Note: migration process can be safely done multiple times by calling the `/install/index.php` page*
|
||||
|
||||
## WHAT'S NEW
|
||||
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
|
||||
|
||||
## FEATURES
|
||||
|
||||
### Main application/modules (all optional)
|
||||
|
||||
- Third-Parties Management: Customers, Prospects (Leads) and/or Suppliers + Contacts
|
||||
- Members/Membership/Foundation management
|
||||
|
||||
Product Management
|
||||
- Customers, Prospects (Leads) and/or Suppliers directory + Contacts
|
||||
- Members management
|
||||
- Products and/or Services catalog
|
||||
- Stock / Warehouse management + Inventory
|
||||
- Barcodes
|
||||
- Batches / Lots / Serials
|
||||
- Product Variants
|
||||
- Bill of Materials (BOM)
|
||||
- Manufacturing Orders
|
||||
|
||||
Customer/Sales Management
|
||||
- Customers/Prospects + Contacts management
|
||||
- Opportunities or Leads management
|
||||
- Commercial proposals management
|
||||
- Customer Orders management
|
||||
- Contracts/Subscription management
|
||||
- Interventions management
|
||||
- Ticket System
|
||||
- Customer & Supplier Orders management
|
||||
- Invoices and payment management
|
||||
- Shipping management
|
||||
- Customer Invoices/Credit notes and payment management
|
||||
- Point of Sale (POS)
|
||||
|
||||
Supplier/Purchase Management
|
||||
- Suppliers/Vendors + Contacts
|
||||
- Supplier (price) requests
|
||||
- Purchase Orders management
|
||||
- Delivery/Receiption
|
||||
- Supplier Invoices/credit notes and payment management
|
||||
- INCOTERMS
|
||||
|
||||
Finance / Accounting
|
||||
- Invoices / Payments
|
||||
- Warehouse/Stock management
|
||||
- Manufacturing Orders
|
||||
- Bank accounts management
|
||||
- Direct debit orders management (European SEPA)
|
||||
- Accounting management
|
||||
- Donations management
|
||||
- Loan management
|
||||
- Margins
|
||||
- Reports
|
||||
|
||||
Collaboration
|
||||
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
|
||||
- Opportunities or Leads management
|
||||
- Projects & Tasks management
|
||||
- Ticket System
|
||||
- Surveys
|
||||
|
||||
HR
|
||||
- Contracts management
|
||||
- Interventions management
|
||||
- Employee's leave requests management
|
||||
- Expense reports
|
||||
- Recruitment management
|
||||
- Timesheets
|
||||
|
||||
- Electronic Document Management (EDM)
|
||||
- Foundations members management
|
||||
- Point of Sale (POS)
|
||||
- …
|
||||
|
||||
### Other application/modules
|
||||
|
||||
- Electronic Document Management (EDM)
|
||||
- Bookmarks management
|
||||
- Donations management
|
||||
- Reporting
|
||||
- Surveys
|
||||
- Data export/import
|
||||
- Barcodes
|
||||
- Barcodes support
|
||||
- Margin calculations
|
||||
- LDAP connectivity
|
||||
- ClickToDial integration
|
||||
- Mass emailing
|
||||
- RSS integration
|
||||
- Skype integration
|
||||
- Social platforms linking
|
||||
- Payment platforms integration (PayPal, Stripe, Paybox...)
|
||||
- Email-Collector
|
||||
|
||||
(around 100 modules available by default, 1000+ on the addon market place)
|
||||
|
||||
- …
|
||||
|
||||
### Other general features
|
||||
|
||||
- Localization in most major languages
|
||||
- Multi-Language Support
|
||||
- Multi-Users and groups with finely grained rights
|
||||
- Multi-Currency
|
||||
- Multi-Company (by adding of an external module)
|
||||
|
||||
- Multi-currency
|
||||
- Multi-company by adding of an external module
|
||||
- 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)
|
||||
|
||||
- APIs (REST, SOAP)
|
||||
- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture)
|
||||
|
||||
- APIs
|
||||
- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
|
||||
- Support a lot of country specific features:
|
||||
- Spanish Tax RE and ISPF
|
||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||
- Tunisian tax stamp
|
||||
- Argentina invoice numbering using A,B,C...
|
||||
- Compatible with [European directives] (https://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
|
||||
- ...
|
||||
- Flexible PDF & ODT generation for invoices, proposals, orders...
|
||||
- PDF or ODT generation for invoice, proposals, orders...
|
||||
- …
|
||||
|
||||
|
||||
### System Environment / Requirements
|
||||
|
||||
- PHP
|
||||
- MariaDB, MySQL or PostgreSQL
|
||||
- Compatible with all Cloud solutions that match PHP & MySQL or PostgreSQL prerequisites.
|
||||
|
||||
See exact requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite)
|
||||
|
||||
- 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
|
||||
|
||||
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
|
||||
|
||||
These are features that Dolibarr does **not** yet fully support:
|
||||
|
||||
- Tasks dependencies in projects
|
||||
- Payroll module
|
||||
- No native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
|
||||
- No native embedded Webmail
|
||||
- Dolibarr can't do coffee (yet)
|
||||
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
Administrator, user, developer and translator's documentations are available along with other community resources in 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
|
||||
|
||||
This project exists thanks to all the people who contribute.
|
||||
Please read the instructions how to contribute (report a bug/error, a feature request, send code ...) [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
|
||||
|
||||
A view on Contributors:
|
||||
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>
|
||||
|
||||
|
||||
## CREDITS
|
||||
|
||||
Dolibarr is the work of many contributors over the years and uses some fine PHP 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.
|
||||
|
||||
|
||||
## NEWS AND SOCIAL NETWORKS
|
||||
|
||||
Follow Dolibarr project on:
|
||||
@@ -256,8 +196,6 @@ Follow Dolibarr project on:
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||
|
||||
|
||||
### Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here. 🙏 [[Become a sponsor/backer](https://opencollective.com/dolibarr#backer)]
|
||||
|
||||
|
||||
102
SECURITY.md
102
SECURITY.md
@@ -1,103 +1,13 @@
|
||||
# Security Policy
|
||||
|
||||
This file contains some policies about the security reports on Dolibarr ERP CRM project, one of the most popular Open Source ERP and CRM in the world.
|
||||
|
||||
## Supported Versions for security reports
|
||||
## Supported Versions
|
||||
|
||||
| Version | Supported |
|
||||
| --------- | ------------------ |
|
||||
| <= 12.* | :x: |
|
||||
| >= 13.* | :white_check_mark: |
|
||||
|
||||
| -------- | ------------------ |
|
||||
| <= 8.0.* | :x: |
|
||||
| >= 9.0.* | :white_check_mark: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To report a vulnerability, please use GitHub security advisory at https://github.com/Dolibarr/dolibarr/security/advisories/new (if you have permissions) or alternatively send an email to security@dolibarr.org (for everybody)
|
||||
|
||||
|
||||
## Hunting vulnerabilities on Dolibarr
|
||||
|
||||
We believe that future of software is online SaaS. This means software are more and more critical and no technology is perfect. Working with skilled security researchers is crucial in identifying weaknesses in our technology.
|
||||
|
||||
If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly and ensure you are fairly rewarded for your discovery.
|
||||
|
||||
Any type of denial of service attacks is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
|
||||
|
||||
We recommand to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: https://www.dolibarr.org/download) to get access on every side of application.
|
||||
|
||||
### User Agent
|
||||
|
||||
If you try to find bug on Dolibarr, we recommend to append to your user-agent header the following value: '-securitytest-for-dolibarr'.
|
||||
|
||||
### Account access
|
||||
|
||||
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put into your own web server virtual host from https://www.dolibarr.org/download
|
||||
|
||||
|
||||
## Eligibility and Responsible Disclosure
|
||||
|
||||
We are happy to thank everyone who submits valid reports which help us improve the security of Dolibarr however, only those that meet the following eligibility requirements will be "validated reports" (if not, we may close the report without any answer):
|
||||
|
||||
You must be the first reporter of the vulnerability (duplicate reports are closed).
|
||||
|
||||
You must send a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary.
|
||||
|
||||
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install softwate on your own platform.
|
||||
|
||||
You must not leak, manipulate, or destroy any user data of third parties to find your vulnerability.
|
||||
|
||||
|
||||
## Scope for qualified vulnerabilities
|
||||
|
||||
ONLY vulnerabilities discovered, when the following setup on test platform is used, are "valid":
|
||||
|
||||
* $dolibarr_main_prod must be set to 1 into conf.php
|
||||
* $dolibarr_nocsrfcheck must be kept to the value 0 into conf.php (this is the default value)
|
||||
* $dolibarr_main_force_https must be set to something else than 0.
|
||||
* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 1 into backoffice menu Home - Setup - Other (this protection should be set to 1 soon by default)
|
||||
* The module DebugBar and ModuleBuilder must NOT be enabled (by default, these modules are not enabled. They are developer tools)
|
||||
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles into "experimental", "developement" or external modules are not valid vulnerabilities).
|
||||
* The root of web server must link to htdocs and the documents directory must be outside of the web server root (this is the default when using the default installer but may differs with external installer).
|
||||
* The web server setup must be done so only the documents directory is in write mode. The root directory called htdocs must be readonly.
|
||||
* CSRF attacks are accepted when using a POST URL, but when using GET URL, they are validated only for creating, updating or deleting data resctricted from pages restricted to admin users.
|
||||
* Ability for a high level user to edit web site pages into the CMS by including HTML or Javascript is an expected feature. Vulnerabilities into the website module are validated only if HTML or Javascript injection can be done by a non allowed user.
|
||||
|
||||
Scope is the web application (back office) and the APIs.
|
||||
|
||||
|
||||
## Qualifying vulnerabilities for reporting
|
||||
|
||||
* Remote code execution (RCE)
|
||||
* Local files access and manipulation (LFI, RFI, XXE, SSRF, XSPA)
|
||||
* Code injections (HTML, JS, SQL, PHP, ...)
|
||||
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose or into module "Web site" when permission to edit website content is allowed).
|
||||
* Cross-Site Requests Forgery (CSRF) with real security impact (when using GET URLs, CSRF are qualified only for creating, updating or deleting data from pages restricted to admin users)
|
||||
* Open redirect
|
||||
* Broken authentication & session management
|
||||
* Insecure direct object references
|
||||
* CORS with real security impact
|
||||
* Horizontal and vertical privilege escalation
|
||||
* "HTTP Host Header" XSS
|
||||
* Software version disclosure (for non admin users only)
|
||||
* Stack traces or path disclosure (for non admin users only)
|
||||
|
||||
|
||||
## Non-qualifying vulnerabilities for reporting
|
||||
|
||||
* "Self" XSS
|
||||
* SSL/TLS best practices
|
||||
* Denial of Service attacks
|
||||
* Clickjacking/UI redressing
|
||||
* Physical or social engineering attempts or issues that require physical access to a victim’s computer/device
|
||||
* Presence of autocomplete attribute on web forms
|
||||
* Vulnerabilities affecting outdated browsers or platforms
|
||||
* Logout and other instances of low-severity Cross-Site Request Forgery
|
||||
* Missing cookie flags
|
||||
* Missing security-related HTTP headers which do not lead directly to a vulnerability
|
||||
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
|
||||
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
|
||||
* Reports on features flagged as "experimental" or "development"
|
||||
* Software version or private IP disclosure when logged user is admin
|
||||
* Stack traces or path disclosure when logged user is admin
|
||||
* Any vulnerabilities due to a configuration different than the one defined into chapter "Scope for qualified vulnerabilities".
|
||||
|
||||
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.
|
||||
|
||||
102
build.xml
Normal file
102
build.xml
Normal file
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Script build for hudson CI -->
|
||||
<project name="dolibarr" default="hudson" basedir=".">
|
||||
<!-- Exclude/ignore paths -->
|
||||
<property name="ignorepaths" value="${basedir}/htdocs/conf,${basedir}/htdocs/core/filemanagerdol,${basedir}/htdocs/includes" />
|
||||
<property name="ignoreregexp" value="**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*" />
|
||||
|
||||
<target name="clean">
|
||||
<!-- Clean up -->
|
||||
<delete dir="${basedir}/hudson"/>
|
||||
<delete dir="${basedir}/generatedJUnitFiles"/>
|
||||
|
||||
<!-- Create build directories -->
|
||||
<mkdir dir="${basedir}/hudson/doxygen"/>
|
||||
<mkdir dir="${basedir}/hudson/logs"/>
|
||||
<mkdir dir="${basedir}/hudson/coverage"/>
|
||||
</target>
|
||||
|
||||
<!-- Run phpmd, phpcpd, phpcs, doxygen and phploc in parallel -->
|
||||
<target name="parallelTasks">
|
||||
<parallel>
|
||||
<!-- <antcall target="phpmd"/> -->
|
||||
<antcall target="phpcpd"/>
|
||||
<!-- <antcall target="phpcs"/> -->
|
||||
<antcall target="doxygen"/>
|
||||
<antcall target="phploc"/>
|
||||
</parallel>
|
||||
</target>
|
||||
|
||||
<!-- Generate pmd.xml -->
|
||||
<!--
|
||||
<target name="phpmd">
|
||||
<exec executable="phpmd">
|
||||
<arg line="htdocs xml codesize,unusedcode
|
||||
-\-reportfile '${basedir}/hudson/logs/pmd.xml'
|
||||
-\-ignore=${ignorepaths}
|
||||
" />
|
||||
</exec>
|
||||
</target>
|
||||
-->
|
||||
|
||||
<!-- Generate pmd-cpd.xml -->
|
||||
<target name="phpcpd">
|
||||
<exec executable="phpcpd">
|
||||
<arg line=" --log-pmd '${basedir}/hudson/logs/pmd-cpd.xml'
|
||||
--exclude '${basedir}/htdocs/conf'
|
||||
--exclude '${basedir}/htdocs/core/filemanagerdol'
|
||||
--exclude '${basedir}/htdocs/includes'
|
||||
--exclude '**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*'
|
||||
--min-tokens 70
|
||||
--min-lines 20
|
||||
htdocs
|
||||
" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Generate phploc.csv -->
|
||||
<target name="phploc">
|
||||
<exec executable="phploc">
|
||||
<arg line=" --log-csv '${basedir}/hudson/logs/phploc.csv'
|
||||
--exclude '${basedir}/htdocs/conf'
|
||||
--exclude '${basedir}/htdocs/core/filemanagerdol'
|
||||
--exclude '${basedir}/htdocs/includes'
|
||||
--exclude '**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*'
|
||||
htdocs
|
||||
" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Generate checkstyle.xml -->
|
||||
<target name="phpcs">
|
||||
<exec executable="phpcs" dir="${basedir}">
|
||||
<arg line=" --standard=${basedir}/dev/codesniffer/jenkins_ruleset.xml
|
||||
--report=checkstyle
|
||||
--report-file=${basedir}/hudson/logs/checkstyle.xml
|
||||
--ignore=${ignorepaths},${ignoreregexp}
|
||||
htdocs
|
||||
"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Run unit tests and generate junit.xml and clover.xml -->
|
||||
<target name="phpunit">
|
||||
<exec executable="phpunit" dir="${basedir}" failonerror="true">
|
||||
<arg line=" --configuration ${basedir}/test/phpunit/phpunittest.xml
|
||||
--log-junit ${basedir}/hudson/logs/junit.xml
|
||||
--coverage-clover ${basedir}/hudson/coverage/clover.xml
|
||||
--coverage-html ${basedir}/hudson/coverage/
|
||||
test/phpunit/AllTests.php
|
||||
"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Generate Doxygen documentation -->
|
||||
<target name="doxygen" description="Dolibarr documentation" >
|
||||
<exec executable="doxygen" dir="${basedir}" failonerror="false">
|
||||
<arg value="${basedir}/build/doxygen/jenkins_doxygen.doxyfile"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="hudson" depends="clean,phpunit,phpcs,parallelTasks"/>
|
||||
</project>
|
||||
58
build/README
58
build/README
@@ -1,64 +1,48 @@
|
||||
README (English)
|
||||
|
||||
Path: /dolibarr/build/README
|
||||
|
||||
##################################################
|
||||
Building packages
|
||||
##################################################
|
||||
|
||||
All sub-directories of "build" directory contains files (setup or binary tools) required to build automatically Dolibarr packages.
|
||||
The build directory and all its contents is absolutely not required to make Dolibarr working.
|
||||
It is here only to build Dolibarr packages, and those generated packages will not contains this "build" directory.
|
||||
|
||||
|
||||
There are several tools:
|
||||
|
||||
|
||||
|
||||
- To build full Dolibarr packages, launch the script
|
||||
> Launch command perl makepack-dolibarr.pl
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Prerequisites to build tgz, debian and rpm packages:
|
||||
Note: Prerequisites to build tgz, debian, rpm package
|
||||
> apt-get install tar dpkg dpatch p7zip-full rpm zip
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
Prerequisites to build autoexe DoliWamp package:
|
||||
Note: Prerequisites to build autoexe DoliWamp package:
|
||||
> apt-get install wine q4wine
|
||||
> Launch "wine cmd" to check a drive Z: pointing to / exists.
|
||||
> Install InnoSetup
|
||||
For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/
|
||||
> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
|
||||
For example by running wampserver3.2.0_x64.exe (https://www.wampserver.com).
|
||||
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
|
||||
For example by running isetup-5.3.9.exe (http://www.jrsoftware.org)
|
||||
> Install WampServer into "C:\Program Files\Wamp"
|
||||
For example by running wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe (http://www.wampserver.com)
|
||||
> Install WampServer addon to have versions: Mysql5.0.45
|
||||
For example by running WampServer2-MYSQL5045.exe (http://www.wampserver.com)
|
||||
> To build from Windows (running from makepack-dolibarr.pl script is however
|
||||
recommanded), open file build/exe/doliwamp.iss and click on button "Compile".
|
||||
The .exe file will be build into directory build.
|
||||
> Add path to ISCC into PATH windows var:
|
||||
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
|
||||
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
|
||||
open file build/exe/doliwamp.iss and click on button "Compile".
|
||||
The .exe file will be build into directory build.
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build a theme package, launch the script
|
||||
> perl makepack-dolibarrtheme.pl
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build a package for a module, launch the script
|
||||
> perl makepack-dolibarrmodule.pl
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build developper documentation, launch the script
|
||||
> perl dolibarr-doxygen-build.pl
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
Note:
|
||||
The build directory and all its contents is absolutely not required to make
|
||||
Dolibarr working. It is here only to build Dolibarr packages, and those
|
||||
generated packages will not contains this "build" directory.
|
||||
|
||||
|
||||
You can find in "build", following sub-directories:
|
||||
@@ -75,9 +59,6 @@ To build Mac OS package (not ready yet).
|
||||
* doap:
|
||||
To build Doap descriptor to promote/describe Dolibarr releases.
|
||||
|
||||
* docker:
|
||||
To deploy Dolibarr with docker.
|
||||
|
||||
* doxygen:
|
||||
Dir with config file to build doxygen documentation.
|
||||
|
||||
@@ -85,12 +66,12 @@ Dir with config file to build doxygen documentation.
|
||||
To build exe package for Windows that distribute Dolibarr sources or
|
||||
to build the complete DoliWamp package.
|
||||
|
||||
* gource:
|
||||
To build the video of history of git changes.
|
||||
|
||||
* launchpad:
|
||||
Doc file to explain how to use launchpad.
|
||||
|
||||
* live:
|
||||
Doc file to explain how to create a demo live CD.
|
||||
|
||||
* obs:
|
||||
Doc file to explain how to push release onto OBS.
|
||||
|
||||
@@ -109,8 +90,5 @@ To build Redhat, Opensuse or Mandriva package.
|
||||
* tgz:
|
||||
To build a tgz package.
|
||||
|
||||
* travis-ci:
|
||||
Used by travis to make CI.
|
||||
|
||||
* zip:
|
||||
To build a zip package.
|
||||
|
||||
@@ -51,17 +51,16 @@ export DEBEMAIL="eldy@destailleur.fr"
|
||||
|
||||
export QUILT_PATCHES=debian/patches
|
||||
|
||||
|
||||
# Note: alioth.debian.org is outdated --> https://alioth-archive.debian.org/ --> https://salsa.debian.org/public
|
||||
* Create an account login
|
||||
* Update your ~/.ssh/config file to add:
|
||||
Host svn.debian.org git.debian.org bzr.debian.org hg.debian.org darcs.debian.org arch.debian.org
|
||||
# To use Alioth.debian.org
|
||||
* Create an account login
|
||||
* Update your ~/.ssh/config file to add:
|
||||
Host svn.debian.org git.debian.org bzr.debian.org hg.debian.org darcs.debian.org arch.debian.org
|
||||
User eldy-guest
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
* Check login on page https://alioth.debian.org/users/login
|
||||
Ex: https://alioth.debian.org/users/eldy-guest
|
||||
* Setup your ssh as described into page: http://wiki.debian.org/Alioth/SSH
|
||||
* Ask to be included into project collab-maint: http://alioth.debian.org/projects/collab-maint/
|
||||
* Check login on page https://alioth.debian.org/users/login
|
||||
Ex: https://alioth.debian.org/users/eldy-guest
|
||||
* Setup your ssh as described into page: http://wiki.debian.org/Alioth/SSH
|
||||
* Ask to be included into project collab-maint: http://alioth.debian.org/projects/collab-maint/
|
||||
|
||||
|
||||
|
||||
@@ -99,21 +98,21 @@ export QUILT_PATCHES=debian/patches
|
||||
|
||||
- Post an ITP with reportbugs :
|
||||
> reportbug -B debian --email username@domain.tld wnpp
|
||||
See page https://www.debian.org/devel/wnpp/#l1 for example of ITP requests contents.
|
||||
See page http://www.debian.org/devel/wnpp/#l1 for example of ITP requests contents.
|
||||
|
||||
- Wait until you received bug number.
|
||||
For first ITP submission of Dolibarr, bug id was 634783.
|
||||
|
||||
- Check bug is into database by searching with id on
|
||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634783
|
||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634783
|
||||
|
||||
- Add a line for upstream into file changelog with bug number
|
||||
|
||||
- Call for a mentor on ML debian-mentors to upload packages
|
||||
|
||||
- Once package is uploaded, following URL are available:
|
||||
https://packages.qa.debian.org/package.html
|
||||
https://bugs.debian.org/package
|
||||
http://packages.qa.debian.org/package.html
|
||||
http://bugs.debian.org/package
|
||||
|
||||
|
||||
##### Modify severity of a bug ticket
|
||||
@@ -307,7 +306,7 @@ If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VER
|
||||
- htdocs/includes/jquery/plugins/datatables
|
||||
- htdocs/includes/jszip
|
||||
- htdocs/includes/mike42
|
||||
- htdocs/includes/phpoffice
|
||||
- htdocs/includes/phpexcel or htdocs/includes/phpoffice
|
||||
- htdocs/includes/restler/framework/Luracast/Restler/explorer
|
||||
- htdocs/includes/swiftmailer
|
||||
- htdocs/includes/tcpdf or htdocs/includes/tecnickcom
|
||||
|
||||
@@ -232,7 +232,7 @@ $dolibarr_main_prod='0';
|
||||
# Examples:
|
||||
# $dolibarr_mailing_limit_sendbycli='0';
|
||||
|
||||
# dolibarr_main_distrib
|
||||
# dolibarr_distrib
|
||||
# A key to identify the distribution used for first installation
|
||||
$dolibarr_main_distrib = 'debian';
|
||||
$dolibarr_distrib = 'deb';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Priority: optional
|
||||
Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
||||
# Uploaders: Laurent Destailleur (eldy) <eldy@users.sourceforge.net> # Only if differs from Maintainer
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: https://www.dolibarr.org
|
||||
Homepage: http://www.dolibarr.org
|
||||
Build-Depends: debhelper (>= 9), po-debconf
|
||||
# This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version
|
||||
|
||||
@@ -33,7 +33,7 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
||||
Recommends: apache2 | lighttpd | httpd,
|
||||
mariadb-server | virtual-mysql-server,
|
||||
# Required PHP extensions for debian 9 but we can't add them into a Depends, it does not exists on debian 7 and 8
|
||||
php-xml, php-mbstring, php-intl
|
||||
php-xml, php-mbstring
|
||||
Suggests: www-browser, php5-geoip
|
||||
Description: Web based software to manage a company or foundation
|
||||
Dolibarr ERP & CRM is an easy to use open source/free software package for
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Dolibarr
|
||||
Upstream-Contact: Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
Source: https://www.dolibarr.org/files/stable/standard/
|
||||
@@ -38,7 +38,6 @@ Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
2011, Herve Prot <herve.prot@symeos.com>
|
||||
2011, Remy Younes <ryounes@gmail.com>
|
||||
2012-2013, Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
|
||||
License: GPL-3+
|
||||
This program is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public
|
||||
@@ -57,9 +56,7 @@ License: GPL-3+
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 3 can be found in the file
|
||||
'/usr/share/common-licenses/GPL-3'.
|
||||
|
||||
------------------------------------------------------------
|
||||
`/usr/share/common-licenses/GPL-3'.
|
||||
|
||||
Files: htdocs/includes/adodbtime/*
|
||||
Copyright: 2003-2005, John Lim
|
||||
@@ -83,9 +80,6 @@ Comment:
|
||||
Those files are not shipped in the binary package since we use
|
||||
the library as packaged in "libphp-adodb".
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/ckeditor/*
|
||||
Copyright: 2003-2012 CKSource - Frederico Knabben
|
||||
License: GPL-2+
|
||||
@@ -115,9 +109,6 @@ Comment:
|
||||
Those files are not shipped in the binary package since we use the
|
||||
library as packaged in "ckeditor".
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/fonts/*
|
||||
Copyright: 2003, Bitstream Inc
|
||||
unknown, Gavin Graham
|
||||
@@ -168,9 +159,6 @@ Comments:
|
||||
Those files are not shipped in the binary package as we
|
||||
configure Dolibarr to use Dejavu fonts from "fonts-dejavu-core".
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: doc/images/*
|
||||
Copyright: Laurent Destailleur
|
||||
License: CC-BY-SA-3.0
|
||||
@@ -186,15 +174,33 @@ License: CC-BY-SA-3.0
|
||||
distribute the resulting work only under the same, similar or a compatible
|
||||
license.
|
||||
.
|
||||
For more information, see https://creativecommons.org/licenses/by-sa/3.0/
|
||||
For more information, see http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
Files: htdocs/includes/fpdfi/*
|
||||
Copyright: 2004-2011 Setasign - Jan Slabon
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
.
|
||||
This program is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/geoip2/*
|
||||
Files: htdocs/includes/geoip/*
|
||||
Copyright: 2007 MaxMind LLC
|
||||
License: CC-By-SA
|
||||
License: LGPL-2.1+
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
@@ -210,14 +216,10 @@ License: CC-By-SA
|
||||
.
|
||||
On Debian systems, the full text of the GNU Lesser General Public
|
||||
License version 2.1 can be found in the file
|
||||
'/usr/share/common-licenses/LGPL-2.1'.
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
`/usr/share/common-licenses/LGPL-2.1'.
|
||||
|
||||
Files: htdocs/includes/jquery/*
|
||||
Copyright: JQuery team
|
||||
https://www.jquery.com
|
||||
License: GPL-2+ or MIT
|
||||
=== GPL-2+ LICENSE NOTICE ===
|
||||
.
|
||||
@@ -238,7 +240,7 @@ License: GPL-2+ or MIT
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
'/usr/share/common-licenses/GPL-2'.
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
.
|
||||
=== MIT LICENSE ===
|
||||
.
|
||||
@@ -265,8 +267,6 @@ Comment:
|
||||
"libjs-jquery-ui". Most of the plugins are shipped though.
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/jquery/plugins/flot/*
|
||||
Copyright: Flot team
|
||||
License: Public-Domain
|
||||
@@ -275,9 +275,6 @@ Comment:
|
||||
Those files are not shipped in the binary package because we configure
|
||||
Dolibarr to use the files provided by "libjs-flot".
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/jsgantt/*
|
||||
Copyright: JSGantt team
|
||||
License: GPL-2+
|
||||
@@ -298,10 +295,7 @@ License: GPL-2+
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
'/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
Files: htdocs/includes/nusoap/*
|
||||
Copyright: 2002-2010 NuSphere Corporation
|
||||
@@ -321,14 +315,11 @@ License: LGPL-2.1+
|
||||
.
|
||||
On Debian systems, the full text of the GNU Lesser General Public
|
||||
License version 2.1 can be found in the file
|
||||
'/usr/share/common-licenses/LGPL-2.1'.
|
||||
`/usr/share/common-licenses/LGPL-2.1'.
|
||||
Comment:
|
||||
Those files are not shipped in the binary package since we
|
||||
configure Dolibarr to use the library provided in "libnusoap-php".
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/odtphp/*
|
||||
Copyright: 2008, Julien Pauli
|
||||
2008, Cyril PIERRE de GEYER
|
||||
@@ -351,12 +342,29 @@ License: GPL-2+
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
'/usr/share/common-licenses/GPL-2'.
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
Files: htdocs/includes/phpexcel/*
|
||||
Copyright: 2006-2011 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
License: LGPL-2.1+
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU Lesser General Public
|
||||
License version 2.1 can be found in the file
|
||||
`/usr/share/common-licenses/LGPL-2.1'.
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/tecnickcom/*
|
||||
Files: htdocs/includes/tcpdf/*
|
||||
Copyright: 2002-2013 Nicola Asuni - Tecnick.com LTD
|
||||
License: LGPL-3.0+
|
||||
TCPDF is free software: you can redistribute it and/or modify it
|
||||
|
||||
@@ -23,7 +23,7 @@ setup_empty_conf() {
|
||||
mkdir -p /etc/dolibarr
|
||||
touch /etc/dolibarr/conf.php
|
||||
chown root:www-data /etc/dolibarr/conf.php
|
||||
chmod 660 /etc/dolibarr/conf.php
|
||||
chmod 664 /etc/dolibarr/conf.php
|
||||
}
|
||||
|
||||
is_new_upstream_version() {
|
||||
@@ -150,6 +150,7 @@ case "$1" in
|
||||
##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
##grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
##grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
|
||||
@@ -24,7 +24,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
$force_install_distrib='debian';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one.
|
||||
// If during install, we enable/disable declaration to use non embedded libraries, we must also check they are
|
||||
@@ -35,6 +34,7 @@ $force_install_distrib='debian';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
//$force_dolibarr_lib_PHPEXCEL_PATH=''; // Use '' or 'disabled'
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor'; // Use '/javascript/ckeditor' or 'disabled'
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
|
||||
@@ -103,6 +103,8 @@ override_dh_install:
|
||||
|
||||
# clean from useless files
|
||||
rm -fr htdocs/includes/jquery/plugins/multiselect
|
||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF
|
||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip
|
||||
rm -fr htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33
|
||||
rm -fr htdocs/includes/tcpdf/fonts/freefont-20100919
|
||||
rm -fr htdocs/includes/tcpdf/fonts/utils
|
||||
@@ -111,6 +113,7 @@ override_dh_install:
|
||||
|
||||
# Licence files are already included into copyright file.
|
||||
rm -f htdocs/includes/jquery/plugins/flot/LICENSE.txt
|
||||
rm -f htdocs/includes/phpexcel/license.txt
|
||||
rm -f htdocs/includes/tcpdf/LICENSE.TXT
|
||||
|
||||
# Drop unwanted executable permissions
|
||||
|
||||
@@ -1,63 +1,38 @@
|
||||
FROM php:7.3-apache
|
||||
FROM php:7.2-apache
|
||||
|
||||
ENV HOST_USER_ID 33
|
||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||
ENV PHP_INI_MEMORY_LIMIT 256M
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libjpeg62-turbo \
|
||||
libpng-dev \
|
||||
libpng16-16 \
|
||||
libldap2-dev \
|
||||
libxml2-dev \
|
||||
libzip-dev \
|
||||
zlib1g-dev \
|
||||
libicu-dev \
|
||||
g++ \
|
||||
default-mysql-client \
|
||||
unzip \
|
||||
curl \
|
||||
apt-utils \
|
||||
msmtp \
|
||||
msmtp-mta \
|
||||
mailutils \
|
||||
&& apt-get autoremove -y \
|
||||
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev libzip-dev zlib1g-dev libicu-dev g++\
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
||||
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
|
||||
&& docker-php-ext-install gd \
|
||||
&& docker-php-ext-install zip \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install -j$(nproc) ldap && \
|
||||
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
|
||||
&& docker-php-ext-install ldap \
|
||||
&& docker-php-ext-install mysqli \
|
||||
&& 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:www-data /var/documents
|
||||
RUN chown www-data /var/documents
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-run.sh
|
||||
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
||||
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.remote_autostart=1' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.remote_enable=1' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.default_enable=1' >> ${PHP_INI_DIR}/php.ini
|
||||
#RUN echo 'xdebug.remote_host=docker.host' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.remote_port=9000' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.remote_connect_back=1' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.profiler_enable=0' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
|
||||
#RUN echo 'localhost docker.host' >> /etc/hosts
|
||||
|
||||
# set up sendmail config, to use maildev
|
||||
RUN echo "account default" > /etc/msmtprc
|
||||
RUN echo "auth off" >> /etc/msmtprc
|
||||
RUN echo "port 25" >> /etc/msmtprc
|
||||
RUN echo "host mail" >> /etc/msmtprc
|
||||
RUN echo "from local@localdomain.com" >> /etc/msmtprc
|
||||
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
|
||||
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
|
||||
RUN echo "localhost localhost.localdomain" >> /etc/hosts
|
||||
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_enable=1' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.default_enable=0' >> /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_connect_back=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 '172.17.0.1 docker.host' >> /etc/hosts
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# How to use it ?
|
||||
|
||||
The docker-compose.yml file is used to build and run Dolibarr in the current workspace.
|
||||
This docker image intended for developpement usage.
|
||||
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
|
||||
|
||||
Before build/run, define the variable HOST_USER_ID as following:
|
||||
|
||||
@@ -16,7 +14,7 @@ And then, you can run :
|
||||
|
||||
docker-compose up
|
||||
|
||||
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
|
||||
This will run 3 container Docker : Dolibarr, MariaDB and PhpMyAdmin.
|
||||
|
||||
The URL to go to the Dolibarr is :
|
||||
|
||||
@@ -26,9 +24,5 @@ The URL to go to PhpMyAdmin is (login/password is root/root) :
|
||||
|
||||
http://0.0.0.0:8080
|
||||
|
||||
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
|
||||
|
||||
http://0.0.0.0:8081
|
||||
|
||||
Setup the database connection during the installation process, please use mariadb (name of the database container) as database host.
|
||||
Setup documents folder, during the installation process, to /var/documents
|
||||
Setup the database connection during the installation process, please use mariad
|
||||
b (name of the database container) as database host.
|
||||
|
||||
@@ -1,57 +1,25 @@
|
||||
version: '3'
|
||||
|
||||
networks:
|
||||
internal-pod:
|
||||
internal: true
|
||||
external-pod:
|
||||
internal: false
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
mariadb:
|
||||
build: mariadb
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: dolibarr
|
||||
ports:
|
||||
- "3306:3306"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
phpmyadmin:
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
environment:
|
||||
PMA_HOST: mariadb
|
||||
depends_on:
|
||||
links:
|
||||
- mariadb
|
||||
ports:
|
||||
- "8080:80"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
web:
|
||||
web:
|
||||
build: .
|
||||
environment:
|
||||
HOST_USER_ID: $HOST_USER_ID
|
||||
volumes:
|
||||
- ../../htdocs:/var/www/html/
|
||||
- ../../documents:/var/documents
|
||||
- ../../htdocs:/var/www/html
|
||||
links:
|
||||
- mariadb
|
||||
ports:
|
||||
- "80:80"
|
||||
- "9000:9000"
|
||||
depends_on:
|
||||
- mariadb
|
||||
- mail
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
mail:
|
||||
image: maildev/maildev
|
||||
ports:
|
||||
- "8081:80"
|
||||
- "25:25"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
@@ -1,21 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
usermod -u ${HOST_USER_ID} www-data
|
||||
groupmod -g ${HOST_USER_ID} www-data
|
||||
usermod -u $HOST_USER_ID www-data
|
||||
groupmod -g $HOST_USER_ID www-data
|
||||
|
||||
chgrp -hR www-data /var/www/html
|
||||
chmod g+rwx /var/www/html/conf
|
||||
|
||||
if [ ! -d /var/documents ]; then
|
||||
echo "[docker-run] => create volume directory /var/documents ..."
|
||||
mkdir -p /var/documents
|
||||
fi
|
||||
echo "[docker-run] => Set Permission to www-data for /var/documents"
|
||||
chown -R www-data:www-data /var/documents
|
||||
|
||||
if [ ! -f /usr/local/etc/php/php.ini ]; then
|
||||
cat <<EOF > /usr/local/etc/php/php.ini
|
||||
date.timezone = $PHP_INI_DATE_TIMEZONE
|
||||
display_errors = On
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Dolibarr source code documentation</title>
|
||||
<title>$title</title>
|
||||
<!-- from dolibarr.org -->
|
||||
<meta http-equiv="Content-Type" content="text/html" charset=utf-8 />
|
||||
<meta name="verify-v1"
|
||||
|
||||
@@ -5,7 +5,6 @@ It's a dedicated Dolibarr version for Windows newbies with no technical knowledg
|
||||
|
||||
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).
|
||||
The build of .exe files need to have some windows executable files already installed (Apache, MariaDb). The package to install to get this files are defined into the file *doliwamp.iss* (searhc line starting with "; Value OK:")
|
||||
|
||||
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).
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ Source: "C:\wamp64\bin\mariadb\mariadb10.4.10\*.*"; DestDir: "{app}\bin\mariadb\
|
||||
;Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mariadb\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db"
|
||||
|
||||
; Dolibarr
|
||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,nltechno*\*,sabre\sabre\*\tests,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
|
||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,nltechno*\*,sabre\sabre\*\tests,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
|
||||
Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,initdemo\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,vagrant\*,xdebug\*"
|
||||
Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png"
|
||||
Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
|
||||
|
||||
@@ -22,7 +22,6 @@ $force_install_databaserootpass='WAMPMYSQLNEWPASSWORD';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='644';
|
||||
$force_install_distrib='doliwamp';
|
||||
|
||||
$force_install_module='';
|
||||
?>
|
||||
@@ -22,9 +22,7 @@
|
||||
* \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();
|
||||
$script_file = basename(__FILE__);
|
||||
@@ -52,18 +50,15 @@ if (empty($argv[1])) {
|
||||
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;
|
||||
}
|
||||
|
||||
parse_str($argv[1]);
|
||||
|
||||
$i=0;
|
||||
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])) {
|
||||
$tmp=explode(':', $includeconstant, 3); // $includeconstant has been set with previous parse_str()
|
||||
$tmp=explode(':', $includeconstant, 3);
|
||||
if (count($tmp) != 3) {
|
||||
print "Error: Bad parameter includeconstant=".$includeconstant."\n";
|
||||
print "Error: Bad parameter includeconstant ".$includeconstant."\n";
|
||||
exit -1;
|
||||
}
|
||||
$includeconstants[$tmp[0]][$tmp[1]] = $tmp[2];
|
||||
@@ -83,9 +78,7 @@ $savrelease = $release;
|
||||
$tmpver=explode('-', $release, 2);
|
||||
if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') {
|
||||
$release=DOL_VERSION;
|
||||
if ($tmpver[1] && $tmpver[0] == 'auto') {
|
||||
$release.='-'.$tmpver[1];
|
||||
}
|
||||
if ($tmpver[1] && $tmpver[0] == 'auto') $release.='-'.$tmpver[1];
|
||||
}
|
||||
|
||||
if (empty($includecustom)) {
|
||||
@@ -112,12 +105,12 @@ if (empty($includecustom)) {
|
||||
}
|
||||
}
|
||||
|
||||
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
|
||||
print "Release : ".$release."\n";
|
||||
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
|
||||
print "Include custom in signature : ".$includecustom."\n";
|
||||
print "Include constants in signature : ";
|
||||
foreach ($includeconstants as $countrycode => $tmp) {
|
||||
foreach ($tmp as $constname => $constvalue) {
|
||||
foreach($tmp as $constname => $constvalue) {
|
||||
print $constname.'='.$constvalue." ";
|
||||
}
|
||||
}
|
||||
@@ -132,17 +125,12 @@ $checksumconcat=array();
|
||||
|
||||
$outputfile=$outputdir.'/filelist-'.$release.'.xml';
|
||||
$fp = fopen($outputfile, 'w');
|
||||
if (empty($fp)) {
|
||||
print 'Failed to open file '.$outputfile."\n";
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
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");
|
||||
|
||||
foreach ($includeconstants as $countrycode => $tmp) {
|
||||
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
|
||||
foreach ($tmp as $constname => $constvalue) {
|
||||
foreach($tmp as $constname => $constvalue) {
|
||||
$valueforchecksum=(empty($constvalue)?'0':$constvalue);
|
||||
$checksumconcat[]=$valueforchecksum;
|
||||
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
|
||||
@@ -157,11 +145,9 @@ $iterator1 = new RecursiveIteratorIterator($dir_iterator1);
|
||||
// Need to ignore document custom etc. Note: this also ignore natively symbolic links.
|
||||
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
*/
|
||||
// Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
|
||||
$regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude = '('.($includecustom?'':'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
foreach ($files as $filetmp) {
|
||||
@@ -169,10 +155,9 @@ foreach ($files as $filetmp) {
|
||||
//$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
if ($needtoclose) {
|
||||
if ($needtoclose)
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
}
|
||||
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
|
||||
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose=1;
|
||||
}
|
||||
@@ -213,9 +198,8 @@ foreach ($files as $filetmp) {
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
if ($needtoclose) {
|
||||
if ($needtoclose)
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
}
|
||||
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose=1;
|
||||
|
||||
@@ -390,9 +390,6 @@ if ($nboftargetok) {
|
||||
$olddir=getcwd();
|
||||
chdir("$SOURCE");
|
||||
|
||||
print "Clean $SOURCE/htdocs\n";
|
||||
$ret=`rm -f $SOURCE/htdocs/includes/autoload.php`;
|
||||
|
||||
$ret=`git ls-files . --exclude-standard --others`;
|
||||
if ($ret)
|
||||
{
|
||||
@@ -479,7 +476,6 @@ if ($nboftargetok) {
|
||||
$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/README-*.md`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/Doli*-*`;
|
||||
@@ -508,9 +504,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/pgsql/README`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/install/mssql`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/install/sqlite3`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/node_modules`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/ansible`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codesniffer`;
|
||||
@@ -582,53 +575,52 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/workstation*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`;
|
||||
|
||||
# Removed other test files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
|
||||
|
||||
# Removed files installed by the awful composer
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/bin`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball for official debian, not for the rest
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/composer`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/doctrine`;
|
||||
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/doc`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/.gitmodules`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/docs`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/.github`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/docs`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/samples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/scripts`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/src`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/parsedown/LICENSE.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/.gitattributes`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/license.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/PDF`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Examples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/unitTests`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/tests`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/examples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/ae_fonts_*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/vendor`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/webmozart`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/autoload.php`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`;
|
||||
}
|
||||
|
||||
# Build package for each target
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
To make htmldoc working from wiki.dolibarr.org, the wiki must be modified to have
|
||||
To make htmldoc working from wiki.dolibarr.org, them must be modified to have
|
||||
|
||||
To disable part of content, add:
|
||||
class="htmldoc-ignore"
|
||||
with css
|
||||
.htmldoc-ignore { display: none; }
|
||||
|
||||
Note:
|
||||
$_SERVER["HTTP_USER_AGENT"] is "HTMLDOC/x.y.z"
|
||||
$_COOKIE["htmldoc"] may also be defined if set on command line.
|
||||
|
||||
To disable part, add
|
||||
class="htmldoc-ignore" with css
|
||||
.htmldoc-ignore { display: none; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#HTMLDOC 1.8.27
|
||||
-t pdf14 -f "../../doc/dolibarr_en.pdf" --webpage --no-title --logoimage "../../doc/images/dolibarr_256x256.png" --linkcolor #2200c0 --linkstyle plain --size Universal --left 0.30in --right 0.30in --top 0.40in --bottom 0.30in --header ... --header1 ... --footer c/d --nup 1 --tocheader ... --tocfooter ... --portrait --color --no-pscommands --no-xrxcomments --compression=9 --jpeg=50 --fontsize 10.0 --fontspacing 1.0 --headingfont Helvetica --bodyfont Helvetica --headfootsize 9.0 --headfootfont Helvetica --charset iso-8859-1 --links --no-embedfonts --pagemode document --pagelayout single --firstpage p1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680 --no-strict --no-overflow
|
||||
https://wiki.dolibarr.org/index.php/Home
|
||||
https://wiki.dolibarr.org/index.php/What_Dolibarr_Does
|
||||
http://wiki.dolibarr.org/index.php/Main_Page
|
||||
http://wiki.dolibarr.org/index.php/What_Dolibarr_Do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file dolibarr.pl
|
||||
# \brief Dolibarr script install for Virtualmin Pro
|
||||
# \author (c)2009-2020 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()
|
||||
sub script_dolibarr_versions
|
||||
{
|
||||
return ( "12.0.3", "11.0.5", "10.0.7", "9.0.4", "8.0.6", "7.0.5" );
|
||||
return ( "10.0.0", "9.0.3", "8.0.5", "7.0.5", "6.0.8" );
|
||||
}
|
||||
|
||||
sub script_dolibarr_release
|
||||
@@ -77,16 +77,6 @@ if ($ver >= 3.6) {
|
||||
push(@rv, "Dolibarr requires PHP version 5.3 or later");
|
||||
}
|
||||
}
|
||||
if ($ver >= 12.0) {
|
||||
# Check for PHP 5.6+
|
||||
local $phpv = &get_php_version($phpver || 5, $d);
|
||||
if (!$phpv) {
|
||||
push(@rv, "Could not work out exact PHP version");
|
||||
}
|
||||
elsif ($phpv < 5.6) {
|
||||
push(@rv, "Dolibarr requires PHP version 5.6 or later");
|
||||
}
|
||||
}
|
||||
|
||||
return @rv;
|
||||
}
|
||||
@@ -386,7 +376,7 @@ sub script_dolibarr_realversion
|
||||
local ($d, $opts, $sinfo) = @_;
|
||||
local $lref = &read_file_lines("$opts->{'dir'}/filefunc.inc.php", 1);
|
||||
foreach my $l (@$lref) {
|
||||
if ($l =~ /'DOL_VERSION',\s?'([0-9a-z\.\-]+)'/) {
|
||||
if ($l =~ /'DOL_VERSION','([0-9a-z\.\-]+)'/) {
|
||||
return $1;
|
||||
}
|
||||
}
|
||||
@@ -400,8 +390,6 @@ sub script_dolibarr_check_latest
|
||||
{
|
||||
local ($ver) = @_;
|
||||
local @vers = &osdn_package_versions("dolibarr",
|
||||
$ver >= 12.0 ? "dolibarr\\-(12\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 11.0 ? "dolibarr\\-(11\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 10.0 ? "dolibarr\\-(10\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 9.0 ? "dolibarr\\-(9\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 8.0 ? "dolibarr\\-(8\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
@@ -422,7 +410,7 @@ return $ver eq $vers[0] ? undef : $vers[0];
|
||||
|
||||
sub script_dolibarr_site
|
||||
{
|
||||
return 'https://www.dolibarr.org/';
|
||||
return 'http://www.dolibarr.org/';
|
||||
}
|
||||
|
||||
sub script_dolibarr_passmode
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
PHPStan
|
||||
|
||||
https://phpstan.org
|
||||
|
||||
PHPStan requires PHP >= 7.1
|
||||
|
||||
Install: composer require --dev phpstan/phpstan
|
||||
|
||||
Config File: phpstan.neon
|
||||
@@ -3,54 +3,48 @@ README (English)
|
||||
RPM Package tools
|
||||
##################################################
|
||||
|
||||
This directory contains files used by makepack-dolibarr.pl script to build a package,
|
||||
ready to be distributed with format RPM (https://rpm.org)
|
||||
for Linux Distributions like Redhat, Fedora, CentOS, OpenSuse, OpenMandriva, Mageia ...
|
||||
This directory contains files used by makepack-dolibarr.pl
|
||||
script to build a package, ready to be distributed,
|
||||
with format RPM (for Redhat, OpenSuse, Mandriva, ...).
|
||||
|
||||
|
||||
# This is standard command to work on RPM packaging:
|
||||
|
||||
#
|
||||
# To install all packagers tools:
|
||||
- Fedora: yum -y install rpmlint fedora-packager mock koji hunspell-en hunspell-es hunspell-fr hunspell-it
|
||||
- OpenSuse: yast --install update-desktop-files
|
||||
|
||||
# Fedora: yum -y install rpmlint fedora-packager mock koji hunspell-en hunspell-es hunspell-fr hunspell-it
|
||||
# OpenSuse: yast --install update-desktop-files
|
||||
#
|
||||
# rpmlint file.rpm Test a package
|
||||
# mock -r fedora-15-i386 --rebuild ../SRPMS/hello-2.7-1.fc15.src.rpm
|
||||
|
||||
|
||||
# On Fedora
|
||||
# =========
|
||||
# rpm -i --test dolibarr-...rpm to list dependencies of RPM
|
||||
# yum -v install dolibarr-...rpm to install package and dependencies
|
||||
# yum -v erase dolibarr to remove package
|
||||
# chcon -R -h -t httpd_sys_script_rw_t /file to add temporary context rw for httpd on /file
|
||||
# restorecon -R -v /file to restore values into files (cancel chcon, validate semanage)
|
||||
# semanage fcontext -a -t httpd_sys_script_rw_t "/dir/(.*)?" to add persistent context rw for httpd on /dir (this add file_contexts.local)
|
||||
|
||||
|
||||
# On OpenSuse
|
||||
# ===========
|
||||
# zypper install dolibarr-...rpm to install package and dependencies
|
||||
# zypper remove dolibarr to remove package
|
||||
# zypper search xxx to search a package
|
||||
|
||||
|
||||
# On Mageia (after su - root)
|
||||
# ===========================
|
||||
# urpmi dolibarr-...rpm to install package and dependencies
|
||||
# urpme dolibarr to remove package
|
||||
#
|
||||
# On Fedora
|
||||
# rpm -i --test dolibarr-...rpm To list dependencies of RPM
|
||||
# yum -v install dolibarr-...rpm To install package and dependencies
|
||||
# yum -v erase dolibarr To remove package
|
||||
# chcon -R -h -t httpd_sys_script_rw_t /file To add temporary context rw for httpd on /file
|
||||
# semanage fcontext -a -t httpd_sys_script_rw_t "/dir/(.*)?" To add persistent context rw for httpd on /dir (this add file_contexts.local)
|
||||
# restorecon -R -v /file Restore values into files (cancel chcon, validate semanage)
|
||||
#
|
||||
# On OpenSuse
|
||||
# zypper install dolibarr-...rpm To install package and dependencies
|
||||
# zypper remove dolibarr To remove package
|
||||
# zypper search xxx To search a package
|
||||
#
|
||||
# On Mageia (after su - root)
|
||||
# urpmi dolibarr-...rpm To install package and dependencies
|
||||
# urpme dolibarr To remove package
|
||||
#
|
||||
# More on rpm on page http://www.trustonme.net/didactels/273.html
|
||||
|
||||
|
||||
To submit a package to Fedora:
|
||||
- Create account on https://bugzilla.redhat.com
|
||||
- Create account on https://developer.fedoraproject.org/
|
||||
- Create SRPMS package
|
||||
- Upload package on https://fedorapeople.org
|
||||
- Create account on bugzilla.redhat.com
|
||||
- Create account on fedoraproject.org
|
||||
- Create SRPMS package.
|
||||
- Upload package onf http://fedorapeople.org
|
||||
- Create a bug with form https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review
|
||||
|
||||
This is example of content of review field (used for Bug 723326 - https://bugzilla.redhat.com/show_bug.cgi?id=723326):
|
||||
SRPMS URL: https://www.dolibarr.org/files/fedora/dolibarr-x.y.z-xxx.src.rpm
|
||||
SRPMS URL: http://www.dolibarr.org/files/fedora/dolibarr-x.y.z-xxx.src.rpm
|
||||
Description: Dolibarr ERP & CRM is an easy to use open source/free software
|
||||
for small and medium companies, foundations or freelances. It includes
|
||||
different features for Enterprise Resource Planning (ERP) and Customer
|
||||
@@ -62,4 +56,4 @@ is my first package to maintain myself. So i'm seeking a sponsor.
|
||||
- Install fedora packager tools: yum install fedora-packager
|
||||
- Setup fedora packagers tools: fedora-packager-setup
|
||||
- Send your package: koji build --scratch f16 path_to_source_RPM
|
||||
- Check if package is available: https://koji.fedoraproject.org/koji/
|
||||
- Check if package is available: http://koji.fedoraproject.org/koji/
|
||||
@@ -181,11 +181,9 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/debugbar
|
||||
%_datadir/dolibarr/htdocs/delivery
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
%_datadir/dolibarr/htdocs/eventorganization
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
@@ -198,9 +196,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/imports
|
||||
%_datadir/dolibarr/htdocs/includes
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/intracommreport
|
||||
%_datadir/dolibarr/htdocs/knowledgemanagement
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
@@ -208,14 +205,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/mrp
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/partnership
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/recruitment
|
||||
%_datadir/dolibarr/htdocs/reception
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/salaries
|
||||
@@ -230,7 +225,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/website
|
||||
%_datadir/dolibarr/htdocs/workstation
|
||||
%_datadir/dolibarr/htdocs/zapier
|
||||
%_datadir/dolibarr/htdocs/*.ico
|
||||
%_datadir/dolibarr/htdocs/*.patch
|
||||
@@ -279,6 +273,7 @@ then
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
|
||||
@@ -67,8 +67,7 @@ Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mbstring
|
||||
Requires: mysql-server, mysql
|
||||
Requires: php-mysqli >= 4.1.0
|
||||
%endif
|
||||
%endif%_datadir/dolibarr/htdocs/eventorganization
|
||||
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)
|
||||
@@ -262,11 +261,9 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/debugbar
|
||||
%_datadir/dolibarr/htdocs/delivery
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
%_datadir/dolibarr/htdocs/eventorganization
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
@@ -279,9 +276,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/imports
|
||||
%_datadir/dolibarr/htdocs/includes
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/intracommreport
|
||||
%_datadir/dolibarr/htdocs/knowledgemanagement
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
@@ -289,14 +285,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/mrp
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/partnership
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/recruitment
|
||||
%_datadir/dolibarr/htdocs/reception
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/salaries
|
||||
@@ -311,7 +305,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/website
|
||||
%_datadir/dolibarr/htdocs/workstation
|
||||
%_datadir/dolibarr/htdocs/zapier
|
||||
%_datadir/dolibarr/htdocs/*.ico
|
||||
%_datadir/dolibarr/htdocs/*.patch
|
||||
@@ -430,6 +423,7 @@ then
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
|
||||
@@ -177,12 +177,10 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/delivery
|
||||
%_datadir/dolibarr/htdocs/debugbar
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
%_datadir/dolibarr/htdocs/eventorganization
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
@@ -195,9 +193,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/imports
|
||||
%_datadir/dolibarr/htdocs/includes
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/intracommreport
|
||||
%_datadir/dolibarr/htdocs/knowledgemanagement
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
@@ -205,14 +202,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/mrp
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/partnership
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/recruitment
|
||||
%_datadir/dolibarr/htdocs/reception
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/salaries
|
||||
@@ -227,7 +222,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/website
|
||||
%_datadir/dolibarr/htdocs/workstation
|
||||
%_datadir/dolibarr/htdocs/zapier
|
||||
%_datadir/dolibarr/htdocs/*.ico
|
||||
%_datadir/dolibarr/htdocs/*.patch
|
||||
@@ -276,6 +270,7 @@ then
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
|
||||
@@ -189,11 +189,9 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/debugbar
|
||||
%_datadir/dolibarr/htdocs/delivery
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
%_datadir/dolibarr/htdocs/eventorganization
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
@@ -206,9 +204,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/imports
|
||||
%_datadir/dolibarr/htdocs/includes
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/intracommreport
|
||||
%_datadir/dolibarr/htdocs/knowledgemanagement
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
@@ -216,14 +213,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/mrp
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/partnership
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/recruitment
|
||||
%_datadir/dolibarr/htdocs/reception
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/salaries
|
||||
@@ -238,7 +233,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/website
|
||||
%_datadir/dolibarr/htdocs/workstation
|
||||
%_datadir/dolibarr/htdocs/zapier
|
||||
%_datadir/dolibarr/htdocs/*.ico
|
||||
%_datadir/dolibarr/htdocs/*.patch
|
||||
@@ -287,6 +281,7 @@ then
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
|
||||
@@ -17,7 +17,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
$force_install_distrib='rpmfedora';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
@@ -25,6 +24,7 @@ $force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
$force_dolibarr_lib_PHPEXCEL_PATH='';
|
||||
$force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
|
||||
@@ -17,7 +17,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
$force_install_distrib='rpmgeneric';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
// We don't force any external lib with generic package
|
||||
|
||||
@@ -17,7 +17,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
$force_install_distrib='rpmmandriva';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
@@ -25,6 +24,7 @@ $force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
$force_dolibarr_lib_PHPEXCEL_PATH='';
|
||||
$force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
|
||||
@@ -17,7 +17,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
$force_install_distrib='rpmopensuse';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
//$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
@@ -25,6 +24,7 @@ $force_install_distrib='rpmopensuse';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
$force_dolibarr_lib_PHPEXCEL_PATH='';
|
||||
$force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Format of sitemap file is available at
|
||||
# https://www.sitemaps.org/protocol.html
|
||||
# http://www.sitemaps.org/protocol.html
|
||||
|
||||
# To build a sitemap from urllist-bing.txt, run
|
||||
# google-sitemapgen --config=config-bing.xml --testing
|
||||
|
||||
@@ -1 +1 @@
|
||||
https://wiki.dolibarr.org/
|
||||
http://wiki.dolibarr.org/
|
||||
|
||||
@@ -29,17 +29,15 @@
|
||||
"ckeditor/ckeditor" : "4.12.1",
|
||||
"mike42/escpos-php" : "2.2",
|
||||
"mobiledetect/mobiledetectlib" : "2.8.34",
|
||||
"phpoffice/phpexcel" : "1.8.2",
|
||||
"phpoffice/phpexcel" : "1.8.1",
|
||||
"restler/framework" : "3.0.0-RC6",
|
||||
"tecnickcom/tcpdf" : "6.3.2",
|
||||
"nnnick/chartjs" : "^2.9",
|
||||
"stripe/stripe-php" : "6.43.1",
|
||||
"maximebf/debugbar" : "1.15.1",
|
||||
"symfony/var-dumper" : "3"
|
||||
"stripe/stripe-php" : "6.43.1"
|
||||
},
|
||||
"require-dev" : {
|
||||
"php-parallel-lint/php-parallel-lint" : "^0",
|
||||
"php-parallel-lint/php-console-highlighter" : "^0",
|
||||
"jakub-onderka/php-parallel-lint" : "^0",
|
||||
"jakub-onderka/php-console-highlighter" : "^0",
|
||||
"phpunit/phpunit" : "^4",
|
||||
"squizlabs/php_codesniffer" : "^2",
|
||||
"phpunit/phpunit-selenium" : "^2"
|
||||
|
||||
733
composer.lock
generated
733
composer.lock
generated
File diff suppressed because it is too large
Load Diff
15
dev/README
15
dev/README
@@ -1,14 +1,13 @@
|
||||
README (English)
|
||||
--------------------------------
|
||||
This directory contains sub-directories to provide tools or
|
||||
documentation for developers.
|
||||
Note: All files in this directory are in VCS only and are not
|
||||
provided with a standard release.
|
||||
|
||||
This directory contains sub-directories to provide tools or documentation for developers.
|
||||
|
||||
Note: All files in this directory are in the source repository only and are not provided with a standard release. They are useless to make Dolibarr working.
|
||||
|
||||
You may find a more complete documentation on Dolibarr on the wiki:
|
||||
|
||||
There is also some documentation on Dolibarr Wiki:
|
||||
https://wiki.dolibarr.org/
|
||||
|
||||
and on
|
||||
|
||||
and
|
||||
https://doxygen.dolibarr.org/
|
||||
|
||||
|
||||
@@ -28,6 +28,19 @@ With
|
||||
|
||||
|
||||
|
||||
DEBUGBAR:
|
||||
---------
|
||||
|
||||
Move
|
||||
this.options = {
|
||||
bodyMarginBottom: true,
|
||||
bodyMarginBottomHeight: parseInt($('body').css('margin-bottom')),
|
||||
};
|
||||
few line lower in the
|
||||
initialize: function() {
|
||||
|
||||
|
||||
|
||||
ESCPOS:
|
||||
-------
|
||||
Replace
|
||||
@@ -48,14 +61,6 @@ By
|
||||
* In file nusoap.php, to avoid a warning,
|
||||
Replace call to serialize_val with no bugged value
|
||||
|
||||
* In all files, replace constructor names into __construct. Replace also parent::constructor_name with parent::__construct
|
||||
|
||||
* Line 4222 of file nusoap.php
|
||||
|
||||
$rev = array();
|
||||
preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
|
||||
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -135,13 +140,15 @@ with
|
||||
elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
|
||||
|
||||
* In tecnickcom/tcpdf/include/tcpdf_static.php, in function fopenLocal, replace
|
||||
|
||||
* In tecnickcom/tcpdf/include/tcpdf_static, in function fopenLocal, replace
|
||||
|
||||
if (strpos($filename, '://') === false) {
|
||||
|
||||
with
|
||||
|
||||
if (strpos($filename, '//') === 0) {
|
||||
if (strpos($filename, '//') === 0)
|
||||
{
|
||||
// Share folder on a (windows) server
|
||||
// e.g.: "//[MyServerName]/[MySharedFolder]/"
|
||||
//
|
||||
@@ -168,22 +175,33 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
|
||||
- protected $default_monospaced_font = 'courier';
|
||||
+ protected $default_monospaced_font = 'freemono';
|
||||
|
||||
* In tecnickcom/tcpdf/include/tcpdf_static, in function intToRoman, right at the beginning
|
||||
of the function, replace:
|
||||
|
||||
$roman = '';
|
||||
|
||||
with:
|
||||
|
||||
$roman = '';
|
||||
if ($number >= 4000) {
|
||||
// do not represent numbers above 4000 in Roman numerals
|
||||
return strval($number);
|
||||
}
|
||||
|
||||
|
||||
|
||||
TCPDI:
|
||||
------
|
||||
Add file fpdf_tpl.php 1.2
|
||||
Add fpdf_tpl.php 1.2
|
||||
Add tcpdi.php
|
||||
|
||||
Add file tcpdi.php
|
||||
|
||||
Add file tcpdi_parser.php and replace:
|
||||
require_once(dirname(__FILE__).'/include/tcpdf_filters.php');
|
||||
Add tcpdi_parser.php and replace:
|
||||
require_once(dirname(__FILE__).'/include/tcpdf_filters.php');
|
||||
with:
|
||||
require_once(dirname(__FILE__).'/../tecnickcom/tcpdf/include/tcpdf_filters.php');
|
||||
require_once(dirname(__FILE__).'/../tecnickcom/tcpdf/include/tcpdf_filters.php');
|
||||
|
||||
|
||||
* Fix syntax error by replacing
|
||||
* Fix by replacing
|
||||
} elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1] >= 2))) {
|
||||
with
|
||||
} elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1]) >= 2)) {
|
||||
@@ -193,23 +211,25 @@ with
|
||||
JSGANTT:
|
||||
--------
|
||||
* Replace in function JSGantt.taskLink
|
||||
var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
|
||||
var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
|
||||
with
|
||||
// LDR To open in same window
|
||||
//var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
|
||||
window.location.href=pRef
|
||||
// LDR To open in same window
|
||||
//var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
|
||||
window.location.href=pRef
|
||||
|
||||
* Replace
|
||||
vTmpDiv=this.newNode(vTmpCell, 'div', null, null, vTaskList[i].getResource());
|
||||
vTmpDiv=this.newNode(vTmpCell, 'div', null, null, vTaskList[i].getResource());
|
||||
with
|
||||
var vTmpNode=this.newNode(vTmpCell, 'div', null, '');
|
||||
vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']);
|
||||
vTmpNode.setAttribute('href',vTaskList[i].getLink());
|
||||
var vTmpNode=this.newNode(vTmpCell, 'div', null, '');
|
||||
vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']);
|
||||
vTmpNode.setAttribute('href',vTaskList[i].getLink());
|
||||
|
||||
* Replace '% Comp.' to have a smaller text column header
|
||||
'comp':'% Comp.'
|
||||
'comp':'% Comp.'
|
||||
with
|
||||
'comp':'%'
|
||||
'comp':'%'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -223,42 +243,28 @@ JQUERYFILETREE:
|
||||
* 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:
|
||||
--------
|
||||
Change content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
|
||||
|
||||
+With swagger 2:
|
||||
|
||||
* Add line into Util.php to complete function
|
||||
|
||||
public static function getShortName($className)
|
||||
{
|
||||
// @CHANGE LDR
|
||||
if (!is_string($className)) return;
|
||||
if (! is_string($className)) return;
|
||||
//var_dump($className);
|
||||
|
||||
* Add line into Data/Text.php to complete function
|
||||
|
||||
public static function endsWith($haystack, $needle)
|
||||
{
|
||||
$length = strlen($needle);
|
||||
if ($length == 0) {
|
||||
return true;
|
||||
}
|
||||
// @CHANGE LDR
|
||||
if (!is_string($haystack)) return false;
|
||||
|
||||
* Replace
|
||||
|
||||
$loaders = array_unique(static::$rogueLoaders);
|
||||
|
||||
with
|
||||
|
||||
$loaders = array_unique(static::$rogueLoaders, SORT_REGULAR);
|
||||
|
||||
|
||||
+With swagger 2 provided into /explorer:
|
||||
----------------------------------------
|
||||
|
||||
Change content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
|
||||
|
||||
|
||||
|
||||
PARSEDOWN
|
||||
|
||||
@@ -49,10 +49,7 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$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();
|
||||
|
||||
|
||||
@@ -85,16 +82,19 @@ $obj->lines[]=$line1;
|
||||
|
||||
// Create invoice
|
||||
$idobject=$obj->create($user);
|
||||
if ($idobject > 0) {
|
||||
if ($idobject > 0)
|
||||
{
|
||||
// Change status to validated
|
||||
$result=$obj->validate($user);
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
if ($result > 0) print "OK Object created with id ".$idobject."\n";
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $obj->error);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $obj->error);
|
||||
}
|
||||
@@ -102,10 +102,13 @@ if ($idobject > 0) {
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error) {
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print '--- end error code='.$error."\n";
|
||||
$db->rollback();
|
||||
}
|
||||
|
||||
@@ -49,10 +49,7 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$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();
|
||||
|
||||
|
||||
@@ -83,16 +80,19 @@ $com->lines[]=$orderline1;
|
||||
|
||||
// Create order
|
||||
$idobject=$com->create($user);
|
||||
if ($idobject > 0) {
|
||||
if ($idobject > 0)
|
||||
{
|
||||
// Change status to validated
|
||||
$result=$com->valid($user);
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
if ($result > 0) print "OK Object created with id ".$idobject."\n";
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $com->error);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $com->error);
|
||||
}
|
||||
@@ -100,10 +100,13 @@ if ($idobject > 0) {
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error) {
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print '--- end error code='.$error."\n";
|
||||
$db->rollback();
|
||||
}
|
||||
|
||||
@@ -49,10 +49,7 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$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();
|
||||
|
||||
|
||||
@@ -82,19 +79,25 @@ $myproduct->weight_units = 0;
|
||||
|
||||
// Create product in database
|
||||
$idobject = $myproduct->create($user);
|
||||
if ($idobject > 0) {
|
||||
if ($idobject > 0)
|
||||
{
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $myproduct->error);
|
||||
}
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error) {
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print '--- end error code='.$error."\n";
|
||||
$db->rollback();
|
||||
}
|
||||
|
||||
@@ -49,10 +49,7 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$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();
|
||||
|
||||
|
||||
@@ -72,18 +69,23 @@ $obj->nom = 'ABCDEF';
|
||||
|
||||
// Create user
|
||||
$idobject=$obj->create($user);
|
||||
if ($idobject > 0) {
|
||||
if ($idobject > 0)
|
||||
{
|
||||
// Change status to validated
|
||||
$result=$obj->setStatut(1);
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
if ($result > 0) print "OK Object created with id ".$idobject."\n";
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $obj->error);
|
||||
}
|
||||
} elseif ($obj->error == 'ErrorLoginAlreadyExists') {
|
||||
}
|
||||
elseif ($obj->error == 'ErrorLoginAlreadyExists')
|
||||
{
|
||||
print "User with login ".$obj->login." already exists\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $obj->error);
|
||||
}
|
||||
@@ -91,10 +93,13 @@ if ($idobject > 0) {
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error) {
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print '--- end error code='.$error."\n";
|
||||
$db->rollback();
|
||||
}
|
||||
|
||||
@@ -49,10 +49,7 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$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();
|
||||
|
||||
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
Delivered-To: testldrdev@gmail.com
|
||||
Received: by 2002:a2e:9b9a:0:0:0:0:0 with SMTP id z26csp1425223lji;
|
||||
Thu, 20 Aug 2020 08:29:02 -0700 (PDT)
|
||||
X-Received: by 2002:a05:620a:1292:: with SMTP id w18mr2938234qki.158.1597937342304;
|
||||
Thu, 20 Aug 2020 08:29:02 -0700 (PDT)
|
||||
ARC-Seal: i=1; a=rsa-sha256; t=1597937342; cv=none;
|
||||
d=google.com; s=arc-20160816;
|
||||
b=FhT/+rJ/zNYgVQ5Nt/rLZJycGd/Ntkhm6LwI16YUfmEmxeGrP/cXXQULrqQ1LhBr9B
|
||||
oRKweltTdnpyA14gm0kzbs1vUkf5HxLUuGk8IqqJWAPMUZoN8oUPkzq2BuKNQGxPiE+y
|
||||
Hsg/fnYp8WzcAlZOLsEP2kcFIdA95Dyy5LkM8HgphI1jSS1d6gkx6nDGIMIpDD9D+w4X
|
||||
ISxRUXp5JlDwFCUMOPoAvHIBUdJ3jpLsjesbMEnU4ssFqhxU21pBq+Fc+csSPeY5DL0M
|
||||
HR1o+ChEAXIdDOrDqa0ohHfqR216juGCzH8YuEQ88LT0Qbst9IkOYWiAQv4TIh7vHtvQ
|
||||
TMvA==
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
|
||||
h=to:subject:message-id:date:from:mime-version:dkim-signature;
|
||||
bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=;
|
||||
b=CRlrRPfoGkfmz6iXKy4HdxKQ4SeJTiIxjC2jNkgQPSnIDFJgDkJcwASJVpcjTmlVmH
|
||||
Z9WnHKVUPRIHGDEoMRlx6eUx9QfelWqPYu3BBQGFry9sgth0BR/1s6tmQ+P+bAj23ryo
|
||||
aL3UkF6KCSx4GhEk3MfHA5Ex81YDFHvHL3BZ2kb3XCVSlPiBq2szw1ETmRAsDdS5Gbu+
|
||||
ZlzBbl4pRtUWgi1fB5H4Wcv7e90F4Et1SBP8IKSCa23qu2nV9xefgjfMw2ndxCj1zgCL
|
||||
c3l7Ul6pw32nqf6+vxfZTstwIwgu6dXZXCHDqJqesI2g8RGxeba+LfKZEDpBuSeINS9r
|
||||
GMvw==
|
||||
ARC-Authentication-Results: i=1; mx.google.com;
|
||||
dkim=pass header.i=@destailleur.fr header.s=google header.b=IPMz90Yj;
|
||||
spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr;
|
||||
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr
|
||||
Return-Path: <contact@destailleur.fr>
|
||||
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
|
||||
by mx.google.com with SMTPS id w14sor2138230qtb.9.2020.08.20.08.29.00
|
||||
for <testldrdev@gmail.com>
|
||||
(Google Transport Security);
|
||||
Thu, 20 Aug 2020 08:29:01 -0700 (PDT)
|
||||
Received-SPF: pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
|
||||
Authentication-Results: mx.google.com;
|
||||
dkim=pass header.i=@destailleur.fr header.s=google header.b=IPMz90Yj;
|
||||
spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr;
|
||||
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=destailleur.fr; s=google;
|
||||
h=mime-version:from:date:message-id:subject:to;
|
||||
bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=;
|
||||
b=IPMz90Yjw1Mf57/rYWUYGtpc+IazEWcy6/bqxf1j0h6rxDH/wjhxsCWzfARgqqlfVj
|
||||
ACg4IbPpZZlKFIYDSCbfMlWF65rbKfNre56HldfQgy0Tq3LC434zHz2ZZMOVCM52w3J9
|
||||
VGBpASUlSL1o+YRmzOpRtHVu7I9aNwGxHuA070Yka8XLV76vV3P0vdL8PcoHq0jUUEoi
|
||||
+dCZ9NCPuAFtGK2IavNoM2qQrLdfYIi+RwgWBtqjTwzyvDEJR+p5fIPK142ynMbHgWYO
|
||||
RVtMqAgxjvL4sfyKZ5KuzKXkQNM3zyzMinWK89scBl+QLFCcWA4Qqc0dJjqLCBhh8lmq
|
||||
n67g==
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20161025;
|
||||
h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
|
||||
bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=;
|
||||
b=H0GsrFAi9JmRTKQ2budtDeLBqCaTisHKYCVVziyxmv+/tIcrSZBA4tdKwm+wR80r50
|
||||
zMJXmyVS2DMDWfnIlOv39wcwQjYN3WK1aRJfV0bVuEWrQuzt5MMWbskf6xbzo201nhr9
|
||||
ZlqATsEV7v1u5EHmfYwRhR8+AOmENdnm0g9RXPJVrFS58WNEJUSotS5Y5rZPjnT943y0
|
||||
62Kf4Bd6uWvXhPFXWQoZLtWrPpkbcYPWIBmpftKhD0PD9c6rKaVduV0WhbigYsDoxb3F
|
||||
iIafGPOyq91hiHR2gTLHiMmTDm+IDQ4n6gSkS7HKpZlLQhHoBMnpqJZYoxMJTxdpAbSy
|
||||
mY+A==
|
||||
X-Gm-Message-State: AOAM5325RcN4/ThWbYCO3vWRMFFBrfzJUHC1bd1Z9VB3/2Q3RuF9lmIJ +SjshEErhK68Of2pHDZQ3aPU4rzDfV8ozbvRsgChdfZg8aA=
|
||||
X-Google-Smtp-Source: ABdhPJxUOUdurKEQfLldtiQGRkgC/h8gKQG1zhS+8k93p6N1SsOn517+GeRyT3E+/Uw536pmReO29la3EIAS6VT33SE=
|
||||
X-Received: by 2002:aed:3e8e:: with SMTP id n14mr3191190qtf.67.1597937340509; Thu, 20 Aug 2020 08:29:00 -0700 (PDT)
|
||||
MIME-Version: 1.0
|
||||
From: John Tester <customer@customercompany.fr>
|
||||
Date: Thu, 20 Aug 2020 17:28:34 +0200
|
||||
Message-ID: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com>
|
||||
Subject: Support besoin
|
||||
To: testldrdev@gmail.com
|
||||
Content-Type: multipart/alternative; boundary="0000000000008e099705ad50c772"
|
||||
|
||||
--0000000000008e099705ad50c772
|
||||
Content-Type: text/plain; charset="UTF-8"
|
||||
|
||||
adfsdfsdfds
|
||||
|
||||
--
|
||||
Laurent.
|
||||
------------------------------------------------------------------------------------
|
||||
Twitter: https://www.twitter.com/eldy10
|
||||
|
||||
--0000000000008e099705ad50c772
|
||||
Content-Type: text/html; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<div dir=3D"ltr">adfsdfsdfds<br clear=3D"all"><div><br></div>-- <br><div di=
|
||||
r=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature">Laur=
|
||||
ent.<br>-------------------------------------------------------------------=
|
||||
-----------------<br>Twitter: <a href=3D"https://www.twitter.com/eldy10" ta=
|
||||
rget=3D"_blank">https://www.twitter.com/eldy10</a></div></div>
|
||||
|
||||
--0000000000008e099705ad50c772--
|
||||
@@ -1,57 +0,0 @@
|
||||
Return-Path: <testldrdev@gmail.com>
|
||||
Received: from smtp.gmail.com ([2a01:e0a:7e:4ae0:329c:23ff:feb8:dc8d])
|
||||
by smtp.gmail.com with ESMTPSA id 32sm5811196wrh.18.2020.08.20.09.31.37
|
||||
for <customer@customercompany.fr>
|
||||
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
|
||||
Thu, 20 Aug 2020 09:31:37 -0700 (PDT)
|
||||
From: testldrdev@gmail.com
|
||||
X-Google-Original-From: <aa@aa.comg>
|
||||
To: customer@customercompany.fr
|
||||
Subject: [MyBigCompany - Ticket #TS2008-0040] Nouveau message
|
||||
Date: Thu, 20 Aug 2020 18:31:37 +0200
|
||||
Message-ID: <1597941097.SMTPs-dolibarr-tic58@83b5bc91f83a56e458db71e0adac2b62>
|
||||
References: <1597941097.SMTPs-dolibarr-tic58@83b5bc91f83a56e458db71e0adac2b62>
|
||||
X-Dolibarr-TRACKID: tic58@83b5bc91f83a56e458db71e0adac2b62
|
||||
X-RemoteAddr: 127.0.0.1
|
||||
X-Mailer: Dolibarr version 13.0.0-alpha (using SMTPs Mailer)
|
||||
X-Dolibarr-Option: MAIN_MAIL_USE_MULTI_PART
|
||||
Mime-Version: 1.0
|
||||
Content-Type: multipart/mixed; boundary="multipart_x.1597941097.x_boundary"
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
--multipart_x.1597941097.x_boundary
|
||||
Content-Type: multipart/alternative; boundary="mul_872cdd6a64216735955664484832b075"
|
||||
|
||||
--mul_872cdd6a64216735955664484832b075
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
|
||||
Bonjour
|
||||
|
||||
|
||||
Une nouvelle réponse a été ajoutée à un ticket que vous suivez. Voici
|
||||
le message :PredefinedMailContentTicket_send
|
||||
|
||||
|
||||
Vous pouvez voir la progression du ticket en cliquant sur le lien
|
||||
ci-dessus. : fr5uw2yospypn2rz
|
||||
Cordialement,
|
||||
|
||||
--
|
||||
--mul_872cdd6a64216735955664484832b075
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
|
||||
<html><head><title></title></head><body>Bonjour<br>
|
||||
|
||||
<br>
|
||||
Une nouvelle réponse a été ajoutée à un ticket que vous suivez. Voici
|
||||
le message :PredefinedMailContentTicket_send<br>
|
||||
<br>
|
||||
<br>
|
||||
Vous pouvez voir la progression du ticket en cliquant sur le lien
|
||||
ci-dessus. : <a
|
||||
href="http://localhostgit/dolibarr_dev/htdocs/public/ticket/view.php?track_id=fr5uw2yospypn2rz">fr5uw2yospypn2rz</a><br>
|
||||
<br>Cordialement,<br>
|
||||
<br>
|
||||
--</body></html>
|
||||
--mul_872cdd6a64216735955664484832b075--
|
||||
--multipart_x.1597941097.x_boundary--
|
||||
@@ -1,48 +0,0 @@
|
||||
MIME-Version: 1.0
|
||||
Date: Thu, 20 Aug 2020 18:34:01 +0200
|
||||
References: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com>
|
||||
In-Reply-To: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com>
|
||||
Message-ID: <CAC8+=32ccpEo12RR-juT=FW6+gNV-DcvNjxs_0s6Wn40xmfhug@mail.gmail.com>
|
||||
Subject: Re: Support besoin
|
||||
From: John Tester <testldrdev@gmail.com>
|
||||
To: John Tester <customer@customercompany.fr>
|
||||
Content-Type: multipart/alternative; boundary="0000000000001620dd05ad51b075"
|
||||
|
||||
--0000000000001620dd05ad51b075
|
||||
Content-Type: text/plain; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
Merci pour votre question.
|
||||
Voici la rep.
|
||||
|
||||
Le jeu. 20 ao=C3=BBt 2020 =C3=A0 17:29, John Tester <laurent@destai=
|
||||
lleur.fr>
|
||||
a =C3=A9crit :
|
||||
|
||||
> adfsdfsdfds
|
||||
>
|
||||
> --
|
||||
> Laurent.
|
||||
>
|
||||
> -------------------------------------------------------------------------=
|
||||
-----------
|
||||
> Twitter: https://www.twitter.com/eldy10
|
||||
>
|
||||
|
||||
--0000000000001620dd05ad51b075
|
||||
Content-Type: text/html; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<div dir=3D"ltr">Merci pour votre question.<div>Voici la rep.</div></div><b=
|
||||
r><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Le=C2=A0=
|
||||
jeu. 20 ao=C3=BBt 2020 =C3=A0=C2=A017:29, John Tester <<a href=
|
||||
=3D"mailto:customer@customercompany.fr">customer@customercompany.fr</a>> a =C3=A9c=
|
||||
rit=C2=A0:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0=
|
||||
px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div =
|
||||
dir=3D"ltr">adfsdfsdfds<br clear=3D"all"><div><br></div>-- <br><div dir=3D"=
|
||||
ltr">Laurent.<br>----------------------------------------------------------=
|
||||
--------------------------<br>Twitter: <a href=3D"https://www.twitter.com/e=
|
||||
ldy10" target=3D"_blank">https://www.twitter.com/eldy10</a></div></div>
|
||||
</blockquote></div>
|
||||
|
||||
--0000000000001620dd05ad51b075--
|
||||
@@ -1,134 +0,0 @@
|
||||
Delivered-To: testldrdev@gmail.com
|
||||
Received: by 2002:a2e:9b9a:0:0:0:0:0 with SMTP id z26csp1483607lji;
|
||||
Thu, 20 Aug 2020 09:56:03 -0700 (PDT)
|
||||
X-Received: by 2002:ac8:3868:: with SMTP id r37mr3301993qtb.95.1597942563252;
|
||||
Thu, 20 Aug 2020 09:56:03 -0700 (PDT)
|
||||
ARC-Seal: i=1; a=rsa-sha256; t=1597942563; cv=none;
|
||||
d=google.com; s=arc-20160816;
|
||||
b=skUGL+keim3FdNXfKGgQokCfj85gnhYhuLbMM61qY5W6ixSH9s8I6uoNh3gzVy89XM
|
||||
NGbZiajjDiPMBryl87PhD+ACBjv8WoZAQiojAga0ELPPmVDnhrtWKANLbRrkUI3Xtfoj
|
||||
b1o2iHP2Q12Vqs6xiAy86yxURlIKGM3tw91WryWiIPiAL7bRZPn49N3XbO2ULE0QKTBq
|
||||
BI5YnOxt9NfTj0xhKaLLIJ9M1qa4e1QyOHl56WuEv3Gx6uHDAQDYz+C5G0VgdjBvwRzH
|
||||
pJaiAulc1uW/V9TcRMwvwIWtI7eWygvU2PiuI/c05G1KVKibAubHE55IjOJCn2O2UaH4
|
||||
WMNQ==
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
|
||||
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
|
||||
:dkim-signature;
|
||||
bh=j6+rsx5MBsg1/s7LIIfByV7u0jGK09n72bnK4XcN6ZQ=;
|
||||
b=Ps5kk+tBGQzMP6ugDCwKf4hzn8fn3DU4AFz1dJvkHdDestLZWN99Qtr6iNMdslsHJm
|
||||
ov378c+8oCfcV7shyBYjlAFfikFi7o4RM/evh3yqqjAnhyVfcYH7c9cexVvDo/AXUAZ7
|
||||
N7Mh7EOvyDXXsaHK2l89XiAxZx/hZh/O+/HR2EoVEGre1eYRYwI/aEfPN8d4/fL2VtCD
|
||||
0wzAwnUrINuXmcaUDT30Twjk9kwGjjTsM6Z531vKM6L3y48a7f3GTE7V+vo2QxHdUT54
|
||||
fQVue9OO7b4VKTEj/x/dmNr+92sHRAMMS7dj/VXMmzM+WttUCAPNxZ27/bvt4bBc5oBp
|
||||
QPEA==
|
||||
ARC-Authentication-Results: i=1; mx.google.com;
|
||||
dkim=pass header.i=@destailleur.fr header.s=google header.b=SEYSmxbT;
|
||||
spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr;
|
||||
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr
|
||||
Return-Path: <contact@destailleur.fr>
|
||||
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
|
||||
by mx.google.com with SMTPS id q3sor2285165qtn.34.2020.08.20.09.56.02
|
||||
for <testldrdev@gmail.com>
|
||||
(Google Transport Security);
|
||||
Thu, 20 Aug 2020 09:56:03 -0700 (PDT)
|
||||
Received-SPF: pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
|
||||
Authentication-Results: mx.google.com;
|
||||
dkim=pass header.i=@destailleur.fr header.s=google header.b=SEYSmxbT;
|
||||
spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr;
|
||||
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=destailleur.fr; s=google;
|
||||
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
|
||||
bh=j6+rsx5MBsg1/s7LIIfByV7u0jGK09n72bnK4XcN6ZQ=;
|
||||
b=SEYSmxbTKCuc1baQZzjIJwm7WXvgjt/nEGhMLqWxQCU3beM3qhH8wYlSeMyB8Z/9pi
|
||||
tszZFZhZ3cjnIbbJnjzsMYJgBnYbkf6hz14+BsFwyPU030EkDjJy2i3DSXzYK7A+GbBn
|
||||
G9I9foG/4+pcx0LnFsjchGsRhLFkTKJIsP2SVfOx0wlim3WHMIqIXvKsxY05PoPyf8Tp
|
||||
IwQi7iNl/+nTyjNHl2DQh+ty3CRTmUw9uEbY+jRRvIg5i/7cfREekK98d7qi/5HQycr6
|
||||
aptRDdCVHXpe47q+c7OPiMEEQWs+mFJhBqPXIlU54fwFApEEnLn/jwGbrPsrPYJaswgI
|
||||
vd/g==
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20161025;
|
||||
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
|
||||
:message-id:subject:to;
|
||||
bh=j6+rsx5MBsg1/s7LIIfByV7u0jGK09n72bnK4XcN6ZQ=;
|
||||
b=M6a4k1gKc4e7TwKncuNPy0b3KxutR1FLFJGWxd4NyW84b7f3LfIR94IeInLQIWmY8C
|
||||
Ddus0upZJI4+NN9XBGvXCdsiiYlwFGBJRWwjv82XFKVAKL5DD94RJNQZJUiE39hgJ2aa
|
||||
6V9gasiP+nUAX4ZV9bZmw21CgKEZrZVXh5unmW2ABrfcx8lHjp/DUw5XEkym1J92Wo1l
|
||||
g0H3XrC2FL+aQuj+WpCynMNkY9ljw71oqyv3SP9pjnVNHArAdZiPMHkNxiuPdq7q41fg
|
||||
eIbdRCQXYZL5O48QsjDdiXwaQzx+NcYtrKAH0RIVD1lG6zc9pxqDJsbGxP9VLs8jGDTT
|
||||
mSdQ==
|
||||
X-Gm-Message-State: AOAM532LuATWDKbo1HImMWshHVqb0kC0isehf3owfYUKq5J68o3juKbm kCgUMt25A2C7QoNMDXcjfJyteBNQD7ZhSh3yeYTGoLSvsD4=
|
||||
X-Google-Smtp-Source: ABdhPJyQYCpCHSwA87x030i8YChySZqcNXxT1qVlZyEA+XM6DTyPZusa8gtbDUVcMyx7Jma/7toh+4EEE2bWg0bG+2E=
|
||||
X-Received: by 2002:aed:3e8e:: with SMTP id n14mr3547383qtf.67.1597942562373; Thu, 20 Aug 2020 09:56:02 -0700 (PDT)
|
||||
MIME-Version: 1.0
|
||||
References: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com> <CAC8+=32ccpEo12RR-juT=FW6+gNV-DcvNjxs_0s6Wn40xmfhug@mail.gmail.com>
|
||||
In-Reply-To: <CAC8+=32ccpEo12RR-juT=FW6+gNV-DcvNjxs_0s6Wn40xmfhug@mail.gmail.com>
|
||||
From: John Tester <customer@customercompany.fr>
|
||||
Date: Thu, 20 Aug 2020 18:55:36 +0200
|
||||
Message-ID: <CALeEO_nLUY8Tk+o7WoaHtBkxvOy0dhvt+fL0MwPrApGty_AG_g@mail.gmail.com>
|
||||
Subject: Re: Support besoin
|
||||
To: John Tester <testldrdev@gmail.com>
|
||||
Content-Type: multipart/alternative; boundary="000000000000cd54be05ad51fe67"
|
||||
|
||||
--000000000000cd54be05ad51fe67
|
||||
Content-Type: text/plain; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
Merci
|
||||
|
||||
Le jeu. 20 ao=C3=BBt 2020 =C3=A0 18:34, John Tester <testldrdev@gma=
|
||||
il.com> a
|
||||
=C3=A9crit :
|
||||
|
||||
> Merci pour votre question.
|
||||
> Voici la rep.
|
||||
>
|
||||
> Le jeu. 20 ao=C3=BBt 2020 =C3=A0 17:29, John Tester <laurent@dest=
|
||||
ailleur.fr>
|
||||
> a =C3=A9crit :
|
||||
>
|
||||
>> adfsdfsdfds
|
||||
>>
|
||||
>> --
|
||||
>> Laurent.
|
||||
>>
|
||||
>> ------------------------------------------------------------------------=
|
||||
------------
|
||||
>> Twitter: https://www.twitter.com/eldy10
|
||||
>>
|
||||
>
|
||||
|
||||
--=20
|
||||
Laurent.
|
||||
---------------------------------------------------------------------------=
|
||||
---------
|
||||
Twitter: https://www.twitter.com/eldy10
|
||||
|
||||
--000000000000cd54be05ad51fe67
|
||||
Content-Type: text/html; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<div dir=3D"ltr">Merci</div><br><div class=3D"gmail_quote"><div dir=3D"ltr"=
|
||||
class=3D"gmail_attr">Le=C2=A0jeu. 20 ao=C3=BBt 2020 =C3=A0=C2=A018:34, Lau=
|
||||
rent Destailleur <<a href=3D"mailto:testldrdev@gmail.com">testldrdev@gma=
|
||||
il.com</a>> a =C3=A9crit=C2=A0:<br></div><blockquote class=3D"gmail_quot=
|
||||
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
|
||||
;padding-left:1ex"><div dir=3D"ltr">Merci pour votre question.<div>Voici la=
|
||||
rep.</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"g=
|
||||
mail_attr">Le=C2=A0jeu. 20 ao=C3=BBt 2020 =C3=A0=C2=A017:29, Laurent Destai=
|
||||
lleur <<a href=3D"mailto:customer@customercompany.fr" target=3D"_blank">laure=
|
||||
nt@destailleur.fr</a>> a =C3=A9crit=C2=A0:<br></div><blockquote class=3D=
|
||||
"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2=
|
||||
04,204,204);padding-left:1ex"><div dir=3D"ltr">adfsdfsdfds<br clear=3D"all"=
|
||||
><div><br></div>-- <br><div dir=3D"ltr">Laurent.<br>-----------------------=
|
||||
-------------------------------------------------------------<br>Twitter: <=
|
||||
a href=3D"https://www.twitter.com/eldy10" target=3D"_blank">https://www.twi=
|
||||
tter.com/eldy10</a></div></div>
|
||||
</blockquote></div>
|
||||
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
|
||||
class=3D"gmail_signature">Laurent.<br>------------------------------------=
|
||||
------------------------------------------------<br>Twitter: <a href=3D"htt=
|
||||
ps://www.twitter.com/eldy10" target=3D"_blank">https://www.twitter.com/eldy=
|
||||
10</a></div>
|
||||
|
||||
--000000000000cd54be05ad51fe67--
|
||||
@@ -1,21 +0,0 @@
|
||||
# EditorConfig is awesome: https://editorconfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
|
||||
[*.js]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = false
|
||||
1
dev/examples/zapier/.gitignore
vendored
1
dev/examples/zapier/.gitignore
vendored
@@ -5,4 +5,3 @@ node_modules
|
||||
.environment
|
||||
.env
|
||||
.zapierapprc
|
||||
package-lock.json
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# HOW TO BUILD
|
||||
|
||||
Take a look at the dolibarr wiki page of Zapier module:
|
||||
|
||||
https://wiki.dolibarr.org/index.php?title=Module_Zapier
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*jshint esversion: 6 */
|
||||
const test = (z , bundle) => {
|
||||
const url = bundle.authData.url+'/api/index.php/status';
|
||||
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
|
||||
@@ -11,69 +11,44 @@ const test = (z , bundle) => {
|
||||
// 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 === 400) {
|
||||
throw new Error('400 -The Session Key you supplied is invalid');
|
||||
}
|
||||
if (response.status === 403) {
|
||||
throw new Error('403 -The Session Key you supplied is invalid');
|
||||
if (response.status === 401) {
|
||||
throw new Error('The Session Key you supplied is invalid');
|
||||
}
|
||||
return response;
|
||||
});
|
||||
};
|
||||
|
||||
// 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;
|
||||
};
|
||||
|
||||
const getSessionKey = async (z, bundle) => {
|
||||
const getSessionKey = (z, bundle) => {
|
||||
const url = bundle.authData.url + '/api/index.php/login';
|
||||
|
||||
const response = await z.request({
|
||||
url: url,
|
||||
const promise = z.request({
|
||||
method: 'POST',
|
||||
url: url,
|
||||
body: {
|
||||
login: bundle.authData.login,
|
||||
password: bundle.authData.password,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
// if (response.status === 401) {
|
||||
// throw new Error('The login/password you supplied is invalid');
|
||||
// }
|
||||
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 || '',
|
||||
sessionKey: json.success.token || 'secret'
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'session',
|
||||
sessionConfig: {
|
||||
perform: getSessionKey
|
||||
},
|
||||
// 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 without trailing-slash',
|
||||
label: 'Url of service',
|
||||
required: true,
|
||||
type: 'string'
|
||||
},
|
||||
@@ -92,11 +67,11 @@ module.exports = {
|
||||
],
|
||||
// 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,
|
||||
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}}'
|
||||
},
|
||||
befores: [includeSessionKeyHeader],
|
||||
afters: [sessionRefreshIf401],
|
||||
};
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
/*jshint esversion: 6 */
|
||||
// create a particular contact by name
|
||||
const createContact = async (z, bundle) => {
|
||||
const apiurl = bundle.authData.url + '/api/index.php/contacts';
|
||||
|
||||
const response = await z.request({
|
||||
method: 'POST',
|
||||
url: apiurl,
|
||||
body: {
|
||||
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,
|
||||
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: 'contact',
|
||||
noun: 'Contact',
|
||||
|
||||
display: {
|
||||
label: 'Create Contact',
|
||||
description: 'Creates a contact.'
|
||||
},
|
||||
|
||||
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}
|
||||
],
|
||||
perform: createContact,
|
||||
|
||||
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'
|
||||
},
|
||||
|
||||
outputFields: [
|
||||
{key: 'id', type: "integer", 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'}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -1,74 +0,0 @@
|
||||
/*jshint esversion: 6 */
|
||||
// create a particular member by name
|
||||
const createMember = async (z, bundle) => {
|
||||
const apiurl = bundle.authData.url + '/api/index.php/members';
|
||||
|
||||
const response = await z.request({
|
||||
method: 'POST',
|
||||
url: apiurl,
|
||||
body: {
|
||||
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,
|
||||
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: 'member',
|
||||
noun: 'Member',
|
||||
|
||||
display: {
|
||||
label: 'Create Member',
|
||||
description: 'Creates a member.'
|
||||
},
|
||||
|
||||
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}
|
||||
],
|
||||
perform: createMember,
|
||||
|
||||
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'
|
||||
},
|
||||
|
||||
outputFields: [
|
||||
{key: 'id', type: "integer", 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'}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -6,7 +6,7 @@ const createThirdparty = async (z, bundle) => {
|
||||
const response = await z.request({
|
||||
method: 'POST',
|
||||
url: apiurl,
|
||||
body: {
|
||||
body: JSON.stringify({
|
||||
name: bundle.inputData.name,
|
||||
name_alias: bundle.inputData.name_alias,
|
||||
ref_ext: bundle.inputData.ref_ext,
|
||||
@@ -24,7 +24,7 @@ const createThirdparty = async (z, bundle) => {
|
||||
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
|
||||
@@ -72,7 +72,7 @@ module.exports = {
|
||||
},
|
||||
|
||||
outputFields: [
|
||||
{key: 'id', type: "integer", label: 'ID'},
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'name_alias', label: 'Name alias'},
|
||||
{key: 'address', label: 'Address'},
|
||||
@@ -81,8 +81,8 @@ module.exports = {
|
||||
{key: 'phone', label: 'Phone'},
|
||||
{key: 'fax', label: 'Fax'},
|
||||
{key: 'email', label: 'Email'},
|
||||
{key: 'client', type: "integer", label: 'Customer/Prospect 0/1/2/3'},
|
||||
{key: 'fournisseur', type: "integer", label: 'Supplier 0/1'},
|
||||
{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'}
|
||||
]
|
||||
|
||||
@@ -1,45 +1,33 @@
|
||||
/*jshint esversion: 6 */
|
||||
const triggerAction = require('./triggers/action');
|
||||
const triggerOrder = require('./triggers/order');
|
||||
const triggerThirdparty = require('./triggers/thirdparty');
|
||||
const triggerContact = require('./triggers/contact');
|
||||
const triggerTicket = require('./triggers/ticket');
|
||||
const triggerUser = require('./triggers/user');
|
||||
const triggerMember = require('./triggers/member');
|
||||
const triggerOrder = require('./triggers/order');
|
||||
const triggerAction = require('./triggers/action');
|
||||
|
||||
const searchThirdparty = require('./searches/thirdparty');
|
||||
const searchContact = require('./searches/contact');
|
||||
const searchMember = require('./searches/member');
|
||||
|
||||
const createThirdparty = require('./creates/thirdparty');
|
||||
const createContact = require('./creates/contact');
|
||||
const createMember = require('./creates/member');
|
||||
|
||||
const {
|
||||
config: authentication,
|
||||
befores = [],
|
||||
afters = [],
|
||||
} = require('./authentication');
|
||||
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;
|
||||
// };
|
||||
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;
|
||||
// };
|
||||
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 = {
|
||||
@@ -52,11 +40,11 @@ const App = {
|
||||
|
||||
// beforeRequest & afterResponse are optional hooks into the provided HTTP client
|
||||
beforeRequest: [
|
||||
...befores
|
||||
includeSessionKeyHeader
|
||||
],
|
||||
|
||||
afterResponse: [
|
||||
...afters
|
||||
sessionRefreshIf401
|
||||
],
|
||||
|
||||
// If you want to define optional resources to simplify creation of triggers, searches, creates - do that here!
|
||||
@@ -65,27 +53,19 @@ const App = {
|
||||
|
||||
// If you want your trigger to show up, you better include it here!
|
||||
triggers: {
|
||||
[triggerAction.key]: triggerAction,
|
||||
[triggerOrder.key]: triggerOrder,
|
||||
[triggerThirdparty.key]: triggerThirdparty,
|
||||
[triggerContact.key]: triggerContact,
|
||||
[triggerTicket.key]: triggerTicket,
|
||||
[triggerUser.key]: triggerUser,
|
||||
[triggerMember.key]: triggerMember,
|
||||
[triggerOrder.key]: triggerOrder,
|
||||
[triggerAction.key]: triggerAction
|
||||
},
|
||||
|
||||
// If you want your searches to show up, you better include it here!
|
||||
searches: {
|
||||
[searchThirdparty.key]: searchThirdparty,
|
||||
[searchContact.key]: searchContact,
|
||||
[searchMember.key]: searchMember,
|
||||
},
|
||||
|
||||
// If you want your creates to show up, you better include it here!
|
||||
creates: {
|
||||
[createThirdparty.key]: createThirdparty,
|
||||
[createContact.key]: createContact,
|
||||
[createMember.key]: createMember,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
405
dev/examples/zapier/package-lock.json
generated
Normal file
405
dev/examples/zapier/package-lock.json
generated
Normal 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=="
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "dolibarr",
|
||||
"version": "1.14.0",
|
||||
"name": "Dolibarr",
|
||||
"version": "1.0.0",
|
||||
"description": "An app for connecting Dolibarr to the Zapier platform.",
|
||||
"repository": "Dolibarr/dolibarr",
|
||||
"homepage": "https://www.dolibarr.org/",
|
||||
"homepage": "https://www.dolibarr.fr/",
|
||||
"author": "Frédéric France <frederic.france@netlogic.fr>",
|
||||
"license": "BSD-3-Clause",
|
||||
"main": "index.js",
|
||||
@@ -11,11 +11,11 @@
|
||||
"test": "mocha --recursive"
|
||||
},
|
||||
"engines": {
|
||||
"node": "14.0.0",
|
||||
"node": "8.10.0",
|
||||
"npm": ">=5.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"zapier-platform-core": "11.0.1"
|
||||
"zapier-platform-core": "8.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^5.2.0",
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
module.exports = {
|
||||
key: 'contact',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'Contact',
|
||||
display: {
|
||||
label: 'Find a Contact',
|
||||
description: 'Search for contact.'
|
||||
},
|
||||
|
||||
// `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: 'lastname',
|
||||
type: 'string',
|
||||
label: 'Lastname',
|
||||
helpText: 'Lastname to limit to the search to (i.e. The company or %company%).'
|
||||
},
|
||||
{
|
||||
key: 'email',
|
||||
type: 'string',
|
||||
label: 'Email',
|
||||
helpText: 'Email to limit to the search to.'
|
||||
}
|
||||
],
|
||||
|
||||
perform: async (z, bundle) => {
|
||||
const url = bundle.authData.url + '/api/index.php/contacts/';
|
||||
|
||||
// Put the search value in a query param. The details of how to build
|
||||
// a search URL will depend on how your API works.
|
||||
let filter = '';
|
||||
if (bundle.inputData.lastname) {
|
||||
filter = "t.lastname like \'%"+bundle.inputData.name+"%\'";
|
||||
}
|
||||
if (bundle.inputData.email) {
|
||||
if (bundle.inputData.lastname) {
|
||||
filter += " and ";
|
||||
}
|
||||
filter += "t.email like \'"+bundle.inputData.email+"\'";
|
||||
}
|
||||
const response = await z.request({
|
||||
url: url,
|
||||
// this parameter avoid throwing errors and let us manage them
|
||||
skipThrowForStatus: true,
|
||||
params: {
|
||||
sqlfilters: filter
|
||||
}
|
||||
});
|
||||
//z.console.log(response);
|
||||
if (response.status != 200) {
|
||||
return [];
|
||||
}
|
||||
return response.json;
|
||||
},
|
||||
|
||||
// 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',
|
||||
type: "integer",
|
||||
label: 'ID'
|
||||
},
|
||||
{key: 'createdAt', type: "integer", label: 'Created At'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'firstname', label: 'Firstname'},
|
||||
{key: 'directions', label: 'Directions'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{
|
||||
key: 'style',
|
||||
label: 'Style'
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -1,88 +0,0 @@
|
||||
module.exports = {
|
||||
key: 'member',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'Member',
|
||||
display: {
|
||||
label: 'Find a Member',
|
||||
description: 'Search for member.'
|
||||
},
|
||||
|
||||
// `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: 'lastname',
|
||||
type: 'string',
|
||||
label: 'Lastname',
|
||||
helpText: 'Lastname to limit to the search to (i.e. The company or %company%).'
|
||||
},
|
||||
{
|
||||
key: 'email',
|
||||
type: 'string',
|
||||
label: 'Email',
|
||||
helpText: 'Email to limit to the search to.'
|
||||
}
|
||||
],
|
||||
|
||||
perform: async (z, bundle) => {
|
||||
const url = bundle.authData.url + '/api/index.php/members/';
|
||||
|
||||
// Put the search value in a query param. The details of how to build
|
||||
// a search URL will depend on how your API works.
|
||||
let filter = '';
|
||||
if (bundle.inputData.lastname) {
|
||||
filter = "t.lastname like \'%" + bundle.inputData.name + "%\'";
|
||||
}
|
||||
if (bundle.inputData.email) {
|
||||
if (bundle.inputData.lastname) {
|
||||
filter += " and ";
|
||||
}
|
||||
filter += "t.email like \'" + bundle.inputData.email + "\'";
|
||||
}
|
||||
const response = await z.request({
|
||||
url: url,
|
||||
// this parameter avoid throwing errors and let us manage them
|
||||
skipThrowForStatus: true,
|
||||
params: {
|
||||
sqlfilters: filter
|
||||
}
|
||||
});
|
||||
//z.console.log(response);
|
||||
if (response.status != 200) {
|
||||
return [];
|
||||
}
|
||||
return response.json;
|
||||
},
|
||||
|
||||
// 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,
|
||||
},
|
||||
|
||||
// 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',
|
||||
type: "integer",
|
||||
label: 'ID'
|
||||
},
|
||||
{ key: 'createdAt', type: "integer", label: 'Created At' },
|
||||
{ key: 'name', label: 'Name' },
|
||||
{ key: 'firstname', label: 'Firstname' },
|
||||
{ key: 'authorId', type: "integer", label: 'Author ID' },
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -19,43 +19,21 @@ module.exports = {
|
||||
type: 'string',
|
||||
label: 'Name',
|
||||
helpText: 'Name to limit to the search to (i.e. The company or %company%).'
|
||||
},
|
||||
{
|
||||
key: 'email',
|
||||
type: 'string',
|
||||
label: 'Email',
|
||||
helpText: 'Email to limit to the search to.'
|
||||
}
|
||||
],
|
||||
|
||||
perform: async (z, bundle) => {
|
||||
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.
|
||||
let filter = '';
|
||||
if (bundle.inputData.name) {
|
||||
filter = "t.nom like \'%"+bundle.inputData.name+"%\'";
|
||||
}
|
||||
if (bundle.inputData.email) {
|
||||
if (bundle.inputData.name) {
|
||||
filter += " and ";
|
||||
}
|
||||
filter += "t.email like \'"+bundle.inputData.email+"\'";
|
||||
}
|
||||
const response = await z.request({
|
||||
url: url,
|
||||
// this parameter avoid throwing errors and let us manage them
|
||||
skipThrowForStatus: true,
|
||||
const options = {
|
||||
params: {
|
||||
sqlfilters: filter
|
||||
sqlfilters: "t.nom like \'%"+bundle.inputData.name+"%\'"
|
||||
}
|
||||
});
|
||||
//z.console.log(response);
|
||||
if (response.status != 200) {
|
||||
return [];
|
||||
}
|
||||
return response.json;
|
||||
};
|
||||
|
||||
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
|
||||
@@ -76,20 +54,13 @@ module.exports = {
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{
|
||||
key: 'id',
|
||||
type: "integer",
|
||||
label: 'ID'
|
||||
},
|
||||
{key: 'createdAt', type: "integer", label: 'Created At'},
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'firstname', label: 'Firstname'},
|
||||
{key: 'directions', label: 'Directions'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{
|
||||
key: 'style',
|
||||
label: 'Style'
|
||||
}
|
||||
{key: 'authorId', label: 'Author ID'},
|
||||
{key: 'style', label: 'Style'}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ const subscribeHook = (z, bundle) => {
|
||||
const options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
body: JSON.stringify(data)
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
@@ -100,7 +100,7 @@ module.exports = {
|
||||
noun: 'Action',
|
||||
display: {
|
||||
label: 'New Agenda',
|
||||
description: 'Triggers when a new agenda with action is done in Dolibarr.'
|
||||
description: 'Trigger when a new agenda with action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
@@ -111,7 +111,6 @@ module.exports = {
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
required: true,
|
||||
type: 'string',
|
||||
helpText: 'Which action of agenda this should trigger on.',
|
||||
choices: {
|
||||
@@ -146,33 +145,12 @@ module.exports = {
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{
|
||||
key: 'id',
|
||||
type: "integer",
|
||||
label: 'ID'
|
||||
},
|
||||
{
|
||||
key: 'createdAt',
|
||||
type: "integer",
|
||||
label: 'Created At'
|
||||
},
|
||||
{
|
||||
key: 'name',
|
||||
label: 'Name'
|
||||
},
|
||||
{
|
||||
key: 'usertodo__name',
|
||||
label: 'UserToDo Name'
|
||||
},
|
||||
{
|
||||
key: 'authorId',
|
||||
type: "integer",
|
||||
label: 'Author ID'
|
||||
},
|
||||
{
|
||||
key: 'action',
|
||||
label: 'Action'
|
||||
}
|
||||
{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'}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,171 +0,0 @@
|
||||
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: 'contact',
|
||||
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: 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 getContact = (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 contact = {
|
||||
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,
|
||||
phone_pro: bundle.cleanedRequest.phone_pro,
|
||||
phone_perso: bundle.cleanedRequest.phone_perso,
|
||||
phone_mobile: bundle.cleanedRequest.phone_mobile,
|
||||
authorId: bundle.cleanedRequest.authorId,
|
||||
createdAt: bundle.cleanedRequest.createdAt,
|
||||
action: bundle.cleanedRequest.action
|
||||
};
|
||||
|
||||
return [contact];
|
||||
};
|
||||
|
||||
const getFallbackRealContact = (z, bundle) => {
|
||||
// For the test poll, you should get some real data, to aid the setup process.
|
||||
const module = bundle.inputData.module;
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/contacts/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",
|
||||
// contacts: "Contact",
|
||||
// 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: 'contact',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'Contact',
|
||||
display: {
|
||||
label: 'New Contact',
|
||||
description: 'Triggers when a new contact 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',
|
||||
required: true,
|
||||
type: 'string',
|
||||
helpText: 'Which action of contact this should trigger on.',
|
||||
choices: {
|
||||
create: "Create",
|
||||
modify: "Modify",
|
||||
validate: "Validate",
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
type: 'hook',
|
||||
|
||||
performSubscribe: subscribeHook,
|
||||
performUnsubscribe: unsubscribeHook,
|
||||
|
||||
perform: getContact,
|
||||
performList: getFallbackRealContact,
|
||||
|
||||
// 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,
|
||||
lastname: 'DOE',
|
||||
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', type: "integer", label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'lastname', label: 'Lastname'},
|
||||
{key: 'firstname', label: 'Firstname'},
|
||||
{key: 'phone', label: 'Phone pro'},
|
||||
{key: 'phone_perso', label: 'Phone perso'},
|
||||
{key: 'phone_mobile', label: 'Phone mobile'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{key: 'action', label: 'Action'}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -1,171 +0,0 @@
|
||||
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: 'member',
|
||||
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: 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 getMember = (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 member = {
|
||||
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,
|
||||
phone_pro: bundle.cleanedRequest.phone_pro,
|
||||
phone_perso: bundle.cleanedRequest.phone_perso,
|
||||
phone_mobile: bundle.cleanedRequest.phone_mobile,
|
||||
authorId: bundle.cleanedRequest.authorId,
|
||||
createdAt: bundle.cleanedRequest.createdAt,
|
||||
action: bundle.cleanedRequest.action
|
||||
};
|
||||
|
||||
return [member];
|
||||
};
|
||||
|
||||
const getFallbackRealMember = (z, bundle) => {
|
||||
// For the test poll, you should get some real data, to aid the setup process.
|
||||
const module = bundle.inputData.module;
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/members/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",
|
||||
// members: "Member",
|
||||
// members: "Members"
|
||||
// };
|
||||
// };
|
||||
|
||||
// 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: 'member',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'Member',
|
||||
display: {
|
||||
label: 'New Member',
|
||||
description: 'Triggers when a new member 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',
|
||||
required: true,
|
||||
type: 'string',
|
||||
helpText: 'Which action of member this should trigger on.',
|
||||
choices: {
|
||||
create: "Create",
|
||||
modify: "Modify",
|
||||
validate: "Validate",
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
type: 'hook',
|
||||
|
||||
performSubscribe: subscribeHook,
|
||||
performUnsubscribe: unsubscribeHook,
|
||||
|
||||
perform: getMember,
|
||||
performList: getFallbackRealMember,
|
||||
|
||||
// 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,
|
||||
lastname: 'DOE',
|
||||
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', type: "integer", label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'lastname', label: 'Lastname'},
|
||||
{key: 'firstname', label: 'Firstname'},
|
||||
{key: 'phone', label: 'Phone pro'},
|
||||
{key: 'phone_perso', label: 'Phone perso'},
|
||||
{key: 'phone_mobile', label: 'Phone mobile'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{key: 'action', label: 'Action'}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -17,7 +17,7 @@ const subscribeHook = (z, bundle) => {
|
||||
const options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
body: JSON.stringify(data)
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
@@ -90,7 +90,7 @@ module.exports = {
|
||||
noun: 'Order',
|
||||
display: {
|
||||
label: 'New Order',
|
||||
description: 'Triggers when a new order with action is done in Dolibarr.'
|
||||
description: 'Trigger when a new order with action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
@@ -101,7 +101,6 @@ module.exports = {
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
required: true,
|
||||
type: 'string',
|
||||
helpText: 'Which action of order this should trigger on.',
|
||||
choices: {
|
||||
@@ -137,11 +136,11 @@ module.exports = {
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{key: 'id', type: "integer", label: 'ID'},
|
||||
{key: 'createdAt', type: "integer", label: 'Created At'},
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'directions', label: 'Directions'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{key: 'authorId', label: 'Author ID'},
|
||||
{key: 'module', label: 'Module'},
|
||||
{key: 'action', label: 'Action'}
|
||||
]
|
||||
|
||||
@@ -17,7 +17,7 @@ const subscribeHook = (z, bundle) => {
|
||||
const options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
body: JSON.stringify(data)
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
@@ -56,12 +56,6 @@ const getThirdparty = (z, bundle) => {
|
||||
fournisseur: bundle.cleanedRequest.fournisseur,
|
||||
code_client: bundle.cleanedRequest.code_client,
|
||||
code_fournisseur: bundle.cleanedRequest.code_fournisseur,
|
||||
idprof1: bundle.cleanedRequest.idprof1,
|
||||
idprof2: bundle.cleanedRequest.idprof2,
|
||||
idprof3: bundle.cleanedRequest.idprof3,
|
||||
idprof4: bundle.cleanedRequest.idprof4,
|
||||
idprof5: bundle.cleanedRequest.idprof5,
|
||||
idprof6: bundle.cleanedRequest.idprof6,
|
||||
authorId: bundle.cleanedRequest.authorId,
|
||||
createdAt: bundle.cleanedRequest.createdAt,
|
||||
action: bundle.cleanedRequest.action
|
||||
@@ -118,7 +112,7 @@ module.exports = {
|
||||
noun: 'Thirdparty',
|
||||
display: {
|
||||
label: 'New Thirdparty',
|
||||
description: 'Triggers when a new thirdparty action is done in Dolibarr.'
|
||||
description: 'Trigger when a new thirdpaty action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
@@ -129,7 +123,6 @@ module.exports = {
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
required: true,
|
||||
type: 'string',
|
||||
helpText: 'Which action of thirdparty this should trigger on.',
|
||||
choices: {
|
||||
@@ -166,23 +159,17 @@ module.exports = {
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{key: 'id', type: "integer", label: 'ID'},
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'name_alias', label: 'Name alias'},
|
||||
{key: 'firstname', label: 'Firstname'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{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'},
|
||||
{key: 'idprof1', label: 'Id Prof 1'},
|
||||
{key: 'idprof2', label: 'Id Prof 2'},
|
||||
{key: 'idprof3', label: 'Id Prof 3'},
|
||||
{key: 'idprof4', label: 'Id Prof 4'},
|
||||
{key: 'idprof5', label: 'Id Prof 5'},
|
||||
{key: 'idprof6', label: 'Id Prof 6'}
|
||||
{key: 'code_fournisseur', label: 'Supplier code'}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,237 +0,0 @@
|
||||
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: 'ticket',
|
||||
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: 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 getTicket = (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 ticket = {
|
||||
id: bundle.cleanedRequest.id,
|
||||
track_id: bundle.cleanedRequest.track_id,
|
||||
subject: bundle.cleanedRequest.subject,
|
||||
message: bundle.cleanedRequest.message,
|
||||
lastname: bundle.cleanedRequest.lastname,
|
||||
firstname: bundle.cleanedRequest.firstname,
|
||||
address: bundle.cleanedRequest.address,
|
||||
zip: bundle.cleanedRequest.zip,
|
||||
town: bundle.cleanedRequest.town,
|
||||
email_from: bundle.cleanedRequest.email_from,
|
||||
login: bundle.cleanedRequest.login,
|
||||
authorId: bundle.cleanedRequest.authorId,
|
||||
createdAt: bundle.cleanedRequest.createdAt,
|
||||
action: bundle.cleanedRequest.action
|
||||
};
|
||||
|
||||
return [ticket];
|
||||
};
|
||||
|
||||
const getFallbackRealTicket = (z, bundle) => {
|
||||
// For the test poll, you should get some real data, to aid the setup process.
|
||||
const module = bundle.inputData.module;
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/tickets/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",
|
||||
// users: "User",
|
||||
// tickets: "Ticket",
|
||||
// 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: 'ticket',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for tickets. Zapier will put them into the UX.
|
||||
noun: 'Ticket',
|
||||
display: {
|
||||
label: 'New Ticket',
|
||||
description: 'Triggers when a new ticket action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
operation: {
|
||||
|
||||
// `inputFields` can define the fields a ticket could provide,
|
||||
// we'll pass them in as `bundle.inputData` later.
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
type: 'string',
|
||||
required: true,
|
||||
helpText: 'Which action of ticket this should trigger on.',
|
||||
choices: {
|
||||
create: "Create",
|
||||
modify: "Modify",
|
||||
validate: "Validate",
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
type: 'hook',
|
||||
|
||||
performSubscribe: subscribeHook,
|
||||
performUnsubscribe: unsubscribeHook,
|
||||
|
||||
perform: getTicket,
|
||||
performList: getFallbackRealTicket,
|
||||
|
||||
// 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,
|
||||
track_id: 'Xaz123er',
|
||||
subject: 'Subject',
|
||||
message: 'Message',
|
||||
createdAt: 1472069465,
|
||||
lastname: 'DOE',
|
||||
firstname: 'John',
|
||||
email: 'john@doe.com',
|
||||
address: 'Park Avenue',
|
||||
zip: '12345',
|
||||
town: 'NEW-YORK',
|
||||
email_from: 'doe.john@example;com',
|
||||
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',
|
||||
type: "integer",
|
||||
label: 'ID'
|
||||
},
|
||||
{
|
||||
key: 'track_id',
|
||||
type: "string",
|
||||
label: 'TrackID'
|
||||
},
|
||||
{
|
||||
key: 'subject',
|
||||
type: "string",
|
||||
label: 'Subject'
|
||||
},
|
||||
{
|
||||
key: 'message',
|
||||
type: "string",
|
||||
label: 'Message'
|
||||
},
|
||||
{
|
||||
key: 'createdAt',
|
||||
type: "integer",
|
||||
label: 'Created At'
|
||||
},
|
||||
{
|
||||
key: 'lastname',
|
||||
label: 'Lastname'
|
||||
},
|
||||
{
|
||||
key: 'firstname',
|
||||
label: 'Firstname'
|
||||
},
|
||||
{
|
||||
key: 'email',
|
||||
label: 'Email'
|
||||
},
|
||||
{
|
||||
key: 'address',
|
||||
label: 'Address'
|
||||
},
|
||||
{
|
||||
key: 'zip',
|
||||
label: 'Zip'
|
||||
},
|
||||
{
|
||||
key: 'town',
|
||||
label: 'Town'
|
||||
},
|
||||
{
|
||||
key: 'email_from',
|
||||
type: 'string',
|
||||
label: 'Email from'
|
||||
},
|
||||
{
|
||||
key: 'authorId',
|
||||
type: "integer",
|
||||
label: 'Author ID'
|
||||
},
|
||||
{
|
||||
key: 'action',
|
||||
type: 'string',
|
||||
label: 'Action'
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -1,177 +0,0 @@
|
||||
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: 'user',
|
||||
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: 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 getUser = (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 user = {
|
||||
id: bundle.cleanedRequest.id,
|
||||
lastname: bundle.cleanedRequest.lastname,
|
||||
firstname: bundle.cleanedRequest.firstname,
|
||||
address: bundle.cleanedRequest.address,
|
||||
zip: bundle.cleanedRequest.zip,
|
||||
town: bundle.cleanedRequest.town,
|
||||
email: bundle.cleanedRequest.email,
|
||||
login: bundle.cleanedRequest.login,
|
||||
authorId: bundle.cleanedRequest.authorId,
|
||||
createdAt: bundle.cleanedRequest.createdAt,
|
||||
action: bundle.cleanedRequest.action
|
||||
};
|
||||
|
||||
return [user];
|
||||
};
|
||||
|
||||
const getFallbackRealUser = (z, bundle) => {
|
||||
// For the test poll, you should get some real data, to aid the setup process.
|
||||
const module = bundle.inputData.module;
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/users/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",
|
||||
// users: "User",
|
||||
// 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: 'user',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'User',
|
||||
display: {
|
||||
label: 'New User',
|
||||
description: 'Triggers when a new user 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',
|
||||
required: true,
|
||||
type: 'string',
|
||||
helpText: 'Which action of user this should trigger on.',
|
||||
choices: {
|
||||
create: "Create",
|
||||
modify: "Modify",
|
||||
validate: "Validate",
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
type: 'hook',
|
||||
|
||||
performSubscribe: subscribeHook,
|
||||
performUnsubscribe: unsubscribeHook,
|
||||
|
||||
perform: getUser,
|
||||
performList: getFallbackRealUser,
|
||||
|
||||
// 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,
|
||||
lastname: 'DOE',
|
||||
firstname: 'John',
|
||||
email: 'john@doe.com',
|
||||
address: 'Park Avenue',
|
||||
zip: '12345',
|
||||
town: 'NEW-YORK',
|
||||
login: 'doe.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', type: "integer", label: 'ID'},
|
||||
{key: 'createdAt', type: "integer", label: 'Created At'},
|
||||
{key: 'lastname', label: 'Lastname'},
|
||||
{key: 'firstname', label: 'Firstname'},
|
||||
{key: 'email', label: 'Email'},
|
||||
{key: 'address', label: 'Address'},
|
||||
{key: 'zip', label: 'Zip'},
|
||||
{key: 'town', label: 'Town'},
|
||||
{key: 'login', label: 'Login'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{key: 'action', label: 'Action'}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -131,16 +131,13 @@ $fields = implode(',', $fieldArray);
|
||||
//var_dump($fieldArray);die();
|
||||
$maxLength = 0;
|
||||
for ($i = 1; $i <= $record_numbers; $i++) {
|
||||
if ($startlinenb && $i < $startlinenb) {
|
||||
if ($startlinenb && $i < $startlinenb)
|
||||
continue;
|
||||
}
|
||||
if ($endlinenb && $i > $endlinenb) {
|
||||
if ($endlinenb && $i > $endlinenb)
|
||||
continue;
|
||||
}
|
||||
$row = dbase_get_record_with_names($fhandle, $i);
|
||||
if ($row === false || (isset($row["deleted"]) && $row["deleted"] == '1')) {
|
||||
if ($row === false || (isset($row["deleted"]) && $row["deleted"] == '1'))
|
||||
continue;
|
||||
}
|
||||
$sqlInsert = "INSERT INTO `$table_name`($fields) VALUES (null,";
|
||||
array_shift($row); // remove delete column
|
||||
foreach ($row as $value) {
|
||||
|
||||
@@ -88,29 +88,25 @@ if (!$ret > 0) {
|
||||
|
||||
$sql = "SELECT * FROM `$table` WHERE 1";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
while ($fields = $db->fetch_array($resql)) {
|
||||
if ($resql)
|
||||
while ($fields = $db->fetch_array($resql)) {
|
||||
$errorrecord = 0;
|
||||
if ($fields === false) {
|
||||
if ($fields === false)
|
||||
continue;
|
||||
}
|
||||
$nboflines++;
|
||||
|
||||
$produit = new Product($db);
|
||||
$produit->type = 0;
|
||||
$produit->status = 1;
|
||||
$produit->ref = trim($fields['REF']);
|
||||
if ($produit->ref == '') {
|
||||
if ($produit->ref == '')
|
||||
continue;
|
||||
}
|
||||
print "Process line nb " . $j . ", ref " . $produit->ref;
|
||||
$produit->label = trim($fields['LIBELLE']);
|
||||
if ($produit->label == '') {
|
||||
if ($produit->label == '')
|
||||
$produit->label = $produit->ref;
|
||||
}
|
||||
if (empty($produit->label)) {
|
||||
if (empty($produit->label))
|
||||
continue;
|
||||
}
|
||||
//$produit->description = trim($fields[4] . "\n" . ($fields[5] ? $fields[5] . ' x ' . $fields[6] . ' x ' . $fields[7] : ''));
|
||||
// $produit->volume = price2num($fields[8]);
|
||||
// $produit->volume_unit = 0;
|
||||
@@ -170,9 +166,8 @@ if ($resql) {
|
||||
//$ret1 = $produit->updatePrice($produit->price_ttc, $produit->price_base_type, $user, $produit->tva_tx, $produit->price_min, 1, $produit->tva_npr, 0, 0, array());
|
||||
$ret1 = false;
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
if ($fields['TARIF' . ($i)] == 0) {
|
||||
if ($fields['TARIF' . ($i)] == 0)
|
||||
continue;
|
||||
}
|
||||
$ret1 = $ret1 || $produit->updatePrice(price2num($fields['TARIF' . ($i)]), 'HT', $user, $produit->tva_tx, $produit->price_min, $i + 1, $produit->tva_npr, 0, 0, array()) < 0;
|
||||
}
|
||||
if ($ret1) {
|
||||
@@ -232,10 +227,8 @@ if ($resql) {
|
||||
$error++; // $errorrecord will be reset
|
||||
}
|
||||
$j++;
|
||||
}
|
||||
} else {
|
||||
} else
|
||||
die("error : $sql");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -144,17 +144,15 @@ if (!$ret > 0) {
|
||||
$sql = "SELECT * FROM `$table` WHERE 1 "; //ORDER BY REMISE DESC,`LCIVIL` DESC";
|
||||
$resql = $db->query($sql);
|
||||
//$db->begin();
|
||||
if ($resql) {
|
||||
while ($fields = $db->fetch_array($resql)) {
|
||||
if ($resql)
|
||||
while ($fields = $db->fetch_array($resql)) {
|
||||
$i++;
|
||||
$errorrecord = 0;
|
||||
|
||||
if ($startlinenb && $i < $startlinenb) {
|
||||
if ($startlinenb && $i < $startlinenb)
|
||||
continue;
|
||||
}
|
||||
if ($endlinenb && $i > $endlinenb) {
|
||||
if ($endlinenb && $i > $endlinenb)
|
||||
continue;
|
||||
}
|
||||
|
||||
$nboflines++;
|
||||
|
||||
@@ -172,20 +170,17 @@ if ($resql) {
|
||||
|
||||
|
||||
$object->address = trim($fields['FADR1']);
|
||||
if ($fields['FADR2']) {
|
||||
if ($fields['FADR2'])
|
||||
$object->address .= "\n" . trim($fields['FADR2']);
|
||||
}
|
||||
if ($fields['FADR3']) {
|
||||
if ($fields['FADR3'])
|
||||
$object->address .= "\n" . trim($fields['FADR3']);
|
||||
}
|
||||
|
||||
$object->zip = trim($fields['FPOSTE']);
|
||||
$object->town = trim($fields['FVILLE']);
|
||||
if ($fields['FPAYS']) {
|
||||
if ($fields['FPAYS'])
|
||||
$object->country_id = dol_getIdFromCode($db, trim(ucwords(strtolower($fields['FPAYS']))), 'c_country', 'label', 'rowid');
|
||||
} else {
|
||||
else
|
||||
$object->country_id = 1;
|
||||
}
|
||||
$object->phone = trim($fields['FTEL']) ? trim($fields['FTEL']) : trim($fields['FCONTACT']);
|
||||
$object->phone = substr($object->phone, 0, 20);
|
||||
$object->fax = trim($fields['FFAX']) ? trim($fields['FFAX']) : trim($fields['FCONTACT']);
|
||||
@@ -295,20 +290,17 @@ if ($resql) {
|
||||
$contact->lastname = $fields['LCIVIL'] . " " . $fields['LNOM'];
|
||||
}
|
||||
$contact->address = trim($fields['LADR1']);
|
||||
if ($fields['LADR2']) {
|
||||
if ($fields['LADR2'])
|
||||
$contact->address .= "\n" . trim($fields['LADR2']);
|
||||
}
|
||||
if ($fields['LADR3']) {
|
||||
if ($fields['LADR3'])
|
||||
$contact->address .= "\n" . trim($fields['LADR3']);
|
||||
}
|
||||
|
||||
$contact->zip = trim($fields['LPOSTE']);
|
||||
$contact->town = trim($fields['LVILLE']);
|
||||
if ($fields['FPAYS']) {
|
||||
if ($fields['FPAYS'])
|
||||
$contact->country_id = dol_getIdFromCode($db, trim(ucwords(strtolower($fields['LPAYS']))), 'c_country', 'label', 'rowid');
|
||||
} else {
|
||||
else
|
||||
$contact->country_id = 1;
|
||||
}
|
||||
$contact->email = $fields['LMAIL'];
|
||||
$contact->phone = trim($fields['LTEL']) ? trim($fields['LTEL']) : trim($fields['LCONTACT']);
|
||||
$contact->fax = trim($fields['LFAX']) ? trim($fields['LFAX']) : trim($fields['LCONTACT']);
|
||||
@@ -348,10 +340,8 @@ if ($resql) {
|
||||
$error++; // $errorrecord will be reset
|
||||
}
|
||||
$j++;
|
||||
}
|
||||
} else {
|
||||
} else
|
||||
die("error : $sql");
|
||||
}
|
||||
|
||||
$db->commit();
|
||||
|
||||
|
||||
@@ -25,42 +25,27 @@ class DBase
|
||||
private $recordLength = 0;
|
||||
private $recordCount = 0;
|
||||
|
||||
/**
|
||||
* resource dbase_open
|
||||
* @param string $filename filename
|
||||
* @param int $mode mode
|
||||
* @return DBase
|
||||
*/
|
||||
//resource dbase_open ( string $filename , int $mode )
|
||||
public static function open($filename, $mode)
|
||||
{
|
||||
if (!file_exists($filename)) {
|
||||
if (!file_exists($filename))
|
||||
return false;
|
||||
}
|
||||
$modes = array('r', 'w', 'r+');
|
||||
$mode = $modes[$mode];
|
||||
$fd = fopen($filename, $mode);
|
||||
if (!$fd) {
|
||||
if (!$fd)
|
||||
return false;
|
||||
}
|
||||
return new DBase($fd);
|
||||
}
|
||||
|
||||
/**
|
||||
* resource dbase_create
|
||||
* @param string $filename filename
|
||||
* @param array $fields fields
|
||||
* @param int $type DBASE_TYPE_DBASE
|
||||
* @return DBase
|
||||
*/
|
||||
//resource dbase_create ( string $filename , array $fields [, int $type = DBASE_TYPE_DBASE ] )
|
||||
public static function create($filename, $fields, $type = DBASE_TYPE_DBASE)
|
||||
{
|
||||
if (file_exists($filename)) {
|
||||
if (file_exists($filename))
|
||||
return false;
|
||||
}
|
||||
$fd = fopen($filename, 'c+');
|
||||
if (!$fd) {
|
||||
if (!$fd)
|
||||
return false;
|
||||
}
|
||||
// Byte 0 (1 byte): Valid dBASE for DOS file; bits 0-2 indicate version number, bit 3
|
||||
// indicates the presence of a dBASE for DOS memo file, bits 4-6 indicate the
|
||||
// presence of a SQL table, bit 7 indicates the presence of any memo file
|
||||
@@ -77,9 +62,8 @@ class DBase
|
||||
// Byte 10-11 (16-bit number): Number of bytes in record.
|
||||
// Make sure the include the byte for deleted flag
|
||||
$len = 1;
|
||||
foreach ($fields as &$field) {
|
||||
foreach ($fields as &$field)
|
||||
$len += self::length($field);
|
||||
}
|
||||
self::putInt16($fd, $len);
|
||||
// Byte 12-13 (2 bytes): Reserved, 0 filled.
|
||||
self::putInt16($fd, 0);
|
||||
@@ -118,11 +102,7 @@ class DBase
|
||||
return new DBase($fd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create DBase instance
|
||||
* @param mixed $fd file descriptor
|
||||
* @return void
|
||||
*/
|
||||
// Create DBase instance
|
||||
private function __construct($fd)
|
||||
{
|
||||
$this->fd = $fd;
|
||||
@@ -146,120 +126,75 @@ class DBase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_close
|
||||
* @return void
|
||||
*/
|
||||
//bool dbase_close ( resource $dbase_identifier )
|
||||
public function close()
|
||||
{
|
||||
fclose($this->fd);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* dbase_get_header_info
|
||||
* @return array
|
||||
*/
|
||||
//array dbase_get_header_info ( resource $dbase_identifier )
|
||||
public function get_header_info()
|
||||
{
|
||||
// phpcs:disable
|
||||
return $this->fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_numfields
|
||||
* @return int
|
||||
*/
|
||||
//int dbase_numfields ( resource $dbase_identifier )
|
||||
public function numfields()
|
||||
{
|
||||
return $this->fieldCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_numrecords
|
||||
* @return int
|
||||
*/
|
||||
//int dbase_numrecords ( resource $dbase_identifier )
|
||||
public function numrecords()
|
||||
{
|
||||
return $this->recordCount;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* dbase_add_record
|
||||
* @param array $record record
|
||||
* @return bool
|
||||
*/
|
||||
//bool dbase_add_record ( resource $dbase_identifier , array $record )
|
||||
public function add_record($record)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (count($record) != $this->fieldCount) {
|
||||
if (count($record) != $this->fieldCount)
|
||||
return false;
|
||||
}
|
||||
// Seek to end of file, minus the end of file marker
|
||||
fseek($this->fd, 0, SEEK_END);
|
||||
// Put the deleted flag
|
||||
self::putChar8($this->fd, 0x20);
|
||||
// Put the record
|
||||
if (!$this->putRecord($record)) {
|
||||
if (!$this->putRecord($record))
|
||||
return false;
|
||||
}
|
||||
// Update the record count
|
||||
fseek($this->fd, 4);
|
||||
self::putInt32($this->fd, ++$this->recordCount);
|
||||
return true;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* dbase_replace_record
|
||||
* @param array $record record
|
||||
* @param int $record_number record number
|
||||
* @return bool
|
||||
*/
|
||||
//bool dbase_replace_record ( resource $dbase_identifier , array $record , int $record_number )
|
||||
public function replace_record($record, $record_number)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (count($record) != $this->fieldCount) {
|
||||
if (count($record) != $this->fieldCount)
|
||||
return false;
|
||||
}
|
||||
if ($record_number < 1 || $record_number > $this->recordCount) {
|
||||
if ($record_number < 1 || $record_number > $this->recordCount)
|
||||
return false;
|
||||
}
|
||||
// Skip to the record location, plus the 1 byte for the deleted flag
|
||||
fseek($this->fd, $this->headerLength + ($this->recordLength * ($record_number - 1)) + 1);
|
||||
return $this->putRecord($record);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* dbase_delete_record
|
||||
* @param int $record_number record number
|
||||
* @return bool
|
||||
*/
|
||||
//bool dbase_delete_record ( resource $dbase_identifier , int $record_number )
|
||||
public function delete_record($record_number)
|
||||
{
|
||||
// phpcs:enable
|
||||
if ($record_number < 1 || $record_number > $this->recordCount) {
|
||||
if ($record_number < 1 || $record_number > $this->recordCount)
|
||||
return false;
|
||||
}
|
||||
fseek($this->fd, $this->headerLength + ($this->recordLength * ($record_number - 1)));
|
||||
self::putChar8($this->fd, 0x2A);
|
||||
return true;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* dbase_get_record
|
||||
* @param int $record_number record number
|
||||
* @return array
|
||||
*/
|
||||
//array dbase_get_record ( resource $dbase_identifier , int $record_number )
|
||||
public function get_record($record_number)
|
||||
{
|
||||
// phpcs:enable
|
||||
if ($record_number < 1 || $record_number > $this->recordCount) {
|
||||
if ($record_number < 1 || $record_number > $this->recordCount)
|
||||
return false;
|
||||
}
|
||||
fseek($this->fd, $this->headerLength + ($this->recordLength * ($record_number - 1)));
|
||||
$record = array(
|
||||
'deleted' => self::getChar8($this->fd) == 0x2A ? 1 : 0
|
||||
@@ -268,31 +203,23 @@ class DBase
|
||||
$value = trim(fread($this->fd, $field['length']));
|
||||
if ($field['type'] == 'L') {
|
||||
$value = strtolower($value);
|
||||
if ($value == 't' || $value == 'y') {
|
||||
if ($value == 't' || $value == 'y')
|
||||
$value = true;
|
||||
} elseif ($value == 'f' || $value == 'n') {
|
||||
elseif ($value == 'f' || $value == 'n')
|
||||
$value = false;
|
||||
} else {
|
||||
else
|
||||
$value = null;
|
||||
}
|
||||
}
|
||||
$record[$i] = $value;
|
||||
}
|
||||
return $record;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* dbase_get_record_with_names
|
||||
* @param int $record_number record number
|
||||
* @return array
|
||||
*/
|
||||
//array dbase_get_record_with_names ( resource $dbase_identifier , int $record_number )
|
||||
public function get_record_with_names($record_number)
|
||||
{
|
||||
// phpcs:enable
|
||||
if ($record_number < 1 || $record_number > $this->recordCount) {
|
||||
if ($record_number < 1 || $record_number > $this->recordCount)
|
||||
return false;
|
||||
}
|
||||
$record = $this->get_record($record_number);
|
||||
foreach ($this->fields as $i => &$field) {
|
||||
$record[$field['name']] = $record[$i];
|
||||
@@ -301,10 +228,7 @@ class DBase
|
||||
return $record;
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_pack
|
||||
* @return void
|
||||
*/
|
||||
//bool dbase_pack ( resource $dbase_identifier )
|
||||
public function pack()
|
||||
{
|
||||
$in_offset = $out_offset = $this->headerLength;
|
||||
@@ -333,10 +257,6 @@ class DBase
|
||||
* A few utilitiy functions
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param string $field field
|
||||
* @return int
|
||||
*/
|
||||
private static function length($field)
|
||||
{
|
||||
switch ($field[1]) {
|
||||
@@ -359,100 +279,51 @@ class DBase
|
||||
* Functions for reading and writing bytes
|
||||
*/
|
||||
|
||||
/**
|
||||
* getChar8
|
||||
* @param mixed $fd file descriptor
|
||||
* @return int
|
||||
*/
|
||||
private static function getChar8($fd)
|
||||
{
|
||||
return ord(fread($fd, 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* putChar8
|
||||
* @param mixed $fd file descriptor
|
||||
* @param mixed $value value
|
||||
* @return bool
|
||||
*/
|
||||
private static function putChar8($fd, $value)
|
||||
{
|
||||
return fwrite($fd, chr($value));
|
||||
}
|
||||
|
||||
/**
|
||||
* getInt16
|
||||
* @param mixed $fd file descriptor
|
||||
* @param int $n n
|
||||
* @return bool
|
||||
*/
|
||||
private static function getInt16($fd, $n = 1)
|
||||
{
|
||||
$data = fread($fd, 2 * $n);
|
||||
$i = unpack("S$n", $data);
|
||||
if ($n == 1) {
|
||||
if ($n == 1)
|
||||
return (int) $i[1];
|
||||
} else {
|
||||
else
|
||||
return array_merge($i);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* putInt16
|
||||
* @param mixed $fd file descriptor
|
||||
* @param mixed $value value
|
||||
* @return bool
|
||||
*/
|
||||
private static function putInt16($fd, $value)
|
||||
{
|
||||
return fwrite($fd, pack('S', $value));
|
||||
}
|
||||
|
||||
/**
|
||||
* getInt32
|
||||
* @param mixed $fd file descriptor
|
||||
* @param int $n n
|
||||
* @return bool
|
||||
*/
|
||||
private static function getInt32($fd, $n = 1)
|
||||
{
|
||||
$data = fread($fd, 4 * $n);
|
||||
$i = unpack("L$n", $data);
|
||||
if ($n == 1) {
|
||||
if ($n == 1)
|
||||
return (int) $i[1];
|
||||
} else {
|
||||
else
|
||||
return array_merge($i);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* putint32
|
||||
* @param mixed $fd file descriptor
|
||||
* @param mixed $value value
|
||||
* @return bool
|
||||
*/
|
||||
private static function putInt32($fd, $value)
|
||||
{
|
||||
return fwrite($fd, pack('L', $value));
|
||||
}
|
||||
|
||||
/**
|
||||
* putString
|
||||
* @param mixed $fd file descriptor
|
||||
* @param mixed $value value
|
||||
* @param int $length length
|
||||
* @return bool
|
||||
*/
|
||||
private static function putString($fd, $value, $length = 254)
|
||||
{
|
||||
$ret = fwrite($fd, pack('A' . $length, $value));
|
||||
}
|
||||
|
||||
/**
|
||||
* putRecord
|
||||
* @param mixed $record record
|
||||
* @return bool
|
||||
*/
|
||||
private function putRecord($record)
|
||||
{
|
||||
foreach ($this->fields as $i => &$field) {
|
||||
@@ -468,130 +339,62 @@ class DBase
|
||||
}
|
||||
|
||||
if (!function_exists('dbase_open')) {
|
||||
/**
|
||||
* dbase_open
|
||||
* @param string $filename filename
|
||||
* @param int $mode mode
|
||||
* @return DBase
|
||||
*/
|
||||
|
||||
function dbase_open($filename, $mode)
|
||||
{
|
||||
return DBase::open($filename, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_create
|
||||
* @param string $filename filename
|
||||
* @param array $fields fields
|
||||
* @param int $type type
|
||||
* @return DBase
|
||||
*/
|
||||
function dbase_create($filename, $fields, $type = DBASE_TYPE_DBASE)
|
||||
{
|
||||
return DBase::create($filename, $fields, $type);
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_close
|
||||
* @param Resource $dbase_identifier dbase identifier
|
||||
* @return bool
|
||||
*/
|
||||
function dbase_close($dbase_identifier)
|
||||
{
|
||||
return $dbase_identifier->close();
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_get_header_info
|
||||
* @param Resource $dbase_identifier dbase identifier
|
||||
* @return string
|
||||
*/
|
||||
function dbase_get_header_info($dbase_identifier)
|
||||
{
|
||||
return $dbase_identifier->get_header_info();
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_numfields
|
||||
* @param Resource $dbase_identifier dbase identifier
|
||||
* @return int
|
||||
*/
|
||||
function dbase_numfields($dbase_identifier)
|
||||
{
|
||||
$dbase_identifier->numfields();
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_numrecords
|
||||
* @param Resource $dbase_identifier dbase identifier
|
||||
* @return int
|
||||
*/
|
||||
function dbase_numrecords($dbase_identifier)
|
||||
{
|
||||
return $dbase_identifier->numrecords();
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_add_record
|
||||
* @param Resource $dbase_identifier dbase identifier
|
||||
* @param array $record record
|
||||
* @return bool
|
||||
*/
|
||||
function dbase_add_record($dbase_identifier, $record)
|
||||
{
|
||||
return $dbase_identifier->add_record($record);
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_delete_record
|
||||
* @param Resource $dbase_identifier dbase identifier
|
||||
* @param int $record_number record number
|
||||
* @return bool
|
||||
*/
|
||||
function dbase_delete_record($dbase_identifier, $record_number)
|
||||
{
|
||||
return $dbase_identifier->delete_record($record_number);
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_replace_record
|
||||
* @param Resource $dbase_identifier dbase identifier
|
||||
* @param array $record record
|
||||
* @param int $record_number record number
|
||||
* @return bool
|
||||
*/
|
||||
function dbase_replace_record($dbase_identifier, $record, $record_number)
|
||||
{
|
||||
return $dbase_identifier->replace_record($record, $record_number);
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_get_record
|
||||
* @param Resource $dbase_identifier dbase identifier
|
||||
* @param int $record_number record number
|
||||
* @return bool
|
||||
*/
|
||||
function dbase_get_record($dbase_identifier, $record_number)
|
||||
{
|
||||
return $dbase_identifier->get_record($record_number);
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_get_record_with_names
|
||||
* @param Resource $dbase_identifier dbase identifier
|
||||
* @param int $record_number record number
|
||||
* @return bool
|
||||
*/
|
||||
function dbase_get_record_with_names($dbase_identifier, $record_number)
|
||||
{
|
||||
return $dbase_identifier->get_record_with_names($record_number);
|
||||
}
|
||||
|
||||
/**
|
||||
* dbase_pack
|
||||
* @param Resource $dbase_identifier dbase identifier
|
||||
* @return bool
|
||||
*/
|
||||
function dbase_pack($dbase_identifier)
|
||||
{
|
||||
return $dbase_identifier->pack();
|
||||
|
||||
@@ -100,7 +100,8 @@ $dates = array (mktime(12, 0, 0, 1, 3, $year),
|
||||
);
|
||||
|
||||
$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";
|
||||
exit;
|
||||
}
|
||||
@@ -110,10 +111,12 @@ $user->getrights();
|
||||
$socids = array();
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client in (1, 3)";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
if ($resql)
|
||||
{
|
||||
$num_thirdparties = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num_thirdparties) {
|
||||
while ($i < $num_thirdparties)
|
||||
{
|
||||
$i++;
|
||||
$row = $db->fetch_row($resql);
|
||||
$socids[$i] = $row[0];
|
||||
@@ -123,10 +126,12 @@ if ($resql) {
|
||||
$prodids = array();
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
if ($resql)
|
||||
{
|
||||
$num_prods = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num_prods) {
|
||||
while ($i < $num_prods)
|
||||
{
|
||||
$i++;
|
||||
$row = $db->fetch_row($resql);
|
||||
$prodids[$i] = $row[0];
|
||||
@@ -135,7 +140,8 @@ if ($resql) {
|
||||
|
||||
$i=0;
|
||||
$result=0;
|
||||
while ($i < GEN_NUMBER_FACTURE && $result >= 0) {
|
||||
while ($i < GEN_NUMBER_FACTURE && $result >= 0)
|
||||
{
|
||||
$i++;
|
||||
$socid = mt_rand(1, $num_thirdparties);
|
||||
|
||||
@@ -152,27 +158,35 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0) {
|
||||
$fuser->getRights();
|
||||
|
||||
$result=$object->create($fuser);
|
||||
if ($result >= 0) {
|
||||
if ($result >= 0)
|
||||
{
|
||||
$nbp = mt_rand(2, 5);
|
||||
$xnbp = 0;
|
||||
while ($xnbp < $nbp) {
|
||||
while ($xnbp < $nbp)
|
||||
{
|
||||
$prodid = mt_rand(1, $num_prods);
|
||||
$product=new Product($db);
|
||||
$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);
|
||||
if ($result < 0) {
|
||||
if ($result < 0)
|
||||
{
|
||||
dol_print_error($db, $propal->error);
|
||||
}
|
||||
$xnbp++;
|
||||
}
|
||||
|
||||
$result=$object->validate($fuser);
|
||||
if ($result) {
|
||||
if ($result)
|
||||
{
|
||||
print " OK with ref ".$object->ref."\n";;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db, $object->error);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db, $object->error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,8 @@ $dates = array (mktime(12, 0, 0, 1, 3, $year),
|
||||
);
|
||||
|
||||
$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";
|
||||
exit;
|
||||
}
|
||||
@@ -123,9 +124,8 @@ if ($resql) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$societesid[$i] = $row[0];
|
||||
}
|
||||
} else {
|
||||
print "err";
|
||||
}
|
||||
else { print "err"; }
|
||||
|
||||
$commandesid = array();
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande";
|
||||
@@ -138,9 +138,8 @@ if ($resql) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$commandesid[$i] = $row[0];
|
||||
}
|
||||
} else {
|
||||
print "err";
|
||||
}
|
||||
else { print "err"; }
|
||||
|
||||
$prodids = array();
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1";
|
||||
@@ -159,7 +158,8 @@ if ($resql) {
|
||||
|
||||
|
||||
print "Build ".GEN_NUMBER_COMMANDE." orders\n";
|
||||
for ($s = 0; $s < GEN_NUMBER_COMMANDE; $s++) {
|
||||
for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
|
||||
{
|
||||
print "Process order ".$s."\n";
|
||||
|
||||
$object = new Commande($db);
|
||||
@@ -184,30 +184,38 @@ for ($s = 0; $s < GEN_NUMBER_COMMANDE; $s++) {
|
||||
$db->begin();
|
||||
|
||||
$result=$object->create($fuser);
|
||||
if ($result >= 0) {
|
||||
if ($result >= 0)
|
||||
{
|
||||
$nbp = mt_rand(2, 5);
|
||||
$xnbp = 0;
|
||||
while ($xnbp < $nbp) {
|
||||
while ($xnbp < $nbp)
|
||||
{
|
||||
$prodid = mt_rand(1, $num_prods);
|
||||
$product=new Product($db);
|
||||
$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);
|
||||
if ($result <= 0) {
|
||||
if ($result <= 0)
|
||||
{
|
||||
dol_print_error($db, $object->error);
|
||||
}
|
||||
$xnbp++;
|
||||
}
|
||||
|
||||
$result=$object->valid($fuser);
|
||||
if ($result > 0) {
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
print " OK with ref ".$object->ref."\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print " KO\n";
|
||||
$db->rollback();
|
||||
dol_print_error($db, $object->error);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print " KO\n";
|
||||
$db->rollback();
|
||||
dol_print_error($db, $object->error);
|
||||
|
||||
@@ -54,7 +54,8 @@ define(GEN_NUMBER_PRODUIT, 100000);
|
||||
|
||||
|
||||
$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";
|
||||
exit;
|
||||
}
|
||||
@@ -65,36 +66,27 @@ $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++;
|
||||
}
|
||||
while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; }
|
||||
}
|
||||
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++;
|
||||
}
|
||||
} else {
|
||||
print "err";
|
||||
}
|
||||
while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; }
|
||||
} else { print "err"; }
|
||||
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++;
|
||||
}
|
||||
} else {
|
||||
print "err";
|
||||
}
|
||||
while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; }
|
||||
} else { print "err"; }
|
||||
|
||||
|
||||
print "Generates ".GEN_NUMBER_PRODUIT." products\n";
|
||||
for ($s = 0; $s < GEN_NUMBER_PRODUIT; $s++) {
|
||||
for ($s = 0 ; $s < GEN_NUMBER_PRODUIT ; $s++)
|
||||
{
|
||||
print "Product ".$s;
|
||||
$produit = new Product($db);
|
||||
$produit->type = mt_rand(0, 1);
|
||||
@@ -102,12 +94,9 @@ for ($s = 0; $s < GEN_NUMBER_PRODUIT; $s++) {
|
||||
$produit->ref = ($produit->type?'S':'P').time().$s;
|
||||
$produit->label = 'Label '.time().$s;
|
||||
$produit->description = 'Description '.time().$s;
|
||||
$produit->price = mt_rand(1, 999.99);
|
||||
$produit->tva_tx = "20.0";
|
||||
$produit->price = mt_rand(1, 1000);
|
||||
$produit->tva_tx = "19.6";
|
||||
$ret=$produit->create($user);
|
||||
if ($ret < 0) {
|
||||
print "Error $ret - ".$produit->error."\n";
|
||||
} else {
|
||||
print " OK with ref ".$produit->ref."\n";
|
||||
}
|
||||
if ($ret < 0) print "Error $ret - ".$produit->error."\n";
|
||||
else print " OK with ref ".$produit->ref."\n";
|
||||
}
|
||||
|
||||
@@ -102,7 +102,8 @@ $dates = array (mktime(12, 0, 0, 1, 3, $year),
|
||||
);
|
||||
|
||||
$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";
|
||||
exit;
|
||||
}
|
||||
@@ -112,10 +113,12 @@ $user->getrights();
|
||||
$socids = array();
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client in (1,3)";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
if ($resql)
|
||||
{
|
||||
$num_thirdparties = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num_thirdparties) {
|
||||
while ($i < $num_thirdparties)
|
||||
{
|
||||
$i++;
|
||||
$row = $db->fetch_row($resql);
|
||||
$socids[$i] = $row[0];
|
||||
@@ -125,10 +128,12 @@ if ($resql) {
|
||||
$contids = array();
|
||||
$sql = "SELECT rowid, fk_soc FROM ".MAIN_DB_PREFIX."socpeople";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
if ($resql)
|
||||
{
|
||||
$num_conts = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num_conts) {
|
||||
while ($i < $num_conts)
|
||||
{
|
||||
$i++;
|
||||
$row = $db->fetch_row($resql);
|
||||
$contids[$row[1]][0] = $row[0]; // A ameliorer
|
||||
@@ -138,10 +143,12 @@ if ($resql) {
|
||||
$prodids = array();
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
if ($resql)
|
||||
{
|
||||
$num_prods = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num_prods) {
|
||||
while ($i < $num_prods)
|
||||
{
|
||||
$i++;
|
||||
$row = $db->fetch_row($resql);
|
||||
$prodids[$i] = $row[0];
|
||||
@@ -152,13 +159,15 @@ $user->rights->propal->creer=1;
|
||||
$user->rights->propal->propal_advance->validate=1;
|
||||
|
||||
|
||||
if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php")) {
|
||||
if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php";
|
||||
}
|
||||
|
||||
$i=0;
|
||||
$result=0;
|
||||
while ($i < GEN_NUMBER_PROPAL && $result >= 0) {
|
||||
while ($i < GEN_NUMBER_PROPAL && $result >= 0)
|
||||
{
|
||||
$i++;
|
||||
$socid = mt_rand(1, $num_thirdparties);
|
||||
print "Proposal ".$i." for socid ".$socid;
|
||||
@@ -179,30 +188,38 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0) {
|
||||
$object->mode_reglement_id = 3;
|
||||
|
||||
$result=$object->create($fuser);
|
||||
if ($result >= 0) {
|
||||
if ($result >= 0)
|
||||
{
|
||||
$nbp = mt_rand(2, 5);
|
||||
$xnbp = 0;
|
||||
while ($xnbp < $nbp) {
|
||||
while ($xnbp < $nbp)
|
||||
{
|
||||
$prodid = mt_rand(1, $num_prods);
|
||||
$product=new Product($db);
|
||||
$result=$product->fetch($prodids[$prodid]);
|
||||
$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);
|
||||
}
|
||||
$xnbp++;
|
||||
}
|
||||
|
||||
$result=$object->valid($fuser);
|
||||
if ($result > 0) {
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
print " OK with ref ".$object->ref."\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print " KO\n";
|
||||
$db->rollback();
|
||||
dol_print_error($db, $object->error);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db, $object->error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,8 @@ define(GEN_NUMBER_SOCIETE, 10);
|
||||
|
||||
|
||||
$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";
|
||||
exit;
|
||||
}
|
||||
@@ -84,9 +85,7 @@ if ($resql) {
|
||||
$societesid[$i] = $row[0];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print "err";
|
||||
}
|
||||
} else { print "err"; }
|
||||
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
|
||||
$resql=$db->query($sql);
|
||||
@@ -97,14 +96,13 @@ if ($resql) {
|
||||
$commandesid[$i] = $row[0];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print "err";
|
||||
}
|
||||
} else { print "err"; }
|
||||
|
||||
|
||||
|
||||
print "Generates ".GEN_NUMBER_SOCIETE." companies\n";
|
||||
for ($s = 0; $s < GEN_NUMBER_SOCIETE; $s++) {
|
||||
for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
|
||||
{
|
||||
print "Company $s\n";
|
||||
$soc = new Societe($db);
|
||||
$soc->name = "Company num ".time()."$s";
|
||||
@@ -117,27 +115,30 @@ for ($s = 0; $s < GEN_NUMBER_SOCIETE; $s++) {
|
||||
$soc->country_id=1;
|
||||
$soc->country_code='FR';
|
||||
// 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";
|
||||
$soc->note_private = 'Company created by the script generate-societe.php';
|
||||
$socid = $soc->create();
|
||||
|
||||
if ($socid >= 0) {
|
||||
if ($socid >= 0)
|
||||
{
|
||||
$rand = mt_rand(1, 4);
|
||||
print "> Generates $rand contact(s)\n";
|
||||
for ($c = 0; $c < $rand; $c++) {
|
||||
for ($c = 0 ; $c < $rand ; $c++)
|
||||
{
|
||||
$contact = new Contact($db);
|
||||
$contact->socid = $soc->id;
|
||||
$contact->lastname = "Lastname".$c;
|
||||
$contact->firstname = $listoflastname[mt_rand(0, count($listoflastname)-1)];
|
||||
if ($contact->create($user)) {
|
||||
if ( $contact->create($user) )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
print "Company ".$s." created nom=".$soc->name."\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Error: ".$soc->error."\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,26 +79,30 @@ if (! file_exists($filepath)) {
|
||||
}
|
||||
|
||||
$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";
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
// Ask confirmation
|
||||
if (! $confirmed) {
|
||||
if (! $confirmed)
|
||||
{
|
||||
print "Hit Enter to continue or CTRL+C to stop...\n";
|
||||
$input = trim(fgets(STDIN));
|
||||
}
|
||||
|
||||
// Open input and output files
|
||||
$fhandle = fopen($filepath, 'r');
|
||||
if (! $fhandle) {
|
||||
if (! $fhandle)
|
||||
{
|
||||
print 'Error: Failed to open file '.$filepath."\n";
|
||||
exit(1);
|
||||
}
|
||||
$fhandleerr = fopen($filepatherr, 'w');
|
||||
if (! $fhandleerr) {
|
||||
if (! $fhandleerr)
|
||||
{
|
||||
print 'Error: Failed to open file '.$filepatherr."\n";
|
||||
exit(1);
|
||||
}
|
||||
@@ -110,16 +114,13 @@ $db->begin();
|
||||
|
||||
$i=0;
|
||||
$nboflines++;
|
||||
while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) {
|
||||
while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
{
|
||||
$i++;
|
||||
$errorrecord=0;
|
||||
|
||||
if ($startlinenb && $i < $startlinenb) {
|
||||
continue;
|
||||
}
|
||||
if ($endlinenb && $i > $endlinenb) {
|
||||
continue;
|
||||
}
|
||||
if ($startlinenb && $i < $startlinenb) continue;
|
||||
if ($endlinenb && $i > $endlinenb) continue;
|
||||
|
||||
$nboflines++;
|
||||
|
||||
@@ -158,23 +159,30 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
$produit->array_options['options_ecotaxdeee']=price2num($fields[17]);
|
||||
|
||||
$ret=$produit->create($user);
|
||||
if ($ret < 0) {
|
||||
if ($ret < 0)
|
||||
{
|
||||
print " - Error in create result code = ".$ret." - ".$produit->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print " - Creation OK with ref ".$produit->ref." - id = ".$ret;
|
||||
}
|
||||
|
||||
dol_syslog("Add prices");
|
||||
|
||||
// If we use price level, insert price for each level
|
||||
if (! $errorrecord && 1) {
|
||||
if (! $errorrecord && 1)
|
||||
{
|
||||
$ret1=$produit->updatePrice($produit->price_ttc, $produit->price_base_type, $user, $produit->tva_tx, $produit->price_min, 1, $produit->tva_npr, 0, 0, array());
|
||||
$ret2=$produit->updatePrice(price2num($fields[14]), 'HT', $user, $produit->tva_tx, $produit->price_min, 2, $produit->tva_npr, 0, 0, array());
|
||||
if ($ret1 < 0 || $ret2 < 0) {
|
||||
if ($ret1 < 0 || $ret2 < 0)
|
||||
{
|
||||
print " - Error in updatePrice result code = ".$ret1." ".$ret2." - ".$produit->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print " - updatePrice OK";
|
||||
}
|
||||
}
|
||||
@@ -182,22 +190,27 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
dol_syslog("Add multilangs");
|
||||
|
||||
// Add alternative languages
|
||||
if (! $errorrecord && 1) {
|
||||
if (! $errorrecord && 1)
|
||||
{
|
||||
$produit->multilangs['fr_FR']=array('label'=>$produit->label, 'description'=>$produit->description, 'note'=>$produit->note_private);
|
||||
$produit->multilangs['en_US']=array('label'=>$fields[3], 'description'=>$produit->description, 'note'=>$produit->note_private);
|
||||
|
||||
$ret=$produit->setMultiLangs($user);
|
||||
if ($ret < 0) {
|
||||
if ($ret < 0)
|
||||
{
|
||||
print " - Error in setMultiLangs result code = ".$ret." - ".$produit->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print " - setMultiLangs OK";
|
||||
}
|
||||
}
|
||||
|
||||
print "\n";
|
||||
|
||||
if ($errorrecord) {
|
||||
if ($errorrecord)
|
||||
{
|
||||
fwrite($fhandleerr, 'Error on record nb '.$i." - ".$produit->errorsToString()."\n");
|
||||
$error++; // $errorrecord will be reset
|
||||
}
|
||||
@@ -210,10 +223,13 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
// commit or rollback
|
||||
print "Nb of lines qualified: ".$nboflines."\n";
|
||||
print "Nb of errors: ".$error."\n";
|
||||
if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) {
|
||||
if ($mode != 'confirmforced' && ($error || $mode != 'confirm'))
|
||||
{
|
||||
print "Rollback any changes.\n";
|
||||
$db->rollback();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Commit all changes.\n";
|
||||
$db->commit();
|
||||
}
|
||||
|
||||
@@ -79,26 +79,30 @@ if (! file_exists($filepath)) {
|
||||
}
|
||||
|
||||
$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";
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
// Ask confirmation
|
||||
if (! $confirmed) {
|
||||
if (! $confirmed)
|
||||
{
|
||||
print "Hit Enter to continue or CTRL+C to stop...\n";
|
||||
$input = trim(fgets(STDIN));
|
||||
}
|
||||
|
||||
// Open input and output files
|
||||
$fhandle = fopen($filepath, 'r');
|
||||
if (! $fhandle) {
|
||||
if (! $fhandle)
|
||||
{
|
||||
print 'Error: Failed to open file '.$filepath."\n";
|
||||
exit(1);
|
||||
}
|
||||
$fhandleerr = fopen($filepatherr, 'w');
|
||||
if (! $fhandleerr) {
|
||||
if (! $fhandleerr)
|
||||
{
|
||||
print 'Error: Failed to open file '.$filepatherr."\n";
|
||||
exit(1);
|
||||
}
|
||||
@@ -110,16 +114,13 @@ $db->begin();
|
||||
|
||||
$i=0;
|
||||
$nboflines=0;
|
||||
while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) {
|
||||
while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
{
|
||||
$i++;
|
||||
$errorrecord=0;
|
||||
|
||||
if ($startlinenb && $i < $startlinenb) {
|
||||
continue;
|
||||
}
|
||||
if ($endlinenb && $i > $endlinenb) {
|
||||
continue;
|
||||
}
|
||||
if ($startlinenb && $i < $startlinenb) continue;
|
||||
if ($endlinenb && $i > $endlinenb) continue;
|
||||
|
||||
$nboflines++;
|
||||
|
||||
@@ -143,16 +144,14 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
$object->default_lang = trim($fields[43]);
|
||||
|
||||
//$condpayment = dol_string_unaccent(trim($fields[36]));
|
||||
if ($fields[36]) {
|
||||
if ($fields[36])
|
||||
{
|
||||
$condpayment = trim($fields[36]);
|
||||
if ($condpayment == 'A la commande') {
|
||||
$condpayment = 'A réception de commande';
|
||||
}
|
||||
if ($condpayment == 'A reception facture') {
|
||||
$condpayment = 'Réception de facture';
|
||||
}
|
||||
if ($condpayment == 'A la commande') $condpayment = 'A réception de commande';
|
||||
if ($condpayment == 'A reception facture') $condpayment = 'Réception de facture';
|
||||
$object->cond_reglement_id = dol_getIdFromCode($db, $condpayment, 'c_payment_term', 'libelle_facture', 'rowid', 1);
|
||||
if (empty($object->cond_reglement_id)) {
|
||||
if (empty($object->cond_reglement_id))
|
||||
{
|
||||
print " - Error cant find payment mode for ".$condpayment."\n";
|
||||
$errorrecord++;
|
||||
}
|
||||
@@ -166,9 +165,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
|
||||
// Set price level
|
||||
$object->price_level = 1;
|
||||
if ($labeltype == 'Revendeur') {
|
||||
$object->price_level = 2;
|
||||
}
|
||||
if ($labeltype == 'Revendeur') $object->price_level = 2;
|
||||
|
||||
print "Process line nb ".$i.", name ".$object->name;
|
||||
|
||||
@@ -177,48 +174,55 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
$object->array_options['options_anastate']=price2num($fields[20]);
|
||||
$object->array_options['options_anaregion']=price2num($fields[17]);
|
||||
|
||||
if (! $errorrecord) {
|
||||
if (! $errorrecord)
|
||||
{
|
||||
$ret=$object->create($user);
|
||||
if ($ret < 0) {
|
||||
if ($ret < 0)
|
||||
{
|
||||
print " - Error in create result code = ".$ret." - ".$object->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print " - Creation OK with name ".$object->name." - id = ".$ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $errorrecord) {
|
||||
if (! $errorrecord)
|
||||
{
|
||||
dol_syslog("Set price level");
|
||||
$object->set_price_level($object->price_level, $user);
|
||||
}
|
||||
|
||||
// Assign sales representative
|
||||
if (! $errorrecord && $fields[3]) {
|
||||
if (! $errorrecord && $fields[3])
|
||||
{
|
||||
$salesrep=new User($db);
|
||||
|
||||
$tmp=explode(' ', $fields[3], 2);
|
||||
$salesrep->firstname = trim($tmp[0]);
|
||||
$salesrep->lastname = trim($tmp[1]);
|
||||
if ($salesrep->lastname) {
|
||||
$salesrep->login = strtolower(substr($salesrep->firstname, 0, 1)) . strtolower(substr($salesrep->lastname, 0));
|
||||
} else {
|
||||
$salesrep->login=strtolower($salesrep->firstname);
|
||||
}
|
||||
if ($salesrep->lastname) $salesrep->login = strtolower(substr($salesrep->firstname, 0, 1)) . strtolower(substr($salesrep->lastname, 0));
|
||||
else $salesrep->login=strtolower($salesrep->firstname);
|
||||
$salesrep->login=preg_replace('/ /', '', $salesrep->login);
|
||||
$salesrep->fetch(0, $salesrep->login);
|
||||
|
||||
$result = $object->add_commercial($user, $salesrep->id);
|
||||
if ($result < 0) {
|
||||
if ($result < 0)
|
||||
{
|
||||
print " - Error in create link with sale representative result code = ".$result." - ".$object->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print " - create link sale representative OK";
|
||||
}
|
||||
}
|
||||
|
||||
dol_syslog("Add invoice contacts");
|
||||
// Insert an invoice contact if there is an invoice email != standard email
|
||||
if (! $errorrecord && $fields[27] && $fields[26] != $fields[27]) {
|
||||
if (! $errorrecord && $fields[27] && $fields[26] != $fields[27])
|
||||
{
|
||||
$ret1=$ret2=0;
|
||||
|
||||
$contact = new Contact($db);
|
||||
@@ -231,20 +235,25 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
$contact->socid=$object->id;
|
||||
|
||||
$ret1=$contact->create($user);
|
||||
if ($ret1 > 0) {
|
||||
if ($ret1 > 0)
|
||||
{
|
||||
//$ret2=$contact->add_contact($object->id, 'BILLING');
|
||||
}
|
||||
if ($ret1 < 0 || $ret2 < 0) {
|
||||
if ($ret1 < 0 || $ret2 < 0)
|
||||
{
|
||||
print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print " - create contact OK";
|
||||
}
|
||||
}
|
||||
|
||||
dol_syslog("Add delivery contacts");
|
||||
// Insert a delivery contact
|
||||
if (! $errorrecord && $fields[47]) {
|
||||
if (! $errorrecord && $fields[47])
|
||||
{
|
||||
$ret1=$ret2=0;
|
||||
|
||||
$contact2 = new Contact($db);
|
||||
@@ -260,13 +269,17 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
$contact2->array_options['options_anazoneliv']=price2num($fields[53]);
|
||||
|
||||
$ret1=$contact2->create($user);
|
||||
if ($ret1 > 0) {
|
||||
if ($ret1 > 0)
|
||||
{
|
||||
//$ret2=$contact2->add_contact($object->id, 'SHIPPING');
|
||||
}
|
||||
if ($ret1 < 0 || $ret2 < 0) {
|
||||
if ($ret1 < 0 || $ret2 < 0)
|
||||
{
|
||||
print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print " - create contact OK";
|
||||
}
|
||||
}
|
||||
@@ -274,7 +287,8 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
|
||||
print "\n";
|
||||
|
||||
if ($errorrecord) {
|
||||
if ($errorrecord)
|
||||
{
|
||||
fwrite($fhandleerr, 'Error on record nb '.$i." - ".$object->errorsToString()."\n");
|
||||
$error++; // $errorrecord will be reset
|
||||
}
|
||||
@@ -287,10 +301,13 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
// commit or rollback
|
||||
print "Nb of lines qualified: ".$nboflines."\n";
|
||||
print "Nb of errors: ".$error."\n";
|
||||
if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) {
|
||||
if ($mode != 'confirmforced' && ($error || $mode != 'confirm'))
|
||||
{
|
||||
print "Rollback any changes.\n";
|
||||
$db->rollback();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Commit all changes.\n";
|
||||
$db->commit();
|
||||
}
|
||||
|
||||
@@ -79,26 +79,30 @@ if (! file_exists($filepath)) {
|
||||
}
|
||||
|
||||
$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";
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
// Ask confirmation
|
||||
if (! $confirmed) {
|
||||
if (! $confirmed)
|
||||
{
|
||||
print "Hit Enter to continue or CTRL+C to stop...\n";
|
||||
$input = trim(fgets(STDIN));
|
||||
}
|
||||
|
||||
// Open input and output files
|
||||
$fhandle = fopen($filepath, 'r');
|
||||
if (! $fhandle) {
|
||||
if (! $fhandle)
|
||||
{
|
||||
print 'Error: Failed to open file '.$filepath."\n";
|
||||
exit(1);
|
||||
}
|
||||
$fhandleerr = fopen($filepatherr, 'w');
|
||||
if (! $fhandleerr) {
|
||||
if (! $fhandleerr)
|
||||
{
|
||||
print 'Error: Failed to open file '.$filepatherr."\n";
|
||||
exit(1);
|
||||
}
|
||||
@@ -110,16 +114,13 @@ $db->begin();
|
||||
|
||||
$i=0;
|
||||
$nboflines=0;
|
||||
while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) {
|
||||
while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
{
|
||||
$i++;
|
||||
$errorrecord=0;
|
||||
|
||||
if ($startlinenb && $i < $startlinenb) {
|
||||
continue;
|
||||
}
|
||||
if ($endlinenb && $i > $endlinenb) {
|
||||
continue;
|
||||
}
|
||||
if ($startlinenb && $i < $startlinenb) continue;
|
||||
if ($endlinenb && $i > $endlinenb) continue;
|
||||
|
||||
$nboflines++;
|
||||
|
||||
@@ -129,27 +130,28 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
$tmp=explode(' ', $fields[3], 2);
|
||||
$object->firstname = trim($tmp[0]);
|
||||
$object->lastname = trim($tmp[1]);
|
||||
if ($object->lastname) {
|
||||
$object->login = strtolower(substr($object->firstname, 0, 1)) . strtolower(substr($object->lastname, 0));
|
||||
} else {
|
||||
$object->login=strtolower($object->firstname);
|
||||
}
|
||||
if ($object->lastname) $object->login = strtolower(substr($object->firstname, 0, 1)) . strtolower(substr($object->lastname, 0));
|
||||
else $object->login=strtolower($object->firstname);
|
||||
$object->login=preg_replace('/ /', '', $object->login);
|
||||
$object->password = 'init';
|
||||
|
||||
print "Process line nb ".$i.", login ".$object->login;
|
||||
|
||||
$ret=$object->create($user);
|
||||
if ($ret < 0) {
|
||||
if ($ret < 0)
|
||||
{
|
||||
print " - Error in create result code = ".$ret." - ".$object->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print " - Creation OK with login ".$object->login." - id = ".$ret;
|
||||
}
|
||||
|
||||
print "\n";
|
||||
|
||||
if ($errorrecord) {
|
||||
if ($errorrecord)
|
||||
{
|
||||
fwrite($fhandleerr, 'Error on record nb '.$i." - ".$object->errorsToString()."\n");
|
||||
$error++; // $errorrecord will be reset
|
||||
}
|
||||
@@ -162,10 +164,13 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
// commit or rollback
|
||||
print "Nb of lines qualified: ".$nboflines."\n";
|
||||
print "Nb of errors: ".$error."\n";
|
||||
if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) {
|
||||
if ($mode != 'confirmforced' && ($error || $mode != 'confirm'))
|
||||
{
|
||||
print "Rollback any changes.\n";
|
||||
$db->rollback();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Commit all changes.\n";
|
||||
$db->commit();
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path=__DIR__.'/';
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test si mode batch
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
@@ -120,8 +120,8 @@ $sqls=array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'",
|
||||
),
|
||||
'delivery'=>array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."deliverydet WHERE fk_delivery IN (select rowid FROM ".MAIN_DB_PREFIX."delivery where date_creation < '__DATE__')",
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."delivery where date_creation < '__DATE__'",
|
||||
"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__'))",
|
||||
@@ -188,15 +188,18 @@ if (empty($mode) || ! in_array($mode, array('test','confirm'))) {
|
||||
print "option can be ".implode(',', array_keys($sqls))."\n";
|
||||
exit(-1);
|
||||
}
|
||||
if (empty($option)) {
|
||||
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') {
|
||||
if ($option != 'all')
|
||||
{
|
||||
$listofoptions=explode(',', $option);
|
||||
foreach ($listofoptions as $cursoroption) {
|
||||
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";
|
||||
@@ -213,12 +216,11 @@ if (empty($date) || (! preg_match('/\d\d\d\d\-\d\d\-\d\d$/', $date) && $date !=
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if ($date == 'all') {
|
||||
$date = '2199-01-01';
|
||||
}
|
||||
if ($date == 'all') $date = '2199-01-01';
|
||||
|
||||
// Replace database handler
|
||||
if (! empty($argv[4])) {
|
||||
if (! empty($argv[4]))
|
||||
{
|
||||
$db->close();
|
||||
unset($db);
|
||||
$db=getDoliDBInstance($argv[4], $argv[5], $argv[6], $argv[7], $argv[8], $argv[9]);
|
||||
@@ -227,7 +229,8 @@ if (! empty($argv[4])) {
|
||||
|
||||
//var_dump($user->db->database_name);
|
||||
$ret=$user->fetch('', 'admin');
|
||||
if (! $ret > 0) {
|
||||
if (! $ret > 0)
|
||||
{
|
||||
print 'An admin user with login "admin" must exists to use this script.'."\n";
|
||||
exit;
|
||||
}
|
||||
@@ -242,7 +245,8 @@ print "Database port = ".$db->database_port."\n";
|
||||
print "User = ".$db->database_user."\n";
|
||||
print "\n";
|
||||
|
||||
if (! $confirmed) {
|
||||
if (! $confirmed)
|
||||
{
|
||||
print "Hit Enter to continue or CTRL+C to stop...\n";
|
||||
$input = trim(fgets(STDIN));
|
||||
}
|
||||
@@ -260,8 +264,10 @@ function processfamily($family, $date)
|
||||
global $db, $sqls;
|
||||
|
||||
$error=0;
|
||||
foreach ($sqls[$family] as $sql) {
|
||||
if (preg_match('/^@/', $sql)) {
|
||||
foreach($sqls[$family] as $sql)
|
||||
{
|
||||
if (preg_match('/^@/', $sql))
|
||||
{
|
||||
$newfamily=preg_replace('/@/', '', $sql);
|
||||
processfamily($newfamily, $date);
|
||||
continue;
|
||||
@@ -272,54 +278,56 @@ function processfamily($family, $date)
|
||||
print "Run sql: ".$sql."\n";
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if (! $resql) {
|
||||
if ($db->errno() != 'DB_ERROR_NOSUCHTABLE') {
|
||||
if (! $resql)
|
||||
{
|
||||
if ($db->errno() != 'DB_ERROR_NOSUCHTABLE')
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
if ($error)
|
||||
{
|
||||
print $db->lasterror();
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
return -1;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
if ($error) return -1;
|
||||
else return 1;
|
||||
}
|
||||
|
||||
|
||||
$db->begin();
|
||||
|
||||
$listofoptions=explode(',', $option);
|
||||
foreach ($listofoptions as $cursoroption) {
|
||||
foreach($listofoptions as $cursoroption)
|
||||
{
|
||||
$oldfamily='';
|
||||
foreach ($sqls as $family => $familysql) {
|
||||
if ($cursoroption && $cursoroption != 'all' && $cursoroption != $family) {
|
||||
continue;
|
||||
}
|
||||
foreach($sqls as $family => $familysql)
|
||||
{
|
||||
if ($cursoroption && $cursoroption != 'all' && $cursoroption != $family) continue;
|
||||
|
||||
if ($family != $oldfamily) {
|
||||
print "Process action for family ".$family."\n";
|
||||
}
|
||||
if ($family != $oldfamily) print "Process action for family ".$family."\n";
|
||||
$oldfamily = $family;
|
||||
|
||||
$result=processfamily($family, $date);
|
||||
if ($result < 0) {
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($error || $mode != 'confirm') {
|
||||
if ($error || $mode != 'confirm')
|
||||
{
|
||||
print "\nRollback any changes.\n";
|
||||
$db->rollback();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Commit all changes.\n";
|
||||
$db->commit();
|
||||
}
|
||||
|
||||
1
dev/initdemo/.gitignore
vendored
1
dev/initdemo/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/initdemopostsql.sql
|
||||
@@ -12,11 +12,6 @@ The script initdemo.sh will erase current database with data into mysqldump_doli
|
||||
Do a chmod 700 initdemo.sh
|
||||
then run ./initdemo.sh to launch Graphic User Interface.
|
||||
|
||||
After loading the demo files, admin login may be:
|
||||
- admin / admin
|
||||
or
|
||||
- admin / adminadmin
|
||||
|
||||
|
||||
*** Save demo
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 172 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user