Merge remote-tracking branch 'upstream/develop' into 16p10-reconcilev2
This commit is contained in:
commit
7b8ed8dfc5
4
.github/workflows/stale-issues-safe.yml
vendored
4
.github/workflows/stale-issues-safe.yml
vendored
@ -7,8 +7,12 @@ on:
|
|||||||
issue_comment:
|
issue_comment:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
|
permissions: {} # none
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: Dolibarr/stale@staleunstale
|
- uses: Dolibarr/stale@staleunstale
|
||||||
|
|||||||
@ -6,7 +6,8 @@ build:
|
|||||||
analysis:
|
analysis:
|
||||||
tests:
|
tests:
|
||||||
override:
|
override:
|
||||||
- php-scrutinizer-run
|
- command: php-scrutinizer-run
|
||||||
|
idle_timeout: 8000
|
||||||
|
|
||||||
imports:
|
imports:
|
||||||
- javascript
|
- javascript
|
||||||
@ -39,9 +40,11 @@ tools:
|
|||||||
- build/*
|
- build/*
|
||||||
- dev/*
|
- dev/*
|
||||||
- doc/*
|
- doc/*
|
||||||
- test/*
|
- documents/*
|
||||||
- htdocs/includes/*
|
- htdocs/includes/*
|
||||||
- htdocs/core/class/lessc.class.php
|
- htdocs/core/class/lessc.class.php
|
||||||
|
- node_modules/*
|
||||||
|
- test/*
|
||||||
paths:
|
paths:
|
||||||
- htdocs/
|
- htdocs/
|
||||||
- scripts/
|
- scripts/
|
||||||
@ -181,8 +184,10 @@ tools:
|
|||||||
- 'build/*'
|
- 'build/*'
|
||||||
- 'dev/*'
|
- 'dev/*'
|
||||||
- 'doc/*'
|
- 'doc/*'
|
||||||
- 'test/*'
|
- 'documents/*'
|
||||||
- 'htdocs/includes/*'
|
- 'htdocs/includes/*'
|
||||||
|
- 'node_modules/*'
|
||||||
|
- 'test/*'
|
||||||
paths: { }
|
paths: { }
|
||||||
|
|
||||||
# Similar code detection
|
# Similar code detection
|
||||||
@ -194,8 +199,10 @@ tools:
|
|||||||
- 'build/*'
|
- 'build/*'
|
||||||
- 'dev/*'
|
- 'dev/*'
|
||||||
- 'doc/*'
|
- 'doc/*'
|
||||||
- 'test/*'
|
- 'documents/*'
|
||||||
- 'htdocs/includes/*'
|
- 'htdocs/includes/*'
|
||||||
|
- 'node_modules/*'
|
||||||
|
- 'test/*'
|
||||||
paths: { }
|
paths: { }
|
||||||
|
|
||||||
# Coding-Style / Bug Detection
|
# Coding-Style / Bug Detection
|
||||||
@ -209,8 +216,10 @@ tools:
|
|||||||
- 'build/*'
|
- 'build/*'
|
||||||
- 'dev/*'
|
- 'dev/*'
|
||||||
- 'doc/*'
|
- 'doc/*'
|
||||||
- 'test/*'
|
- 'documents/*'
|
||||||
- 'htdocs/includes/*'
|
- 'htdocs/includes/*'
|
||||||
|
- 'node_modules/*'
|
||||||
|
- 'test/*'
|
||||||
paths: { }
|
paths: { }
|
||||||
config: { }
|
config: { }
|
||||||
path_configs: { }
|
path_configs: { }
|
||||||
|
|||||||
101
.travis.yml
101
.travis.yml
@ -2,10 +2,9 @@
|
|||||||
# from Dolibarr GitHub repository.
|
# from Dolibarr GitHub repository.
|
||||||
# For syntax, see https://docs.travis-ci.com/user/languages/php/
|
# For syntax, see https://docs.travis-ci.com/user/languages/php/
|
||||||
|
|
||||||
# We use dist: xenial to have php 5.6+ available
|
# We use dist: bionic = 18.04
|
||||||
os: linux
|
os: linux
|
||||||
dist: xenial
|
dist: bionic
|
||||||
#dist: bionic
|
|
||||||
|
|
||||||
language: php
|
language: php
|
||||||
|
|
||||||
@ -18,21 +17,42 @@ services:
|
|||||||
- mysql
|
- mysql
|
||||||
- postgresql
|
- postgresql
|
||||||
|
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- |
|
||||||
|
echo "Add ondrej PPA"
|
||||||
|
sudo add-apt-repository -y ppa:ondrej/php
|
||||||
|
sudo apt-get update
|
||||||
|
echo "Disabling Xdebug for composer"
|
||||||
|
export PHP_VERSION_NAME=$(phpenv version-name)
|
||||||
|
echo $PHP_VERSION_NAME
|
||||||
|
ls ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/
|
||||||
|
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini
|
||||||
|
phpenv config-rm xdebug.ini
|
||||||
|
phpenv rehash
|
||||||
|
echo
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
# Force postgresql to 9.4 (the oldest availablable on xenial)
|
# Force postgresql version
|
||||||
postgresql: '9.4'
|
postgresql: '10'
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
# To use the last version of pgloader, we add repo of postgresql with a name available in http://apt.postgresql.org/pub/repos/apt/
|
- sourceline: 'ppa:ondrej/php'
|
||||||
- pgdg-xenial
|
|
||||||
packages:
|
packages:
|
||||||
# We need a webserver to test the webservices
|
# We need a webserver to test the webservices
|
||||||
# Let's install Apache with.
|
# Let's install Apache with.
|
||||||
- apache2
|
- apache2
|
||||||
# mod_php is not supported by Travis. Add fcgi. We install FPM later on.
|
|
||||||
- libapache2-mod-fastcgi
|
|
||||||
# We need pgloader for import mysql database into pgsql
|
# We need pgloader for import mysql database into pgsql
|
||||||
- pgloader
|
- pgloader
|
||||||
|
- php
|
||||||
|
- php7.1-pgsql
|
||||||
|
- php7.1-mysqli
|
||||||
|
- php7.1-xml
|
||||||
|
- php7.1-intl
|
||||||
|
- php8.1-pgsql
|
||||||
|
- php8.1-mysqli
|
||||||
|
- php8.1-xml
|
||||||
|
- php8.1-intl
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
@ -44,20 +64,20 @@ jobs:
|
|||||||
#allow_failures:
|
#allow_failures:
|
||||||
#- php: nightly
|
#- php: nightly
|
||||||
include:
|
include:
|
||||||
- stage: PHP 5.6-7.4
|
- stage: PHP 7.0-8.1
|
||||||
if: type = push
|
if: type = push
|
||||||
php: '5.6'
|
php: '7.1'
|
||||||
env: DB=postgresql
|
env: DB=postgresql
|
||||||
- stage: PHP 5.6-7.4
|
- stage: PHP 7.0-8.1
|
||||||
if: type = pull_request OR type = push
|
if: type = pull_request OR type = push
|
||||||
php: '7.4.22'
|
php: '8.1'
|
||||||
env: DB=mysql
|
env: DB=mysql
|
||||||
- stage: PHP Dev
|
- stage: PHP Dev
|
||||||
if: type = push AND branch = develop
|
if: type = push AND branch = develop
|
||||||
php: nightly
|
php: nightly
|
||||||
env: DB=mysql
|
env: DB=mysql
|
||||||
- stage: PHP Dev
|
- stage: PHP Dev
|
||||||
if: type = push AND branch = 15.0
|
if: type = push AND branch = 17.0
|
||||||
php: nightly
|
php: nightly
|
||||||
env: DB=mysql
|
env: DB=mysql
|
||||||
|
|
||||||
@ -72,13 +92,6 @@ notifications:
|
|||||||
on_failure: always
|
on_failure: always
|
||||||
use_notice: true
|
use_notice: true
|
||||||
|
|
||||||
before_install:
|
|
||||||
- |
|
|
||||||
echo "Disabling Xdebug for composer"
|
|
||||||
export PHP_VERSION_NAME=$(phpenv version-name)
|
|
||||||
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini
|
|
||||||
phpenv config-rm xdebug.ini
|
|
||||||
echo
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- |
|
- |
|
||||||
@ -94,13 +107,6 @@ install:
|
|||||||
|
|
||||||
- |
|
- |
|
||||||
echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION"
|
echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION"
|
||||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ]; then
|
|
||||||
composer -n require phpunit/phpunit ^5 \
|
|
||||||
php-parallel-lint/php-parallel-lint ^1 \
|
|
||||||
php-parallel-lint/php-console-highlighter ^0 \
|
|
||||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
|
||||||
squizlabs/php_codesniffer ^3
|
|
||||||
fi
|
|
||||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
|
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
|
||||||
composer -n require phpunit/phpunit ^6 \
|
composer -n require phpunit/phpunit ^6 \
|
||||||
php-parallel-lint/php-parallel-lint ^1 \
|
php-parallel-lint/php-parallel-lint ^1 \
|
||||||
@ -108,7 +114,7 @@ install:
|
|||||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||||
squizlabs/php_codesniffer ^3
|
squizlabs/php_codesniffer ^3
|
||||||
fi
|
fi
|
||||||
if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ]; then
|
if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then
|
||||||
composer -n require phpunit/phpunit ^7 \
|
composer -n require phpunit/phpunit ^7 \
|
||||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||||
php-parallel-lint/php-console-highlighter ^0 \
|
php-parallel-lint/php-console-highlighter ^0 \
|
||||||
@ -116,8 +122,8 @@ install:
|
|||||||
squizlabs/php_codesniffer ^3
|
squizlabs/php_codesniffer ^3
|
||||||
fi
|
fi
|
||||||
# phpunit 9 is required for php 8
|
# phpunit 9 is required for php 8
|
||||||
if [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
if [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^7 \
|
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \
|
||||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||||
php-parallel-lint/php-console-highlighter ^0 \
|
php-parallel-lint/php-console-highlighter ^0 \
|
||||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||||
@ -246,17 +252,22 @@ before_script:
|
|||||||
|
|
||||||
|
|
||||||
- echo "Setting up Apache + FPM"
|
- echo "Setting up Apache + FPM"
|
||||||
|
# setup link for php legacy
|
||||||
|
- sudo ln -s ~/.phpenv/versions/$(phpenv version-name)/bin/php /bin/php
|
||||||
|
# install apache web server
|
||||||
|
- sudo apt-get install apache2 php-fpm php-mysql php-pgsql php-gd php-ldap php-xml php-mbstring libapache2-mod-php
|
||||||
# enable php-fpm
|
# enable php-fpm
|
||||||
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||||
- |
|
- |
|
||||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||||
# Copy the included pool
|
# Copy the included pool
|
||||||
sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
|
sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
|
||||||
fi
|
fi
|
||||||
- sudo a2enmod rewrite actions fastcgi alias
|
- sudo a2enmod proxy_fcgi rewrite setenvif cgi alias
|
||||||
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||||
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
|
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
|
||||||
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
|
#- sudo chown -R travis:travis /var/lib/apache2/fastcgi
|
||||||
|
# start php-fpm
|
||||||
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
|
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
|
||||||
# configure apache virtual hosts
|
# configure apache virtual hosts
|
||||||
- sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf
|
- sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf
|
||||||
@ -284,12 +295,12 @@ script:
|
|||||||
set -e
|
set -e
|
||||||
#parallel-lint --exclude htdocs/includes --blame .
|
#parallel-lint --exclude htdocs/includes --blame .
|
||||||
# Exclusions are defined in the ruleset.xml file
|
# Exclusions are defined in the ruleset.xml file
|
||||||
if [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
|
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
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/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/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/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --blame .
|
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||||
fi
|
fi
|
||||||
set +e
|
set +e
|
||||||
echo
|
echo
|
||||||
@ -299,7 +310,7 @@ script:
|
|||||||
# Ensure we catch errors
|
# Ensure we catch errors
|
||||||
set -e
|
set -e
|
||||||
# Exclusions are defined in the ruleset.xml file
|
# Exclusions are defined in the ruleset.xml file
|
||||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
|
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
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
|
fi
|
||||||
set +e
|
set +e
|
||||||
@ -310,7 +321,7 @@ script:
|
|||||||
# Ensure we catch errors
|
# Ensure we catch errors
|
||||||
set -e
|
set -e
|
||||||
# Exclusions are defined in the ruleset.xml file
|
# Exclusions are defined in the ruleset.xml file
|
||||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
|
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||||
fi
|
fi
|
||||||
set +e
|
set +e
|
||||||
@ -436,6 +447,9 @@ script:
|
|||||||
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade15001600.log
|
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade15001600.log
|
||||||
php upgrade2.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-2.log
|
php upgrade2.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-2.log
|
||||||
php step5.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-3.log
|
php step5.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-3.log
|
||||||
|
php upgrade.php 16.0.0 17.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade16001700.log
|
||||||
|
php upgrade2.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-2.log
|
||||||
|
php step5.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-3.log
|
||||||
ls -alrt $TRAVIS_BUILD_DIR/
|
ls -alrt $TRAVIS_BUILD_DIR/
|
||||||
|
|
||||||
- |
|
- |
|
||||||
@ -468,6 +482,9 @@ after_script:
|
|||||||
ls $TRAVIS_BUILD_DIR/documents
|
ls $TRAVIS_BUILD_DIR/documents
|
||||||
#cat $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
#cat $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||||
sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||||
|
echo "After script - Output last lines of apache error.log"
|
||||||
|
sudo ls /var/log/apache2
|
||||||
|
sudo tail -n 50 /var/log/apache2/travis_error_log
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- |
|
- |
|
||||||
@ -476,16 +493,16 @@ after_success:
|
|||||||
after_failure:
|
after_failure:
|
||||||
- |
|
- |
|
||||||
echo Failure detected, so we show samples of log to help diagnose
|
echo Failure detected, so we show samples of log to help diagnose
|
||||||
# This part of code is executed only if previous command that fails are enclosed with set +e
|
# This part of code is executed only if the command that fails are enclosed with set +e
|
||||||
# Upgrade log files
|
# Show upgrade log files
|
||||||
for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`
|
for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`
|
||||||
do
|
do
|
||||||
echo "Debugging informations for file $ficlog"
|
echo "Debugging informations for file $ficlog"
|
||||||
#cat $ficlog
|
#cat $ficlog
|
||||||
done
|
done
|
||||||
# Apache log file
|
# Show Apache log file
|
||||||
echo "Debugging informations for file apache error.log"
|
echo "Debugging informations for file apache error.log"
|
||||||
sudo cat /var/log/apache2/travis_error_log
|
sudo tail -n 50 /var/log/apache2/travis_error_log
|
||||||
if [ "$DEBUG" = true ]; then
|
if [ "$DEBUG" = true ]; then
|
||||||
# Dolibarr log file
|
# Dolibarr log file
|
||||||
echo "Debugging informations for file dolibarr.log (latest 50 lines)"
|
echo "Debugging informations for file dolibarr.log (latest 50 lines)"
|
||||||
|
|||||||
@ -98,6 +98,12 @@ source_file = htdocs/langs/en_US/cron.lang
|
|||||||
source_lang = en_US
|
source_lang = en_US
|
||||||
type = MOZILLAPROPERTIES
|
type = MOZILLAPROPERTIES
|
||||||
|
|
||||||
|
[dolibarr.datapolicy]
|
||||||
|
file_filter = htdocs/langs/<lang>/datapolicy.lang
|
||||||
|
source_file = htdocs/langs/en_US/datapolicy.lang
|
||||||
|
source_lang = en_US
|
||||||
|
type = MOZILLAPROPERTIES
|
||||||
|
|
||||||
[dolibarr.deliveries]
|
[dolibarr.deliveries]
|
||||||
file_filter = htdocs/langs/<lang>/deliveries.lang
|
file_filter = htdocs/langs/<lang>/deliveries.lang
|
||||||
source_file = htdocs/langs/en_US/deliveries.lang
|
source_file = htdocs/langs/en_US/deliveries.lang
|
||||||
|
|||||||
@ -33,8 +33,9 @@ PEAR Mail_MIME 1.8.9 BSD Yes
|
|||||||
ParseDown 1.6 MIT License Yes Markdown parser
|
ParseDown 1.6 MIT License Yes Markdown parser
|
||||||
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
|
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
|
||||||
PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers
|
PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers
|
||||||
|
PHP-Imap 2.7.2 MIT License Yes Library to use IMAP with OAuth
|
||||||
PHPSpreadSheet 1.8.2 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
PHPSpreadSheet 1.8.2 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||||
php-iban 4.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
php-iban 4.1.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||||
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
|
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
|
||||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||||
PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar)
|
PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar)
|
||||||
@ -52,7 +53,7 @@ Ace 1.4.14 BSD Yes
|
|||||||
ChartJS 3.7.1 MIT License Yes JS library for graph
|
ChartJS 3.7.1 MIT License Yes JS library for graph
|
||||||
CKEditor 4.18 LGPL-2.1+ Yes Editor WYSIWYG
|
CKEditor 4.18 LGPL-2.1+ Yes Editor WYSIWYG
|
||||||
jQuery 3.6.0 MIT License Yes JS library
|
jQuery 3.6.0 MIT License Yes JS library
|
||||||
jQuery UI 1.13.1 GPL and MIT License Yes JS library plugin UI
|
jQuery UI 1.13.2 GPL and MIT License Yes JS library plugin UI
|
||||||
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css
|
jQuery 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 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 Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
||||||
|
|||||||
198
ChangeLog
198
ChangeLog
@ -2,6 +2,30 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
***** ChangeLog for 17.0.0 compared to 16.0.0 *****
|
||||||
|
|
||||||
|
For users:
|
||||||
|
---------------
|
||||||
|
|
||||||
|
NEW Minimal PHP version is now PHP 7.0 instead of PHP 5.6
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
|
For developers or integrators:
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
NEW Minimal PHP version is now PHP 7.0 instead of PHP 5.6
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
|
WARNING:
|
||||||
|
|
||||||
|
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||||
|
* The signature of method getNomUrl() of class ProductFournisseur has been modified to match the signature of method Product
|
||||||
|
* Trigger ORDER_SUPPLIER_DISPATCH is removed, use ORDER_SUPPLIER_RECEIVE and/or LINEORDER_SUPPLIER_DISPATCH instead.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 16.0.0 compared to 15.0.0 *****
|
***** ChangeLog for 16.0.0 compared to 15.0.0 *****
|
||||||
@ -9,123 +33,120 @@ English Dolibarr ChangeLog
|
|||||||
For users:
|
For users:
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
NEW: PHP 8.1 compatibility:
|
NEW: PHP 8.0 and 8.1 compatibility:
|
||||||
Warning!! Application works correctly with PHP8 and 8.1 but you will experience a lot of PHP warnings into the PHP server
|
Warning!! Application works correctly with PHP 8.0 and 8.1 but you will experience a lot of PHP warnings into the PHP server
|
||||||
log files (depending on your PHP setup). Removal of all PHP warnings on server side is planned for v17.
|
log files (depending on your PHP setup). Removal of all PHP warnings on server side is planned for v17.
|
||||||
NEW: Support for recurring purchase invoices.
|
NEW: Support for recurring purchase invoices.
|
||||||
NEW: #20292 Include German public holidays
|
NEW: #20292 Include German public holidays
|
||||||
NEW: Can show ZATCA QRCode on PDFs
|
NEW: Can show ZATCA QR-Code on PDFs
|
||||||
NEW: Can show Swiss QR Code on PDFs
|
NEW: Can show Swiss QR-Code on PDFs
|
||||||
NEW: #17123 added ExtraFields for Stock Mouvement
|
NEW: #17123 added ExtraFields for Stock Mouvement
|
||||||
NEW: #20609 : new massaction to assign a sale representatives on a selection of thirdparties
|
NEW: #20609 new massaction to assign a sale representatives on a selection of thirdparties
|
||||||
NEW: #20653 edit discount pourcentage for all lines in one shot
|
NEW: #20653 edit discount pourcentage for all lines in one shot
|
||||||
NEW: Accept 'auto' for ref of object on import of purchase order/proposal
|
NEW: Accept 'auto' for ref of object on import of purchase order/proposal
|
||||||
NEW: Accountancy - Add more filters and info on page to bind accounting accounts
|
NEW: Accountancy - Add more filters and info on page to bind accounting accounts
|
||||||
NEW: Accountancy - Add subledger account when we generate a transaction with a deposit invoice
|
NEW: Accountancy - Add subledger account when generate a transaction with a deposit invoice
|
||||||
NEW: Accountancy - Add a massaction to preselect an account (customer and supplier list)
|
NEW: Accountancy - Add a massaction to preselect an account (customer and supplier list)
|
||||||
|
NEW: Accountancy - Add hidden feature for accounting reconciliation
|
||||||
NEW: ACE Editor is restored at same cursor position after a save.
|
NEW: ACE Editor is restored at same cursor position after a save.
|
||||||
NEW: Add "addMoreActionsButtons" hook to subscription form
|
NEW: Add "addMoreActionsButtons" hook to subscription form
|
||||||
NEW: Add an option in GUI to show a Quick add button into top menu bar
|
NEW: Add an option in GUI to show a Quick add button into top menu bar
|
||||||
NEW: Module Recruitment - Add a public page with all list of open job positions.
|
|
||||||
NEW: Module Recruitment - Add a tab with list of application on the jobposition file.
|
|
||||||
NEW: Add a workflow to auto link contract on a ticket
|
NEW: Add a workflow to auto link contract on a ticket
|
||||||
NEW: Add column date of Signature on proposal list
|
|
||||||
NEW: Add column template invoice in invoice list
|
NEW: Add column template invoice in invoice list
|
||||||
NEW: Add column "Total HT" to products array on document creation card
|
NEW: Add column "Total HT" to products array on document creation card
|
||||||
NEW: ADD configuration for text color of button action
|
NEW: Add configuration for text color of button action
|
||||||
NEW: Add constant to hide categories in TakePos
|
|
||||||
NEW: Add constant to show category description in TakePos
|
|
||||||
NEW: Add constant to show only the products in stock in TakePos
|
|
||||||
NEW: Add entity filter in exports
|
|
||||||
NEW: Show the event block on recurring invoices #20870
|
NEW: Show the event block on recurring invoices #20870
|
||||||
NEW: Add filter "opportunity status" on statistics of projects.
|
|
||||||
NEW: Add firstname, lastname and max number of attendees for module "Event Organization"
|
NEW: Add firstname, lastname and max number of attendees for module "Event Organization"
|
||||||
NEW: add margin info in proposal and order list
|
NEW: Add margin info in proposal and order list
|
||||||
NEW: Add massaction "Edit Extrafield" for Product
|
|
||||||
NEW: Add more fields to detect duplicate during import of thirdparties
|
NEW: Add more fields to detect duplicate during import of thirdparties
|
||||||
NEW: Add option to foce delivery on email for purchase order receipt to yes
|
NEW: Add option to foce delivery on email for purchase order receipt to yes
|
||||||
NEW: Add param boder table for md theme
|
|
||||||
NEW: Add param color button action
|
|
||||||
NEW: Add possibility to create contract from invoice
|
NEW: Add possibility to create contract from invoice
|
||||||
NEW: Add possibility with constant MAIN_LOGIN_BADCHARUNAUTHORIZED to define bad character unauthorized into login name
|
NEW: Add possibility with constant MAIN_LOGIN_BADCHARUNAUTHORIZED to define bad character unauthorized into login name
|
||||||
NEW: Add private and public notes on tax files.
|
NEW: Add private and public notes on tax files
|
||||||
NEW: Add status "Obsolete" to KM articles
|
|
||||||
NEW: Add substitutions "user numbers"
|
NEW: Add substitutions "user numbers"
|
||||||
NEW: Add the possibility to add sub-BOMs to BOM
|
|
||||||
NEW: allow a ticket to be automatically marked as read when created from backend.
|
|
||||||
NEW: allow cut&paste as real numeric value to excel
|
NEW: allow cut&paste as real numeric value to excel
|
||||||
NEW: A public form to send a message and create a lead is available
|
NEW: A public form to send a message and create a lead is available
|
||||||
NEW: automatically set totally received status in reception
|
NEW: automatically set totally received status in reception
|
||||||
NEW: Auto set invoice paid when adding credit not and remain to pay is 0
|
NEW: Auto set invoice paid when adding credit not and remain to pay is 0
|
||||||
NEW: Availibility dictionnary has a new column unit and number
|
NEW: Backup tool has an "lowmemory" option for mysqldump on large database
|
||||||
NEW: barcode rule to insert product in takepos
|
|
||||||
NEW: Can change value of AWP during the inventory
|
|
||||||
NEW: Can enter price with tax for predefined products on purchase objects
|
NEW: Can enter price with tax for predefined products on purchase objects
|
||||||
NEW: Can filter on a thirdparty on product statistics
|
|
||||||
NEW: Can removed doc templates from setup page of thirdparty
|
NEW: Can removed doc templates from setup page of thirdparty
|
||||||
NEW: Can set the parent company during the creation of thirdparty (action=add of societe/card.php)
|
|
||||||
NEW: Can use ! to make a search that exclude a string
|
NEW: Can use ! to make a search that exclude a string
|
||||||
NEW: Change in theme colors does not need to use the refresh button
|
|
||||||
NEW: clean values and amount in FEC import
|
NEW: clean values and amount in FEC import
|
||||||
NEW: const MAIL_MASS_ACTION_ADD_LAST_IF_MAIN_DOC_NOT_FOUND for mailing mass action
|
NEW: const MAIL_MASS_ACTION_ADD_LAST_IF_MAIN_DOC_NOT_FOUND for mailing mass action
|
||||||
NEW: Contact filter project list
|
NEW: Contact filter project list
|
||||||
NEW: Create contract from invoice
|
NEW: Create contract from invoice
|
||||||
NEW: create third-party with contact if not found on public ticket
|
NEW: Database: Can store the session into database (instead of beeing managed by PHP)
|
||||||
|
NEW: Database: Some core tables are created only at module activation
|
||||||
NEW: Default value for MAIN_SECURITY_CSRF_WITH_TOKEN is now 2 (GET are also protected agains CSRF attacks)
|
NEW: Default value for MAIN_SECURITY_CSRF_WITH_TOKEN is now 2 (GET are also protected agains CSRF attacks)
|
||||||
NEW: deposit payment terms: add field into dictionary admin page to define default percentage of deposit.
|
NEW: deposit payment terms: add field into dictionary admin page to define default percentage of deposit.
|
||||||
NEW: Dictionaries - add possibility to manage countries in EEC
|
NEW: Dictionaries - add possibility to manage countries in EEC
|
||||||
NEW: display errors in a message box after generating documents
|
NEW: Dictionaries - Availibility dictionnary has a new column unit and number
|
||||||
NEW: Display physical and virtual stock of the products when creating OF from a BOM
|
NEW: Display errors in a message box after generating documents
|
||||||
NEW: Display product ref in "Object link" product tab for BOM
|
|
||||||
NEW: Enhance the import. Can use 'auto' for the ref (import of orders)
|
NEW: Enhance the import. Can use 'auto' for the ref (import of orders)
|
||||||
NEW: Events on Proposal to Return to Draft
|
NEW: Events on Proposal to Return to Draft
|
||||||
|
NEW: Exports - add entity filter in exports
|
||||||
NEW: Page to list expense report payments
|
NEW: Page to list expense report payments
|
||||||
NEW: JS inventory autocalc input
|
NEW: JS inventory autocalc input
|
||||||
NEW: language support for more emailing target selectors
|
NEW: language support for more emailing target selectors
|
||||||
NEW: leave requests: add field into type dictionary to block request if balance is negative
|
NEW: leave requests: add field into type dictionary to block request if balance is negative
|
||||||
NEW: MAIN_MAIL_AUTOCOPY_TO can accept several email and special keys
|
|
||||||
NEW: MAIN_SEARCH_CAT_OR_BY_DEFAULT const for search by category
|
|
||||||
NEW: Mass action "Close shipments"
|
NEW: Mass action "Close shipments"
|
||||||
NEW: Module website now supports the multicompany module
|
NEW: Module BOM - add tabs for nets BOM
|
||||||
NEW: More mode for THEME_TOPMENU_DISABLE_IMAGE (2, 3, ...)
|
NEW: Module BOM - add the possibility to add sub-BOMs to BOM
|
||||||
|
NEW: Module Recruitment - Add a public page with list of all open job positions.
|
||||||
|
NEW: Module Recruitment - Add a tab with list of application on the jobposition file.
|
||||||
NEW: Add option to move checkbox column as first column on Thirdparty list (only few screens)
|
NEW: Add option to move checkbox column as first column on Thirdparty list (only few screens)
|
||||||
NEW: Add tabs for nets Bom
|
|
||||||
NEW: on redirect of page in website module, GET parameters are kept.
|
|
||||||
NEW: optional display warning icons on ticket list
|
|
||||||
NEW: option to default check "notify tier at creation" in ticket module
|
|
||||||
NEW: option update prices on proposal cloning
|
|
||||||
NEW: payment conditions enabling semi-automatic deposit creation (Issue #18439)
|
NEW: payment conditions enabling semi-automatic deposit creation (Issue #18439)
|
||||||
NEW: possibility to consume multiple batch
|
NEW: possibility to consume multiple batch
|
||||||
NEW: Reverse movement product consumption
|
NEW: Reverse movement product consumption
|
||||||
NEW: Send email to the supplier order contact
|
NEW: Send email to the supplier order contact
|
||||||
NEW: New permission to report time on timesheet.
|
NEW: add permission to report time on timesheet
|
||||||
|
NEW: Knowledge Management - add status "Obsolete" to KM articles
|
||||||
|
NEW: MRP - split consumption line on MO
|
||||||
|
NEW: MRP - display physical and virtual stock of the products when creating OF from a BOM
|
||||||
|
NEW: MRP - display product ref in "Object link" product tab for BOM
|
||||||
|
NEW: Orders - support user_modif in order
|
||||||
|
NEW: Products - add massaction "Edit Extrafield" for Product
|
||||||
|
NEW: Products - List - add thumbnail field in product list
|
||||||
|
NEW: Products - Statistics - can filter on a thirdparty
|
||||||
|
NEW: Projects - add filter "opportunity status" on statistics of projects.
|
||||||
|
NEW: Proposals - option update prices on proposal cloning
|
||||||
|
NEW: Proposals - List - add column date of Signature on proposal list
|
||||||
NEW: SEPA XML - option to place payment Type Info at Credit transfer Transaction level
|
NEW: SEPA XML - option to place payment Type Info at Credit transfer Transaction level
|
||||||
NEW: Show number of votes into the label of tab "Results" of a survey
|
NEW: Stocks - stock filter in reassort lists
|
||||||
NEW: Show product reference in Takepos
|
NEW: Stocks - stock limit in stock export CSV
|
||||||
NEW: Some core tables are created only at module activation
|
NEW: Stocks - Inventory - can change value of AWP during the inventory
|
||||||
NEW: split consumption line on MO
|
|
||||||
NEW: stock filter in reassort lists
|
|
||||||
NEW: stock limit in stock export CSV
|
|
||||||
NEW: Sub-bom are availables
|
|
||||||
NEW: Supplier order - Show ref supplier of reception in linked object block
|
NEW: Supplier order - Show ref supplier of reception in linked object block
|
||||||
NEW: support user_modif in order
|
NEW: Surveys - Show number of votes into the label of tab "Results" of a survey
|
||||||
NEW: TakePos - pagination on search results
|
NEW: TakePOS - barcode rule to insert product in TakePOS
|
||||||
NEW: The backup tools has an "lowmemory" option for mysqldump on large database
|
NEW: TakePOS - pagination on search results
|
||||||
|
NEW: TakePOS - show product reference
|
||||||
|
NEW: TakePOS - add constant to hide categories
|
||||||
|
NEW: TakePOS - add constant to show category description
|
||||||
|
NEW: TakePOS - add constant to show only the products in stock
|
||||||
|
NEW: Themes - add param color button action
|
||||||
|
NEW: Themes - Change in theme colors does not need to use the refresh button
|
||||||
|
NEW: Themes - more modes for THEME_TOPMENU_DISABLE_IMAGE (2, 3, ...)
|
||||||
|
NEW: Themes - MD - add param border table for md theme
|
||||||
|
NEW: Third-Parties - add rules "customer accountancy code" is mandatory to validate invoice
|
||||||
|
NEW: Third-Parties - can set the parent company during the creation of thirdparty (action=add of societe/card.php)
|
||||||
|
NEW: Tickets - allow a Ticket to be automatically marked as read when created from backend
|
||||||
|
NEW: Tickets - create Third-party with contact if not found on public ticket
|
||||||
|
NEW: Tickets - option to default check "notify tier at creation"
|
||||||
|
NEW: Tickets - Trigger: allow to automatically send messages on new tickets
|
||||||
|
NEW: Tickets - optional display warning icons on ticket list
|
||||||
|
NEW: Websites Module - supports now the multicompany module
|
||||||
|
NEW: Websites Module - on redirect of page in website module, GET parameters are kept.
|
||||||
NEW: The 'reposition' class works on ajax constantonoff that make redirects
|
NEW: The 'reposition' class works on ajax constantonoff that make redirects
|
||||||
NEW: Thirdparty - Add rules "customer accountancy code" is mandatory to validate invoice
|
|
||||||
NEW: thumbnail field in product list
|
|
||||||
NEW: total mark rate in list
|
NEW: total mark rate in list
|
||||||
NEW: uncheck "send message" by default on a ticket when private messages has been checked
|
NEW: uncheck "send message" by default on a ticket when private messages has been checked
|
||||||
NEW: VAT Report by month - Show detail by rate and also by code
|
NEW: VAT Report by month - Show detail by rate and also by code
|
||||||
NEW: Ticket triggers: allow to automatically send messages on new tickets
|
|
||||||
NEW: Accountancy - Add hidden feature for accounting reconciliation
|
|
||||||
NEW: Can store the session into database (instead of beeing managed by PHP)
|
|
||||||
NEW: Added MMK currency (Myanmar Kyat)
|
NEW: Added MMK currency (Myanmar Kyat)
|
||||||
NEW: On a form to send an email, we show all emails of contacts of object
|
NEW: On a form to send an email, we show all emails of contacts of object
|
||||||
|
|
||||||
Modules
|
Modules state
|
||||||
NEW: Module Partnership Management
|
NEW: Module Partnership Management - stable
|
||||||
NEW: Module Event Organization Management
|
NEW: Module Event Organization Management - stable
|
||||||
|
|
||||||
|
|
||||||
For developers or integrators:
|
For developers or integrators:
|
||||||
@ -133,48 +154,46 @@ For developers or integrators:
|
|||||||
NEW: dol_uncompress() supports more extensions (.gz, .bz2, .zstd). Only .zip was supported before.
|
NEW: dol_uncompress() supports more extensions (.gz, .bz2, .zstd). Only .zip was supported before.
|
||||||
NEW: Implement a generic method for Kaban views
|
NEW: Implement a generic method for Kaban views
|
||||||
NEW: Upgrade chartjs library to 3.7.1
|
NEW: Upgrade chartjs library to 3.7.1
|
||||||
NEW: update rank line is possible on API for customer invoices, sales orders and supplier invoice
|
|
||||||
NEW: stripe element with more gateways
|
NEW: stripe element with more gateways
|
||||||
NEW: solde() function evolution to be able to get solde until a chosen date
|
NEW: solde() function evolution to be able to get solde until a chosen date
|
||||||
NEW: Suggest a way to run upgrade per entities.
|
NEW: Suggest a way to run upgrade per entities.
|
||||||
NEW: Support html content for multiselect component.
|
NEW: Support html content for multiselect component.
|
||||||
NEW: ModuleBuilder - Add tabs view in module builder
|
NEW: ModuleBuilder - Add tabs view in module builder
|
||||||
NEW: ModuleBuilder - More feature that can be modifed after module generation
|
NEW: ModuleBuilder - More feature that can be modifed after module generation
|
||||||
NEW: Hook getNomUrl available everywhere in tooltip of ref links
|
|
||||||
NEW: Identification of tr is possible with by attribute data-id on some pages
|
NEW: Identification of tr is possible with by attribute data-id on some pages
|
||||||
NEW: Import with select boxes V2
|
NEW: Import with select boxes V2
|
||||||
NEW: Can update rank of invoice, proposal and order lines with API update
|
|
||||||
NEW: Can use current entity filter on 'chkbxlst'
|
NEW: Can use current entity filter on 'chkbxlst'
|
||||||
NEW: Creation of the function select_bom() used to display bom select list
|
NEW: Creation of the function select_bom() used to display bom select list
|
||||||
NEW: add printFieldListWhere hook in product reassort card
|
|
||||||
NEW: Add trigger and event on completely received status change
|
NEW: Add trigger and event on completely received status change
|
||||||
NEW: Add utility function send backup by mail
|
NEW: Add utility function send backup by mail
|
||||||
NEW: add WordPress OAuth to save a token (not SSO)
|
NEW: add WordPress OAuth to save a token (not SSO)
|
||||||
NEW: A module can embed a sql script run at each Dolibarr upgrade
|
NEW: A module can embed a SQL script run at each Dolibarr upgrade
|
||||||
NEW: API Proposals - Add POST lines
|
|
||||||
NEW: API REST filter states by country
|
|
||||||
NEW: Add option INVOICEREC_SET_AUTOFILL_DATE_START/END
|
|
||||||
NEW: Add option MAIN_API_DEBUG to save API logs into a file
|
|
||||||
NEW: Add param to keep the robot=index meta tag on public pages
|
NEW: Add param to keep the robot=index meta tag on public pages
|
||||||
NEW: Add method hintindex() in database handlers.
|
NEW: Add method hintindex() in database handlers.
|
||||||
NEW: add modifications for new function "$db->prefix()"
|
NEW: add modifications for new function "$db->prefix()"
|
||||||
NEW: addMoreActionsButtonsList hook for button in list
|
NEW: addMoreActionsButtonsList hook for button in list
|
||||||
NEW: Add API to get a template invoice
|
|
||||||
NEW: Standardize a lot of code.
|
NEW: Standardize a lot of code.
|
||||||
NEW: #20736 Allow extrafields SQL filters on REST API product lookup
|
|
||||||
NEW: #19294 implement detailed timespent in task of project API
|
|
||||||
NEW: Add a protection into PHPunit to avoid to forget a var_dump
|
NEW: Add a protection into PHPunit to avoid to forget a var_dump
|
||||||
|
|
||||||
|
|
||||||
|
API:
|
||||||
|
NEW: API Proposals - Add POST lines
|
||||||
|
NEW: API REST filter states by country
|
||||||
|
NEW: Add API to get a template invoice
|
||||||
NEW: Add datem and type parameters to API to create movements
|
NEW: Add datem and type parameters to API to create movements
|
||||||
NEW: Add hidden option on contract PDF line to hide qty and price
|
NEW: #19294 implement detailed timespent in task of project API
|
||||||
NEW: Option MAIL_MASS_ACTION_ADD_LAST_IF_MAIN_DOC_NOT_FOUND to send last document in mass mailing action
|
NEW: #20736 Allow extrafields SQL filters on REST API product lookup
|
||||||
|
NEW: Can update rank of invoice, proposal and order lines with API update
|
||||||
|
NEW: update rank line is possible on API for customer invoices, sales orders and supplier invoice
|
||||||
|
NEW: Add option MAIN_API_DEBUG to save API logs into a file
|
||||||
|
|
||||||
|
Hooks:
|
||||||
|
NEW: Hook getNomUrl available everywhere in tooltip of ref links
|
||||||
NEW: Add hooks: selectContactListWhere hook, selectThirdpartyListWhere hook
|
NEW: Add hooks: selectContactListWhere hook, selectThirdpartyListWhere hook
|
||||||
NEW: TakePos - add hooks complete product display
|
|
||||||
NEW: TakePos - add hooks for cart display
|
|
||||||
NEW: TakePos - add hooks to complete ajax return array
|
|
||||||
NEW: Add hook before the public ticket list
|
NEW: Add hook before the public ticket list
|
||||||
NEW: Add hook doaction in takepos invoice
|
NEW: Add hook for Notif
|
||||||
NEW: Add Hook for Notif
|
|
||||||
NEW: Add hook for more buttons
|
NEW: Add hook for more buttons
|
||||||
|
NEW: add hook printFieldListWhere in product ressort card
|
||||||
NEW: Add hook printFieldListWhere in "show_contacts" function
|
NEW: Add hook printFieldListWhere in "show_contacts" function
|
||||||
NEW: Add hook printFieldWhere in load_state_board function
|
NEW: Add hook printFieldWhere in load_state_board function
|
||||||
NEW: Add hooks contact tab badge and hooks parameter for avoid conflicts
|
NEW: Add hooks contact tab badge and hooks parameter for avoid conflicts
|
||||||
@ -186,7 +205,20 @@ NEW: Add hooks on project task time page
|
|||||||
NEW: Add hooks on salaries and sociales card
|
NEW: Add hooks on salaries and sociales card
|
||||||
NEW: Add hooks select product list and select thirdparty list function
|
NEW: Add hooks select product list and select thirdparty list function
|
||||||
NEW: Add hook to getSellPrice function
|
NEW: Add hook to getSellPrice function
|
||||||
|
NEW: TakePos - add hooks complete product display
|
||||||
|
NEW: TakePos - add hooks for cart display
|
||||||
|
NEW: TakePos - add hooks to complete ajax return array
|
||||||
|
NEW: TakePOS - add hook doaction in TakePOS invoice
|
||||||
|
|
||||||
|
Config Options:
|
||||||
|
NEW: Add hidden option on contract PDF line to hide qty and price
|
||||||
|
NEW: Option MAIL_MASS_ACTION_ADD_LAST_IF_MAIN_DOC_NOT_FOUND to send last document in mass mailing action
|
||||||
|
NEW: Option MAIN_API_DEBUG to save API logs into a file
|
||||||
|
NEW: Option MAIN_MAIL_AUTOCOPY_TO can accept several email and special keys
|
||||||
|
NEW: Option MAIN_SEARCH_CAT_OR_BY_DEFAULT const for search by category
|
||||||
|
NEW: Option INVOICEREC_SET_AUTOFILL_DATE_START/END
|
||||||
|
|
||||||
|
WARNING:
|
||||||
|
|
||||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||||
* There is a new specific permission to be allowed to enter timesheets. If you use timesheet, don't forget to give the new permission (disable and
|
* There is a new specific permission to be allowed to enter timesheets. If you use timesheet, don't forget to give the new permission (disable and
|
||||||
@ -213,10 +245,8 @@ FIX: #18704
|
|||||||
FIX: #20444
|
FIX: #20444
|
||||||
FIX: #20448 missing preg_replace for vat rate when adding a free line
|
FIX: #20448 missing preg_replace for vat rate when adding a free line
|
||||||
FIX: #20476 migration postgresql 13.0.x to 14.0.x packaging type
|
FIX: #20476 migration postgresql 13.0.x to 14.0.x packaging type
|
||||||
FIX: #20487 missing letter D in constant THIRDPARTIES_DISABLE_RELATED_…
|
|
||||||
FIX: #20487 missing letter D in constant THIRDPARTIES_DISABLE_RELATED_OBJECT_TAB
|
FIX: #20487 missing letter D in constant THIRDPARTIES_DISABLE_RELATED_OBJECT_TAB
|
||||||
FIX: #20527 Accountancy - Unbalanced entry proposed when an employee are declared on a social contribution
|
FIX: #20527 Accountancy - Unbalanced entry proposed when an employee are declared on a social contribution
|
||||||
FIX: #20527 Accountancy Unbalanced entry proposed when an employee are declared on social contribution
|
|
||||||
FIX: #20621 signature online with proposal with n page.
|
FIX: #20621 signature online with proposal with n page.
|
||||||
FIX: #20696
|
FIX: #20696
|
||||||
FIX: #20828
|
FIX: #20828
|
||||||
@ -252,7 +282,7 @@ FIX: fourn/commande/card.php Added "$object" parameter to $formfile->showdocumen
|
|||||||
FIX: french traductions for payment methods
|
FIX: french traductions for payment methods
|
||||||
FIX: hook for dol_format_address
|
FIX: hook for dol_format_address
|
||||||
FIX: Index page for "Sales" give wrong URL link to Intervention
|
FIX: Index page for "Sales" give wrong URL link to Intervention
|
||||||
FIX: issue Dolibarr#21495 for v15
|
FIX: issue Dolibarr #21495 for v15
|
||||||
FIX: label and get_substitutionarray_each_var_object on ODT generation
|
FIX: label and get_substitutionarray_each_var_object on ODT generation
|
||||||
FIX: load product stock in inventory lines
|
FIX: load product stock in inventory lines
|
||||||
FIX: missing morecss for multiselectarray
|
FIX: missing morecss for multiselectarray
|
||||||
@ -561,6 +591,8 @@ NEW: make it easier to set the `keyword`, `keywords` and `description` attribute
|
|||||||
NEW: Experimental feature to manage user sessions in database
|
NEW: Experimental feature to manage user sessions in database
|
||||||
|
|
||||||
|
|
||||||
|
WARNING:
|
||||||
|
|
||||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||||
* ALL EXTERNAL MODULES THAT WERE NOT CORRECTLY DEVELOPPED WILL NOT WORK ON V15 (All modules that forgot to manage the security token field
|
* ALL EXTERNAL MODULES THAT WERE NOT CORRECTLY DEVELOPPED WILL NOT WORK ON V15 (All modules that forgot to manage the security token field
|
||||||
into forms will be broken. The security token field is expected since Dolibarr v9 but a lot of external modules did not implement it).
|
into forms will be broken. The security token field is expected since Dolibarr v9 but a lot of external modules did not implement it).
|
||||||
|
|||||||
@ -9,3 +9,5 @@ The build of .exe files need to have some windows executable files already insta
|
|||||||
|
|
||||||
If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file).
|
If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file).
|
||||||
|
|
||||||
|
|
||||||
|
!!! See file ../makepack-howto.txt
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/* !!! DO NOT EDIT THIS FILE, EDIT config.inc.php INSTEAD !!! */
|
/* !!! DO NOT EDIT THIS FILE, EDIT config.inc.php INSTEAD !!! */
|
||||||
|
|
||||||
// vim: expandtab sw=4 ts=4 sts=4:
|
// vim: expandtab sw=4 ts=4 sts=4:
|
||||||
|
|||||||
@ -582,6 +582,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if browser = 'iexplore.exe' then
|
||||||
|
begin
|
||||||
|
if FileExists (pfPath+'/Microsoft/Edge/Application/msedge.exe') then
|
||||||
|
begin
|
||||||
|
if MsgBox(CustomMessage('MicrosoftEdgeDetected'),mbConfirmation,MB_YESNO) = IDYES then
|
||||||
|
begin
|
||||||
|
browser := pfPath+'/Microsoft/Edge/Application/msedge.exe';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
if browser = 'iexplore.exe' then
|
if browser = 'iexplore.exe' then
|
||||||
begin
|
begin
|
||||||
if FileExists (pfPath+'/Internet Explorer/iexplore.exe') then
|
if FileExists (pfPath+'/Internet Explorer/iexplore.exe') then
|
||||||
|
|||||||
@ -56,7 +56,7 @@ if (empty($argv[1])) {
|
|||||||
|
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $argc) {
|
while ($i < $argc) {
|
||||||
if (! empty($argv[$i])) {
|
if (!empty($argv[$i])) {
|
||||||
parse_str($argv[$i]); // set all params $release, $includecustom, $includeconstant, $buildzip ...
|
parse_str($argv[$i]); // set all params $release, $includecustom, $includeconstant, $buildzip ...
|
||||||
}
|
}
|
||||||
if (preg_match('/includeconstant=/', $argv[$i])) {
|
if (preg_match('/includeconstant=/', $argv[$i])) {
|
||||||
|
|||||||
@ -8,13 +8,13 @@ of Dolibarr. There is a chapter for BETA version and a chapter for RELEASE versi
|
|||||||
Prerequisites to build tgz, debian and rpm packages:
|
Prerequisites to build tgz, debian and rpm packages:
|
||||||
> apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli
|
> apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli
|
||||||
|
|
||||||
Prerequisites to build autoexe DoliWamp package:
|
Prerequisites to build autoexe DoliWamp package from Linux (solution seems broken since Ubuntu 20.04):
|
||||||
> apt-get install wine q4wine
|
> apt-get install wine q4wine
|
||||||
> Launch "wine cmd" to check a drive Z: pointing to / exists.
|
> Launch "wine cmd" to check a drive Z: pointing to / exists.
|
||||||
> Install InnoSetup
|
> Install InnoSetup
|
||||||
For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/
|
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
|
> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
|
||||||
For example by running wampserver3.2.0_x64.exe (https://www.wampserver.com).
|
For example by running wampserver3.2.6_x64.exe (https://www.wampserver.com).
|
||||||
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
|
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
|
||||||
> Add path to ISCC into PATH windows var:
|
> 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
|
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
|
||||||
@ -25,9 +25,21 @@ Prerequisites to build autoexe DoliWamp package:
|
|||||||
|
|
||||||
***** Prerequisites For Windows *****
|
***** Prerequisites For Windows *****
|
||||||
|
|
||||||
Install Perl
|
Prerequisites to build autoexe DoliWamp package from Windows:
|
||||||
Install WampServer-3.2.*-64.exe
|
|
||||||
isetup-5.5.8.exe
|
> Install Perl for Windwos (https://strawberryperl.com/)
|
||||||
|
> Install isetup-5.5.8.exe (https://www.jrsoftware.org)
|
||||||
|
> Install WampServer-3.2.*-64.exe (Apache 2.4.51, PHP 7.3.33, MariaDB 10.6.5 for example. Version must match the values found into doliwamp.iss)
|
||||||
|
> Install GIT for Windows (https://git-scm.com/ => You must choose option "Add Git bash profile", "Git commit as-is")
|
||||||
|
> Install Dolibarr verions:
|
||||||
|
git clone https://github.com/dolibarr/dolibarr
|
||||||
|
|
||||||
|
> Add the path of PHP (C:\wamp64\bin\php\php7.3.33) and InnoSetup (C:\Program Files (x86)\Inno Setup 5) into the %PATH% of Windows.
|
||||||
|
|
||||||
|
> Create a config file c:\dolibarr\dolibarr\htdocs\conf\conf.php with content
|
||||||
|
<?php
|
||||||
|
$dolibarr_main_document_root="c:\dolibarr\dolibarr\htdocs";
|
||||||
|
$dolibarr_main_url_root='http://localhost';
|
||||||
|
|
||||||
|
|
||||||
***** Actions to do a BETA *****
|
***** Actions to do a BETA *****
|
||||||
|
|||||||
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||||||
action: bundle.inputData.action
|
action: bundle.inputData.action
|
||||||
};
|
};
|
||||||
|
|
||||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||||
|
|
||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
const options = {
|
const options = {
|
||||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ const getFallbackRealAction = (z, bundle) => {
|
|||||||
// // For the test poll, you should get some real data, to aid the setup process.
|
// // For the test poll, you should get some real data, to aid the setup process.
|
||||||
// const module = bundle.inputData.module;
|
// const module = bundle.inputData.module;
|
||||||
// const options = {
|
// const options = {
|
||||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/actions',
|
// url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/actions',
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||||
|
|||||||
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||||||
action: bundle.inputData.action
|
action: bundle.inputData.action
|
||||||
};
|
};
|
||||||
|
|
||||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||||
|
|
||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
const options = {
|
const options = {
|
||||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ const getFallbackRealContact = (z, bundle) => {
|
|||||||
// const getModulesChoices = (z/*, bundle*/) => {
|
// const getModulesChoices = (z/*, bundle*/) => {
|
||||||
// // For the test poll, you should get some real data, to aid the setup process.
|
// // For the test poll, you should get some real data, to aid the setup process.
|
||||||
// const options = {
|
// const options = {
|
||||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices',
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||||
@ -94,7 +94,7 @@ const getFallbackRealContact = (z, bundle) => {
|
|||||||
// // For the test poll, you should get some real data, to aid the setup process.
|
// // For the test poll, you should get some real data, to aid the setup process.
|
||||||
// const module = bundle.inputData.module;
|
// const module = bundle.inputData.module;
|
||||||
// const options = {
|
// const options = {
|
||||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`,
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||||
|
|||||||
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||||||
action: bundle.inputData.action
|
action: bundle.inputData.action
|
||||||
};
|
};
|
||||||
|
|
||||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||||
|
|
||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
const options = {
|
const options = {
|
||||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ const getFallbackRealMember = (z, bundle) => {
|
|||||||
// const getModulesChoices = (z/*, bundle*/) => {
|
// const getModulesChoices = (z/*, bundle*/) => {
|
||||||
// // For the test poll, you should get some real data, to aid the setup process.
|
// // For the test poll, you should get some real data, to aid the setup process.
|
||||||
// const options = {
|
// const options = {
|
||||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices',
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||||
@ -94,7 +94,7 @@ const getFallbackRealMember = (z, bundle) => {
|
|||||||
// // For the test poll, you should get some real data, to aid the setup process.
|
// // For the test poll, you should get some real data, to aid the setup process.
|
||||||
// const module = bundle.inputData.module;
|
// const module = bundle.inputData.module;
|
||||||
// const options = {
|
// const options = {
|
||||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`,
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||||
|
|||||||
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||||||
action: bundle.inputData.action
|
action: bundle.inputData.action
|
||||||
};
|
};
|
||||||
|
|
||||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||||
|
|
||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
const options = {
|
const options = {
|
||||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ const getFallbackRealOrder = (z, bundle) => {
|
|||||||
// // For the test poll, you should get some real data, to aid the setup process.
|
// // For the test poll, you should get some real data, to aid the setup process.
|
||||||
// const module = bundle.inputData.module;
|
// const module = bundle.inputData.module;
|
||||||
// const options = {
|
// const options = {
|
||||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/orders',
|
// url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/orders',
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||||
|
|||||||
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||||||
action: bundle.inputData.action
|
action: bundle.inputData.action
|
||||||
};
|
};
|
||||||
|
|
||||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||||
|
|
||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
const options = {
|
const options = {
|
||||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ const getFallbackRealThirdparty = (z, bundle) => {
|
|||||||
// const getModulesChoices = (z/*, bundle*/) => {
|
// const getModulesChoices = (z/*, bundle*/) => {
|
||||||
// // For the test poll, you should get some real data, to aid the setup process.
|
// // For the test poll, you should get some real data, to aid the setup process.
|
||||||
// const options = {
|
// const options = {
|
||||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices',
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||||
@ -102,7 +102,7 @@ const getFallbackRealThirdparty = (z, bundle) => {
|
|||||||
// // For the test poll, you should get some real data, to aid the setup process.
|
// // For the test poll, you should get some real data, to aid the setup process.
|
||||||
// const module = bundle.inputData.module;
|
// const module = bundle.inputData.module;
|
||||||
// const options = {
|
// const options = {
|
||||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`,
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||||
|
|||||||
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||||||
action: bundle.inputData.action
|
action: bundle.inputData.action
|
||||||
};
|
};
|
||||||
|
|
||||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||||
|
|
||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
const options = {
|
const options = {
|
||||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ const getFallbackRealTicket = (z, bundle) => {
|
|||||||
// const getModulesChoices = (z/*, bundle*/) => {
|
// const getModulesChoices = (z/*, bundle*/) => {
|
||||||
// // For the test poll, you should get some real data, to aid the setup process.
|
// // For the test poll, you should get some real data, to aid the setup process.
|
||||||
// const options = {
|
// const options = {
|
||||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices',
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||||
@ -97,7 +97,7 @@ const getFallbackRealTicket = (z, bundle) => {
|
|||||||
// // For the test poll, you should get some real data, to aid the setup process.
|
// // For the test poll, you should get some real data, to aid the setup process.
|
||||||
// const module = bundle.inputData.module;
|
// const module = bundle.inputData.module;
|
||||||
// const options = {
|
// const options = {
|
||||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`,
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||||
|
|||||||
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||||||
action: bundle.inputData.action
|
action: bundle.inputData.action
|
||||||
};
|
};
|
||||||
|
|
||||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||||
|
|
||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||||||
// You can build requests and our client will helpfully inject all the variables
|
// You can build requests and our client will helpfully inject all the variables
|
||||||
// you need to complete. You can also register middleware to control this.
|
// you need to complete. You can also register middleware to control this.
|
||||||
const options = {
|
const options = {
|
||||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ const getFallbackRealUser = (z, bundle) => {
|
|||||||
// const getModulesChoices = (z/*, bundle*/) => {
|
// const getModulesChoices = (z/*, bundle*/) => {
|
||||||
// // For the test poll, you should get some real data, to aid the setup process.
|
// // For the test poll, you should get some real data, to aid the setup process.
|
||||||
// const options = {
|
// const options = {
|
||||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices',
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||||
@ -93,7 +93,7 @@ const getFallbackRealUser = (z, bundle) => {
|
|||||||
// // For the test poll, you should get some real data, to aid the setup process.
|
// // For the test poll, you should get some real data, to aid the setup process.
|
||||||
// const module = bundle.inputData.module;
|
// const module = bundle.inputData.module;
|
||||||
// const options = {
|
// const options = {
|
||||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`,
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||||
|
|||||||
@ -152,7 +152,7 @@ $user->rights->propal->creer=1;
|
|||||||
$user->rights->propal->propal_advance->validate=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";
|
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -218,7 +218,7 @@ if ($date == 'all') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Replace database handler
|
// Replace database handler
|
||||||
if (! empty($argv[4])) {
|
if (!empty($argv[4])) {
|
||||||
$db->close();
|
$db->close();
|
||||||
unset($db);
|
unset($db);
|
||||||
$db=getDoliDBInstance($argv[4], $argv[5], $argv[6], $argv[7], $argv[8], $argv[9]);
|
$db=getDoliDBInstance($argv[4], $argv[5], $argv[6], $argv[7], $argv[8], $argv[9]);
|
||||||
|
|||||||
BIN
dev/resources/iso-normes/banking/iban_registry_0.pdf
Normal file
BIN
dev/resources/iso-normes/banking/iban_registry_0.pdf
Normal file
Binary file not shown.
@ -4,4 +4,5 @@ terms
|
|||||||
(en) VAT = Value Added Tax
|
(en) VAT = Value Added Tax
|
||||||
(fr) TVA = Taxe sur la Valeur Ajouté
|
(fr) TVA = Taxe sur la Valeur Ajouté
|
||||||
(es) NIF / CIF
|
(es) NIF / CIF
|
||||||
(de) USt / MwSt
|
(de) USt / MwSt = UmsatzSteuer / Mehrwertsteuer
|
||||||
|
(it) IVA
|
||||||
10
dev/resources/iso-normes/tax/world_tax_rates.txt
Normal file
10
dev/resources/iso-normes/tax/world_tax_rates.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
VAT Rates
|
||||||
|
---------
|
||||||
|
|
||||||
|
https://www.taxrates.cc/index.html
|
||||||
|
https://en.wikipedia.org/wiki/List_of_countries_by_tax_rates
|
||||||
|
|
||||||
|
For India: VAT=IGST / CGST=Localtax1 / SGST=Localtax2
|
||||||
|
see:
|
||||||
|
https://cleartax.in/s/what-is-sgst-cgst-igst
|
||||||
|
https://www.mastersindia.co/blog/what-is-cgst-sgst-igst-and-ugst/
|
||||||
@ -1,8 +0,0 @@
|
|||||||
VAT Rates
|
|
||||||
---------
|
|
||||||
|
|
||||||
http://www.taxrates.cc/index.html
|
|
||||||
https://en.wikipedia.org/wiki/List_of_countries_by_tax_rates
|
|
||||||
|
|
||||||
For India: VAT=IGST/CGST=Localtax1/SGST=Localtax2: https://cleartax.in/s/what-is-sgst-cgst-igst
|
|
||||||
|
|
||||||
@ -135,7 +135,7 @@
|
|||||||
<rule ref="Generic.Metrics.CyclomaticComplexity">
|
<rule ref="Generic.Metrics.CyclomaticComplexity">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="complexity" value="250" />
|
<property name="complexity" value="250" />
|
||||||
<property name="absoluteComplexity" value="300" />
|
<property name="absoluteComplexity" value="400" />
|
||||||
</properties>
|
</properties>
|
||||||
</rule>
|
</rule>
|
||||||
<rule ref="Generic.Metrics.NestingLevel">
|
<rule ref="Generic.Metrics.NestingLevel">
|
||||||
|
|||||||
20
dev/setup/fail2ban/filter.d/web-dolibarr-limitpublic.conf
Normal file
20
dev/setup/fail2ban/filter.d/web-dolibarr-limitpublic.conf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Fail2Ban configuration file
|
||||||
|
#
|
||||||
|
# Regexp to catch known spambots and software alike. Please verify
|
||||||
|
# that it is your intent to block IPs which were driven by
|
||||||
|
# above mentioned bots.
|
||||||
|
|
||||||
|
|
||||||
|
[Definition]
|
||||||
|
|
||||||
|
# To test, you can inject this example into log
|
||||||
|
# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 --- Access to GET /public/clicktodial/cidlookup.php" >> /mypath/documents/dolibarr.log
|
||||||
|
#
|
||||||
|
# then
|
||||||
|
# fail2ban-client status web-dol-passforgotten
|
||||||
|
#
|
||||||
|
# To test rule file on a existing log file
|
||||||
|
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-limitpublic.conf
|
||||||
|
|
||||||
|
failregex = ^ [A-Z\s]+ <HOST>\s+--- Access to .*/public/
|
||||||
|
ignoreregex =
|
||||||
@ -8,21 +8,35 @@
|
|||||||
enabled = true
|
enabled = true
|
||||||
port = http,https
|
port = http,https
|
||||||
filter = web-dolibarr-rulespassforgotten
|
filter = web-dolibarr-rulespassforgotten
|
||||||
logpath = >> /mypath/documents/documents/dolibarr.log
|
logpath = /mypath/documents/documents/dolibarr.log
|
||||||
action = %(action_mw)s
|
action = %(action_mw)s
|
||||||
bantime = 4320000 ; 50 days
|
bantime = 4320000 ; 50 days
|
||||||
findtime = 86400 ; 1 day
|
findtime = 86400 ; 1 day
|
||||||
maxretry = 10
|
maxretry = 10
|
||||||
|
|
||||||
|
|
||||||
[web-dol-bruteforce]
|
[web-dol-bruteforce]
|
||||||
|
|
||||||
; rule against bruteforce hacking (login + api)
|
; rule against bruteforce hacking (login + api)
|
||||||
enabled = true
|
enabled = true
|
||||||
port = http,https
|
port = http,https
|
||||||
filter = web-dolibarr-rulesbruteforce
|
filter = web-dolibarr-rulesbruteforce
|
||||||
logpath = >> /mypath/documents/documents/dolibarr.log
|
logpath = /mypath/documents/documents/dolibarr.log
|
||||||
action = %(action_mw)s
|
action = %(action_mw)s
|
||||||
bantime = 86400 ; 1 day
|
bantime = 86400 ; 1 day
|
||||||
findtime = 3600 ; 1 hour
|
findtime = 3600 ; 1 hour
|
||||||
maxretry = 10
|
maxretry = 10
|
||||||
|
|
||||||
|
|
||||||
|
[web-dol-limitpublic]
|
||||||
|
|
||||||
|
; rule to add rate limit on some public pages
|
||||||
|
enabled = true
|
||||||
|
port = http,https
|
||||||
|
filter = web-dolibarr-limitpublic
|
||||||
|
logpath = /mypath/documents/documents/dolibarr.log
|
||||||
|
action = %(action_mw)s
|
||||||
|
bantime = 86400 ; 1 day
|
||||||
|
findtime = 86400 ; 1 day
|
||||||
|
maxretry = 500
|
||||||
|
|
||||||
|
|||||||
@ -487,7 +487,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
|||||||
$pkey = $line;
|
$pkey = $line;
|
||||||
|
|
||||||
$linenumber ++;
|
$linenumber ++;
|
||||||
if (! empty($lines[$linenumber])) {
|
if (!empty($lines[$linenumber])) {
|
||||||
$line = $lines[$linenumber];
|
$line = $lines[$linenumber];
|
||||||
} else {
|
} else {
|
||||||
$line = '';
|
$line = '';
|
||||||
@ -517,7 +517,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
|||||||
if (substr($line, 0, 12) == "CREATE INDEX") {
|
if (substr($line, 0, 12) == "CREATE INDEX") {
|
||||||
$matches = array();
|
$matches = array();
|
||||||
preg_match('/CREATE INDEX "?([a-zA-Z0-9_]*)"? ON "?([a-zA-Z0-9_\.]*)"? USING btree \((.*)\);/', $line, $matches);
|
preg_match('/CREATE INDEX "?([a-zA-Z0-9_]*)"? ON "?([a-zA-Z0-9_\.]*)"? USING btree \((.*)\);/', $line, $matches);
|
||||||
if (! empty($matches[3])) {
|
if (!empty($matches[3])) {
|
||||||
$indexname = $matches[1];
|
$indexname = $matches[1];
|
||||||
$tablename = str_replace('public.', '', $matches[2]);
|
$tablename = str_replace('public.', '', $matches[2]);
|
||||||
$columns = $matches[3];
|
$columns = $matches[3];
|
||||||
@ -529,7 +529,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
|||||||
if (substr($line, 0, 19) == "CREATE UNIQUE INDEX") {
|
if (substr($line, 0, 19) == "CREATE UNIQUE INDEX") {
|
||||||
$matches = array();
|
$matches = array();
|
||||||
preg_match('/CREATE UNIQUE INDEX "?([a-zA-Z0-9_]*)"? ON "?([a-zA-Z0-9_\.]*)"? USING btree \((.*)\);/', $line, $matches);
|
preg_match('/CREATE UNIQUE INDEX "?([a-zA-Z0-9_]*)"? ON "?([a-zA-Z0-9_\.]*)"? USING btree \((.*)\);/', $line, $matches);
|
||||||
if (! empty($matches[3])) {
|
if (!empty($matches[3])) {
|
||||||
$indexname = $matches[1];
|
$indexname = $matches[1];
|
||||||
$tablename = str_replace('public.', '', $matches[2]);
|
$tablename = str_replace('public.', '', $matches[2]);
|
||||||
$columns = str_replace('"', '', $matches[3]);
|
$columns = str_replace('"', '', $matches[3]);
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*spl_autoload_register(function ($class_name) {
|
/*spl_autoload_register(function ($class_name) {
|
||||||
//var_dump('class='.$class_name);
|
//var_dump('class='.$class_name);
|
||||||
require $class_name;
|
require $class_name;
|
||||||
|
|||||||
@ -309,11 +309,11 @@ class autoTranslator
|
|||||||
{
|
{
|
||||||
// We want to be sure that src_lang and dest_lang are using 2 chars only
|
// We want to be sure that src_lang and dest_lang are using 2 chars only
|
||||||
$tmp=explode('_', $src_lang);
|
$tmp=explode('_', $src_lang);
|
||||||
if (! empty($tmp[1]) && $tmp[0] == $tmp[1]) {
|
if (!empty($tmp[1]) && $tmp[0] == $tmp[1]) {
|
||||||
$src_lang=$tmp[0];
|
$src_lang=$tmp[0];
|
||||||
}
|
}
|
||||||
$tmp=explode('_', $dest_lang);
|
$tmp=explode('_', $dest_lang);
|
||||||
if (! empty($tmp[1]) && $tmp[0] == $tmp[1]) {
|
if (!empty($tmp[1]) && $tmp[0] == $tmp[1]) {
|
||||||
$dest_lang=$tmp[0];
|
$dest_lang=$tmp[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ class autoTranslator
|
|||||||
// now, process the JSON string
|
// now, process the JSON string
|
||||||
$json = json_decode($body, true);
|
$json = json_decode($body, true);
|
||||||
|
|
||||||
if ((! empty($json['responseStatus']) && $json['responseStatus'] != 200)
|
if ((!empty($json['responseStatus']) && $json['responseStatus'] != 200)
|
||||||
|| count($json['data']['translations']) == 0) {
|
|| count($json['data']['translations']) == 0) {
|
||||||
print "Error: ".$json['responseStatus']." ".$url."\n";
|
print "Error: ".$json['responseStatus']." ".$url."\n";
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -221,7 +221,7 @@ foreach ($dups as $string => $pages) {
|
|||||||
// Loop on each line keword was found into file.
|
// Loop on each line keword was found into file.
|
||||||
$listoffilesforthisentry=array();
|
$listoffilesforthisentry=array();
|
||||||
foreach ($lines as $line => $translatedvalue) {
|
foreach ($lines as $line => $translatedvalue) {
|
||||||
if (! empty($listoffilesforthisentry[$file])) {
|
if (!empty($listoffilesforthisentry[$file])) {
|
||||||
$duplicateinsamefile=1;
|
$duplicateinsamefile=1;
|
||||||
}
|
}
|
||||||
$listoffilesforthisentry[$file]=1;
|
$listoffilesforthisentry[$file]=1;
|
||||||
@ -300,7 +300,7 @@ if ($web) {
|
|||||||
|
|
||||||
// STEP 2 - Search key not used
|
// STEP 2 - Search key not used
|
||||||
|
|
||||||
if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($argv[1]) && $argv[1]=='unused=true')) {
|
if ((!empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($argv[1]) && $argv[1]=='unused=true')) {
|
||||||
print "***** Strings in en_US that are never used:\n";
|
print "***** Strings in en_US that are never used:\n";
|
||||||
|
|
||||||
$unused=array();
|
$unused=array();
|
||||||
|
|||||||
@ -303,8 +303,8 @@ foreach ($filesToProcess as $fileToProcess) {
|
|||||||
|
|
||||||
// String exists in both files and value into alternative language differs from main language but also from english files
|
// String exists in both files and value into alternative language differs from main language but also from english files
|
||||||
// so we keep it.
|
// so we keep it.
|
||||||
if ((! empty($aSecondary[$key]) && $aSecondary[$key] != $aPrimary[$key]
|
if ((!empty($aSecondary[$key]) && $aSecondary[$key] != $aPrimary[$key]
|
||||||
&& ! empty($aEnglish[$key]) && $aSecondary[$key] != $aEnglish[$key])
|
&& !empty($aEnglish[$key]) && $aSecondary[$key] != $aEnglish[$key])
|
||||||
|| in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/', $key) || preg_match('/^FormatHour/', $key)
|
|| in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/', $key) || preg_match('/^FormatHour/', $key)
|
||||||
) {
|
) {
|
||||||
//print "Key $key differs (aSecondary=".$aSecondary[$key].", aPrimary=".$aPrimary[$key].", aEnglish=".$aEnglish[$key].") so we add it into new secondary language (line: $cnt).\n";
|
//print "Key $key differs (aSecondary=".$aSecondary[$key].", aPrimary=".$aPrimary[$key].", aEnglish=".$aEnglish[$key].") so we add it into new secondary language (line: $cnt).\n";
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
* \brief List accounting account
|
* \brief List accounting account
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
@ -30,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("compta", "bills", "admin", "accountancy", "salaries"));
|
$langs->loadLangs(array('accountancy', 'admin', 'bills', 'compta', 'salaries'));
|
||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
@ -52,14 +53,14 @@ $confirm = GETPOST('confirm', 'alpha');
|
|||||||
|
|
||||||
$chartofaccounts = GETPOST('chartofaccounts', 'int');
|
$chartofaccounts = GETPOST('chartofaccounts', 'int');
|
||||||
|
|
||||||
$permissiontoadd = !empty($user->rights->accounting->chartofaccount);
|
$permissiontoadd = $user->hasRight('accounting', 'chartofaccount');
|
||||||
$permissiontodelete = !empty($user->rights->accounting->chartofaccount);
|
$permissiontodelete = $user->hasRight('accounting', 'chartofaccount');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($user->rights->accounting->chartofaccount)) {
|
if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,6 +98,9 @@ if ($conf->global->MAIN_FEATURES_LEVEL < 2) {
|
|||||||
|
|
||||||
$accounting = new AccountingAccount($db);
|
$accounting = new AccountingAccount($db);
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||||
|
$hookmanager->initHooks(array('accountancyadminaccount'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -109,8 +113,8 @@ if (!GETPOST('confirmmassaction', 'alpha')) {
|
|||||||
$massaction = '';
|
$massaction = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array('chartofaccounts' => $chartofaccounts, 'permissiontoadd' => $permissiontoadd, 'permissiontodelete' => $permissiontodelete);
|
||||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been monowraponalldified by some hooks
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $accounting, $action); // Note that $action and $object may have been monowraponalldified by some hooks
|
||||||
if ($reshook < 0) {
|
if ($reshook < 0) {
|
||||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
}
|
}
|
||||||
@ -294,7 +298,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List of mass actions available
|
// List of mass actions available
|
||||||
if ($user->rights->accounting->chartofaccount) {
|
if ($user->hasRight('accounting', 'chartofaccount')) {
|
||||||
$arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
$arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||||
}
|
}
|
||||||
if (in_array($massaction, array('presend', 'predelete', 'closed'))) {
|
if (in_array($massaction, array('presend', 'predelete', 'closed'))) {
|
||||||
@ -398,6 +402,11 @@ if ($resql) {
|
|||||||
print '<input type="'.(empty($conf->use_javascript_ajax) ? 'submit' : 'button').'" class="button button-edit" name="change_chart" id="change_chart" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
|
print '<input type="'.(empty($conf->use_javascript_ajax) ? 'submit' : 'button').'" class="button button-edit" name="change_chart" id="change_chart" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
$parameters = array('chartofaccounts' => $chartofaccounts, 'permissiontoadd' => $permissiontoadd, 'permissiontodelete' => $permissiontodelete);
|
||||||
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $accounting, $action); // Note that $action and $object may have been modified by hook
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||||
@ -590,7 +599,7 @@ if ($resql) {
|
|||||||
|
|
||||||
// Action
|
// Action
|
||||||
print '<td class="center nowraponall">';
|
print '<td class="center nowraponall">';
|
||||||
if ($user->rights->accounting->chartofaccount) {
|
if ($user->hasRight('accounting', 'chartofaccount')) {
|
||||||
print '<a class="editfielda" href="./card.php?action=update&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?'.$param).'">';
|
print '<a class="editfielda" href="./card.php?action=update&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?'.$param).'">';
|
||||||
print img_edit();
|
print img_edit();
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
|||||||
@ -32,6 +32,7 @@
|
|||||||
* \brief Page to administer model of chart of accounts
|
* \brief Page to administer model of chart of accounts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
@ -44,7 +45,7 @@ if (isModEnabled('accounting')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("errors", "admin", "companies", "resource", "holiday", "compta", "accountancy", "hrm"));
|
$langs->loadLangs(array('accountancy', 'admin', 'companies', 'compta', 'errors', 'holiday', 'hrm', 'resource'));
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view';
|
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view';
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
@ -78,7 +79,7 @@ $search_country_id = GETPOST('search_country_id', 'int');
|
|||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($user->rights->accounting->chartofaccount)) {
|
if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
* \brief Card of accounting account
|
* \brief Card of accounting account
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
||||||
@ -32,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("bills", "accountancy", "compta"));
|
$langs->loadLangs(array('accountancy', 'bills', 'compta'));
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
@ -48,7 +49,7 @@ $label = GETPOST('label', 'alpha');
|
|||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($user->rights->accounting->chartofaccount)) {
|
if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +67,7 @@ if (GETPOST('cancel', 'alpha')) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'add' && $user->rights->accounting->chartofaccount) {
|
if ($action == 'add' && $user->hasRight('accounting', 'chartofaccount')) {
|
||||||
if (!$cancel) {
|
if (!$cancel) {
|
||||||
if (!$account_number) {
|
if (!$account_number) {
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountNumber")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountNumber")), null, 'errors');
|
||||||
@ -127,7 +128,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($action == 'edit' && $user->rights->accounting->chartofaccount) {
|
} elseif ($action == 'edit' && $user->hasRight('accounting', 'chartofaccount')) {
|
||||||
if (!$cancel) {
|
if (!$cancel) {
|
||||||
if (!$account_number) {
|
if (!$account_number) {
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountNumber")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountNumber")), null, 'errors');
|
||||||
@ -184,7 +185,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) {
|
|||||||
header("Location: ".$urltogo);
|
header("Location: ".$urltogo);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
} elseif ($action == 'delete' && $user->rights->accounting->chartofaccount) {
|
} elseif ($action == 'delete' && $user->hasRight('accounting', 'chartofaccount')) {
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
|
|
||||||
if (!empty($object->id)) {
|
if (!empty($object->id)) {
|
||||||
@ -419,13 +420,13 @@ if ($action == 'create') {
|
|||||||
*/
|
*/
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if (!empty($user->rights->accounting->chartofaccount)) {
|
if ($user->hasRight('accounting', 'chartofaccount')) {
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=update&token='.newToken().'&id='.$object->id.'">'.$langs->trans('Modify').'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=update&token='.newToken().'&id='.$object->id.'">'.$langs->trans('Modify').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Modify').'</a>';
|
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Modify').'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($user->rights->accounting->chartofaccount)) {
|
if ($user->hasRight('accounting', 'chartofaccount')) {
|
||||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id.'">'.$langs->trans('Delete').'</a>';
|
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id.'">'.$langs->trans('Delete').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Delete').'</a>';
|
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Delete').'</a>';
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
* \brief Page to assign mass categories to accounts
|
* \brief Page to assign mass categories to accounts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancycategory.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancycategory.class.php';
|
||||||
@ -44,7 +45,7 @@ if ($cat_id == 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($user->rights->accounting->chartofaccount)) {
|
if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
* \brief Page to administer data tables
|
* \brief Page to administer data tables
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
@ -42,7 +43,7 @@ $rowid = GETPOST('rowid', 'alpha');
|
|||||||
$code = GETPOST('code', 'alpha');
|
$code = GETPOST('code', 'alpha');
|
||||||
|
|
||||||
// Security access
|
// Security access
|
||||||
if (empty($user->rights->accounting->chartofaccount)) {
|
if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
* \brief Setup page to configure accounting expert module
|
* \brief Setup page to configure accounting expert module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
@ -31,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
|||||||
$langs->loadLangs(array("compta", "admin", "accountancy"));
|
$langs->loadLangs(array("compta", "admin", "accountancy"));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($user->rights->accounting->chartofaccount)) {
|
if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
|||||||
$langs->loadLangs(array("compta", "bills", "admin", "accountancy", "salaries", "loan"));
|
$langs->loadLangs(array("compta", "bills", "admin", "accountancy", "salaries", "loan"));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($user->rights->accounting->chartofaccount)) {
|
if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,6 +133,12 @@ if ($action == 'update') {
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$constname = 'ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT';
|
||||||
|
$constvalue = GETPOST($constname, 'int');
|
||||||
|
if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
@ -155,6 +161,20 @@ if ($action == 'setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action == 'setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT') {
|
||||||
|
$setDisableAuxiliaryAccountOnSupplierDeposit = GETPOST('value', 'int');
|
||||||
|
$res = dolibarr_set_const($db, "ACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT", $setDisableAuxiliaryAccountOnSupplierDeposit, 'yesno', 0, '', $conf->entity);
|
||||||
|
if (!($res > 0)) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
|
} else {
|
||||||
|
setEventMessages($langs->trans("Error"), null, 'mesgs');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -281,6 +301,33 @@ if (isModEnabled('societe') && getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_D
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Supplier deposit account
|
||||||
|
print '<tr class="oddeven value">';
|
||||||
|
// Param
|
||||||
|
print '<td>';
|
||||||
|
print img_picto('', 'supplier_invoice', 'class="pictofixedwidth"') . $langs->trans('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT');
|
||||||
|
print '</td>';
|
||||||
|
// Value
|
||||||
|
print '<td class="right">'; // Do not force class=right, or it align also the content of the select box
|
||||||
|
print $formaccounting->select_account(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT'), 'ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT', 1, '', 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 'accounts');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
if (isModEnabled('societe') && getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT') && getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT') != '-1') {
|
||||||
|
print '<tr class="oddeven">';
|
||||||
|
print '<td>' . img_picto('', 'supplier_invoice', 'class="pictofixedwidth"') . $langs->trans("UseAuxiliaryAccountOnSupplierDeposit") . '</td>';
|
||||||
|
if (getDolGlobalInt('ACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT')) {
|
||||||
|
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT&value=0">';
|
||||||
|
print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning');
|
||||||
|
print '</a></td>';
|
||||||
|
} else {
|
||||||
|
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT&value=1">';
|
||||||
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
|
print '</a></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php';
|
|||||||
$langs->loadLangs(array("compta", "bills", "admin", "accountancy"));
|
$langs->loadLangs(array("compta", "bills", "admin", "accountancy"));
|
||||||
|
|
||||||
// Security access
|
// Security access
|
||||||
if (empty($user->rights->accounting->chartofaccount)) {
|
if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
* \brief Setup page to configure fiscal year
|
* \brief Setup page to configure fiscal year
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php';
|
||||||
@ -121,7 +122,7 @@ if ($result) {
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
|
|
||||||
$addbutton .= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', 'fiscalyear_card.php?action=create', '', $user->rights->accounting->fiscalyear->write);
|
$addbutton .= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', 'fiscalyear_card.php?action=create', '', $user->hasRight('accounting', 'fiscalyear', 'write'));
|
||||||
|
|
||||||
|
|
||||||
$title = $langs->trans('AccountingPeriods');
|
$title = $langs->trans('AccountingPeriods');
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
* \brief Page to show a fiscal year
|
* \brief Page to show a fiscal year
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php';
|
||||||
@ -299,7 +300,7 @@ if ($action == 'create') {
|
|||||||
/*
|
/*
|
||||||
* Action bar
|
* Action bar
|
||||||
*/
|
*/
|
||||||
if (!empty($user->rights->accounting->fiscalyear->write)) {
|
if ($user->hasRight('accounting', 'fiscalyear', 'write')) {
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$id.'">'.$langs->trans('Modify').'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$id.'">'.$langs->trans('Modify').'</a>';
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
* \brief Page to show info of a fiscal year
|
* \brief Page to show info of a fiscal year
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|||||||
@ -29,6 +29,7 @@
|
|||||||
* \brief Setup page to configure accounting expert module
|
* \brief Setup page to configure accounting expert module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
@ -38,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|||||||
$langs->loadLangs(array("compta", "bills", "admin", "accountancy", "other"));
|
$langs->loadLangs(array("compta", "bills", "admin", "accountancy", "other"));
|
||||||
|
|
||||||
// Security access
|
// Security access
|
||||||
if (empty($user->rights->accounting->chartofaccount)) {
|
if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,7 @@ if (!defined('CSRFCHECK_WITH_TOKEN')) {
|
|||||||
define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET
|
define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
@ -45,7 +46,7 @@ $rowid = GETPOST('rowid', 'alpha');
|
|||||||
$code = GETPOST('code', 'alpha');
|
$code = GETPOST('code', 'alpha');
|
||||||
|
|
||||||
// Security access
|
// Security access
|
||||||
if (empty($user->rights->accounting->chartofaccount)) {
|
if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -522,7 +522,7 @@ if ($resql) {
|
|||||||
|
|
||||||
// Filter on categories
|
// Filter on categories
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
if (isModEnabled('categorie') && $user->hasRight('categorie', 'lire')) {
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
$moreforfilter .= img_picto($langs->trans('Categories'), 'category', 'class="pictofixedwidth"');
|
$moreforfilter .= img_picto($langs->trans('Categories'), 'category', 'class="pictofixedwidth"');
|
||||||
$categoriesProductArr = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', '', 64, 0, 1);
|
$categoriesProductArr = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', '', 64, 0, 1);
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
* \brief List of accounting sub-account (auxiliary accounts)
|
* \brief List of accounting sub-account (auxiliary accounts)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
@ -47,7 +48,7 @@ $search_type = GETPOST('search_type', 'int');
|
|||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($user->rights->accounting->chartofaccount)) {
|
if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
* \brief Balance of book keeping
|
* \brief Balance of book keeping
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
// Class
|
// Class
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
* \brief Page to show book-entry
|
* \brief Page to show book-entry
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
|
||||||
@ -332,7 +333,9 @@ if ($action == 'valid') {
|
|||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
$formaccounting = new FormAccounting($db);
|
$formaccounting = new FormAccounting($db);
|
||||||
|
|
||||||
llxHeader('', $langs->trans("CreateMvts"));
|
$title = $langs->trans("CreateMvts");
|
||||||
|
|
||||||
|
llxHeader('', $title);
|
||||||
|
|
||||||
// Confirmation to delete the command
|
// Confirmation to delete the command
|
||||||
if ($action == 'delete') {
|
if ($action == 'delete') {
|
||||||
@ -341,7 +344,7 @@ if ($action == 'delete') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'create') {
|
if ($action == 'create') {
|
||||||
print load_fiche_titre($langs->trans("CreateMvts"));
|
print load_fiche_titre($title);
|
||||||
|
|
||||||
$object = new BookKeeping($db);
|
$object = new BookKeeping($db);
|
||||||
$next_num_mvt = $object->getNextNumMvt('_tmp');
|
$next_num_mvt = $object->getNextNumMvt('_tmp');
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
* \brief List operation of book keeping
|
* \brief List operation of book keeping
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
@ -479,8 +480,8 @@ if (empty($reshook)) {
|
|||||||
// Mass actions
|
// Mass actions
|
||||||
$objectclass = 'Bookkeeping';
|
$objectclass = 'Bookkeeping';
|
||||||
$objectlabel = 'Bookkeeping';
|
$objectlabel = 'Bookkeeping';
|
||||||
$permissiontoread = $user->rights->societe->lire;
|
$permissiontoread = $user->hasRight('societe', 'lire');
|
||||||
$permissiontodelete = $user->rights->societe->supprimer;
|
$permissiontodelete = $user->hasRight('societe', 'supprimer');
|
||||||
$permissiontoadd = $user->rights->societe->creer;
|
$permissiontoadd = $user->rights->societe->creer;
|
||||||
$uploaddir = $conf->societe->dir_output;
|
$uploaddir = $conf->societe->dir_output;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||||
@ -689,21 +690,28 @@ if (!empty($sortfield)) {
|
|||||||
// Export into a file with format defined into setup (FEC, CSV, ...)
|
// Export into a file with format defined into setup (FEC, CSV, ...)
|
||||||
// Must be after definition of $sql
|
// Must be after definition of $sql
|
||||||
if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->export) {
|
if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->export) {
|
||||||
// TODO Replace the fetchAll to get all ->line followed by call to ->export(). It consumew too much memory on large export. Replace this with the query($sql) and loop on each line to export them.
|
// TODO Replace the fetchAll to get all ->line followed by call to ->export(). It consumes too much memory on large export.
|
||||||
|
// Replace this with the query($sql) and loop on each line to export them.
|
||||||
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', (empty($conf->global->ACCOUNTING_REEXPORT) ? 0 : 1));
|
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', (empty($conf->global->ACCOUNTING_REEXPORT) ? 0 : 1));
|
||||||
|
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
// Export files
|
// Export files then exit
|
||||||
$accountancyexport = new AccountancyExport($db);
|
$accountancyexport = new AccountancyExport($db);
|
||||||
|
|
||||||
|
$mimetype = $accountancyexport->getMimeType($formatexportset);
|
||||||
|
|
||||||
|
top_httphead($mimetype, 1);
|
||||||
|
|
||||||
|
// Output data on screen
|
||||||
$accountancyexport->export($object->lines, $formatexportset);
|
$accountancyexport->export($object->lines, $formatexportset);
|
||||||
|
|
||||||
$notifiedexportdate = GETPOST('notifiedexportdate', 'alpha');
|
$notifiedexportdate = GETPOST('notifiedexportdate', 'alpha');
|
||||||
$notifiedvalidationdate = GETPOST('notifiedvalidationdate', 'alpha');
|
$notifiedvalidationdate = GETPOST('notifiedvalidationdate', 'alpha');
|
||||||
|
|
||||||
if (!empty($accountancyexport->errors)) {
|
if (!empty($accountancyexport->errors)) {
|
||||||
setEventMessages('', $accountancyexport->errors, 'errors');
|
dol_print_error('', '', $accountancyexport->errors);
|
||||||
} elseif (!empty($notifiedexportdate) || !empty($notifiedvalidationdate)) {
|
} elseif (!empty($notifiedexportdate) || !empty($notifiedvalidationdate)) {
|
||||||
// Specify as export : update field date_export or date_validated
|
// Specify as export : update field date_export or date_validated
|
||||||
$error = 0;
|
$error = 0;
|
||||||
@ -737,11 +745,10 @@ if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->ex
|
|||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
// setEventMessages($langs->trans("AllExportedMovementsWereRecordedAsExportedOrValidated"), null, 'mesgs');
|
|
||||||
} else {
|
} else {
|
||||||
$error++;
|
$error++;
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessages($langs->trans("NotAllExportedMovementsCouldBeRecordedAsExportedOrValidated"), null, 'errors');
|
dol_print_error('', $langs->trans("NotAllExportedMovementsCouldBeRecordedAsExportedOrValidated"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
@ -897,8 +904,8 @@ if ($optioncss != '') {
|
|||||||
print '<input type="hidden" name="optioncss" value="'.urlencode($optioncss).'">';
|
print '<input type="hidden" name="optioncss" value="'.urlencode($optioncss).'">';
|
||||||
}
|
}
|
||||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.urlencode($sortfield).'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.urlencode($sortorder).'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
if (count($filter)) {
|
if (count($filter)) {
|
||||||
@ -919,7 +926,7 @@ if (empty($reshook)) {
|
|||||||
$newcardbutton .= '<span class="valignmiddle marginrightonly">'.$langs->trans("IncludeDocsAlreadyExported").'</span>';
|
$newcardbutton .= '<span class="valignmiddle marginrightonly">'.$langs->trans("IncludeDocsAlreadyExported").'</span>';
|
||||||
|
|
||||||
if (!empty($user->rights->accounting->mouvements->export)) {
|
if (!empty($user->rights->accounting->mouvements->export)) {
|
||||||
$newcardbutton .= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file'.($param ? '&'.$param : ''), $user->rights->accounting->mouvements->export);
|
$newcardbutton .= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file&token='.newToken().($param ? '&'.$param : ''), $user->rights->accounting->mouvements->export);
|
||||||
}
|
}
|
||||||
|
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected'));
|
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected'));
|
||||||
@ -1021,14 +1028,14 @@ if (!empty($arrayfields['t.subledger_account']['checked'])) {
|
|||||||
print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', $langs->trans('to'), 'maxwidth250', 'subledgeraccount');
|
print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', $langs->trans('to'), 'maxwidth250', 'subledgeraccount');
|
||||||
print '</div>';
|
print '</div>';
|
||||||
} else {
|
} else {
|
||||||
print '<input type="text" class="maxwidth75" name="search_accountancy_aux_code" value="'.$search_accountancy_aux_code.'">';
|
print '<input type="text" class="maxwidth75" name="search_accountancy_aux_code" value="'.dol_escape_htmltag($search_accountancy_aux_code).'">';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Label operation
|
// Label operation
|
||||||
if (!empty($arrayfields['t.label_operation']['checked'])) {
|
if (!empty($arrayfields['t.label_operation']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input type="text" size="7" class="flat" name="search_mvt_label" value="'.$search_mvt_label.'"/>';
|
print '<input type="text" size="7" class="flat" name="search_mvt_label" value="'.dol_escape_htmltag($search_mvt_label).'"/>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Debit
|
// Debit
|
||||||
@ -1046,7 +1053,7 @@ if (!empty($arrayfields['t.credit']['checked'])) {
|
|||||||
// Lettering code
|
// Lettering code
|
||||||
if (!empty($arrayfields['t.lettering_code']['checked'])) {
|
if (!empty($arrayfields['t.lettering_code']['checked'])) {
|
||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>';
|
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.dol_escape_htmltag($search_lettering_code).'"/>';
|
||||||
print '<br><span class="nowrap"><input type="checkbox" name="search_not_reconciled" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
|
print '<br><span class="nowrap"><input type="checkbox" name="search_not_reconciled" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -1154,10 +1161,10 @@ if (!empty($arrayfields['t.tms']['checked'])) {
|
|||||||
print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER['PHP_SELF'], "t.tms", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER['PHP_SELF'], "t.tms", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['t.date_export']['checked'])) {
|
if (!empty($arrayfields['t.date_export']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['t.date_export']['label'], $_SERVER['PHP_SELF'], "t.date_export", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['t.date_export']['label'], $_SERVER['PHP_SELF'], "t.date_export,t.doc_date", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['t.date_validated']['checked'])) {
|
if (!empty($arrayfields['t.date_validated']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['t.date_validated']['label'], $_SERVER['PHP_SELF'], "t.date_validated", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['t.date_validated']['label'], $_SERVER['PHP_SELF'], "t.date_validated,t.doc_date", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['t.import_key']['checked'])) {
|
if (!empty($arrayfields['t.import_key']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['t.import_key']['label'], $_SERVER["PHP_SELF"], "t.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['t.import_key']['label'], $_SERVER["PHP_SELF"], "t.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
@ -1172,10 +1179,10 @@ $line = new BookKeepingLine();
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
$totalarray['val'] = array ();
|
|
||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
$total_debit = 0;
|
$total_debit = 0;
|
||||||
$total_credit = 0;
|
$total_credit = 0;
|
||||||
|
$totalarray['val'] = array ();
|
||||||
$totalarray['val']['totaldebit'] = 0;
|
$totalarray['val']['totaldebit'] = 0;
|
||||||
$totalarray['val']['totalcredit'] = 0;
|
$totalarray['val']['totalcredit'] = 0;
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
* \brief List operation of ledger ordered by account number
|
* \brief List operation of ledger ordered by account number
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
@ -394,8 +395,8 @@ if (empty($reshook)) {
|
|||||||
// Mass actions
|
// Mass actions
|
||||||
$objectclass = 'Bookkeeping';
|
$objectclass = 'Bookkeeping';
|
||||||
$objectlabel = 'Bookkeeping';
|
$objectlabel = 'Bookkeeping';
|
||||||
$permissiontoread = $user->rights->societe->lire;
|
$permissiontoread = $user->hasRight('societe', 'lire');
|
||||||
$permissiontodelete = $user->rights->societe->supprimer;
|
$permissiontodelete = $user->hasRight('societe', 'supprimer');
|
||||||
$permissiontoadd = $user->rights->societe->creer;
|
$permissiontoadd = $user->rights->societe->creer;
|
||||||
$uploaddir = $conf->societe->dir_output;
|
$uploaddir = $conf->societe->dir_output;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||||
|
|||||||
@ -286,6 +286,28 @@ class AccountancyExport
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the MIME type of a file
|
||||||
|
*
|
||||||
|
* @param int $formatexportset Id of export format
|
||||||
|
* @return string MIME type.
|
||||||
|
*/
|
||||||
|
public function getMimeType($formatexportset)
|
||||||
|
{
|
||||||
|
$mime = 'text/csv';
|
||||||
|
|
||||||
|
switch ($formatexportset) {
|
||||||
|
case self::$EXPORT_TYPE_FEC:
|
||||||
|
$mime = 'text/tab-separated-values';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$mime = 'text/csv';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $mime;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function who chose which export to use with the default config, and make the export into a file
|
* Function who chose which export to use with the default config, and make the export into a file
|
||||||
*
|
*
|
||||||
@ -1347,7 +1369,7 @@ class AccountancyExport
|
|||||||
}
|
}
|
||||||
print $nature_piece.$separator;
|
print $nature_piece.$separator;
|
||||||
// RACI
|
// RACI
|
||||||
// if (! empty($line->subledger_account)) {
|
// if (!empty($line->subledger_account)) {
|
||||||
// if ($line->doc_type == 'supplier_invoice') {
|
// if ($line->doc_type == 'supplier_invoice') {
|
||||||
// $racine_subledger_account = '40';
|
// $racine_subledger_account = '40';
|
||||||
// } elseif ($line->doc_type == 'customer_invoice') {
|
// } elseif ($line->doc_type == 'customer_invoice') {
|
||||||
@ -1610,7 +1632,7 @@ class AccountancyExport
|
|||||||
}
|
}
|
||||||
print $nature_piece.$separator;
|
print $nature_piece.$separator;
|
||||||
// RACI
|
// RACI
|
||||||
// if (! empty($line->subledger_account)) {
|
// if (!empty($line->subledger_account)) {
|
||||||
// if ($line->doc_type == 'supplier_invoice') {
|
// if ($line->doc_type == 'supplier_invoice') {
|
||||||
// $racine_subledger_account = '40';
|
// $racine_subledger_account = '40';
|
||||||
// } elseif ($line->doc_type == 'customer_invoice') {
|
// } elseif ($line->doc_type == 'customer_invoice') {
|
||||||
|
|||||||
@ -811,9 +811,9 @@ class AccountingAccount extends CommonObject
|
|||||||
$suggestedaccountingaccountfor = '';
|
$suggestedaccountingaccountfor = '';
|
||||||
if ((($buyer->country_code == $seller->country_code) || empty($buyer->country_code))) {
|
if ((($buyer->country_code == $seller->country_code) || empty($buyer->country_code))) {
|
||||||
// If buyer in same country than seller (if not defined, we assume it is same country)
|
// If buyer in same country than seller (if not defined, we assume it is same country)
|
||||||
if ($type=='customer' && !empty($product->accountancy_code_sell)) {
|
if ($type == 'customer' && !empty($product->accountancy_code_sell)) {
|
||||||
$code_p = $product->accountancy_code_sell;
|
$code_p = $product->accountancy_code_sell;
|
||||||
} elseif ($type=='supplier' && !empty($product->accountancy_code_buy)) {
|
} elseif ($type == 'supplier' && !empty($product->accountancy_code_buy)) {
|
||||||
$code_p = $product->accountancy_code_buy;
|
$code_p = $product->accountancy_code_buy;
|
||||||
}
|
}
|
||||||
$suggestedid = $accountingAccount['dom'];
|
$suggestedid = $accountingAccount['dom'];
|
||||||
@ -821,36 +821,36 @@ class AccountingAccount extends CommonObject
|
|||||||
} else {
|
} else {
|
||||||
if ($isSellerInEEC && $isBuyerInEEC && $factureDet->tva_tx != 0) {
|
if ($isSellerInEEC && $isBuyerInEEC && $factureDet->tva_tx != 0) {
|
||||||
// European intravat sale, but with VAT
|
// European intravat sale, but with VAT
|
||||||
if ($type=='customer' && !empty($product->accountancy_code_sell)) {
|
if ($type == 'customer' && !empty($product->accountancy_code_sell)) {
|
||||||
$code_p = $product->accountancy_code_sell;
|
$code_p = $product->accountancy_code_sell;
|
||||||
} elseif ($type=='supplier' && !empty($product->accountancy_code_buy)) {
|
} elseif ($type == 'supplier' && !empty($product->accountancy_code_buy)) {
|
||||||
$code_p = $product->accountancy_code_buy;
|
$code_p = $product->accountancy_code_buy;
|
||||||
}
|
}
|
||||||
$suggestedid = $accountingAccount['dom'];
|
$suggestedid = $accountingAccount['dom'];
|
||||||
$suggestedaccountingaccountfor = 'eecwithvat';
|
$suggestedaccountingaccountfor = 'eecwithvat';
|
||||||
} elseif ($isSellerInEEC && $isBuyerInEEC && empty($buyer->tva_intra)) {
|
} elseif ($isSellerInEEC && $isBuyerInEEC && empty($buyer->tva_intra)) {
|
||||||
// European intravat sale, without VAT intra community number
|
// European intravat sale, without VAT intra community number
|
||||||
if ($type=='customer' && !empty($product->accountancy_code_sell)) {
|
if ($type == 'customer' && !empty($product->accountancy_code_sell)) {
|
||||||
$code_p = $product->accountancy_code_sell;
|
$code_p = $product->accountancy_code_sell;
|
||||||
} elseif ($type=='supplier' && !empty($product->accountancy_code_buy)) {
|
} elseif ($type == 'supplier' && !empty($product->accountancy_code_buy)) {
|
||||||
$code_p = $product->accountancy_code_buy;
|
$code_p = $product->accountancy_code_buy;
|
||||||
}
|
}
|
||||||
$suggestedid = $accountingAccount['dom']; // There is a doubt for this case. Is it an error on vat or we just forgot to fill vat number ?
|
$suggestedid = $accountingAccount['dom']; // There is a doubt for this case. Is it an error on vat or we just forgot to fill vat number ?
|
||||||
$suggestedaccountingaccountfor = 'eecwithoutvatnumber';
|
$suggestedaccountingaccountfor = 'eecwithoutvatnumber';
|
||||||
} elseif ($isSellerInEEC && $isBuyerInEEC && !empty($product->accountancy_code_sell_intra)) {
|
} elseif ($isSellerInEEC && $isBuyerInEEC && !empty($product->accountancy_code_sell_intra)) {
|
||||||
// European intravat sale
|
// European intravat sale
|
||||||
if ($type=='customer' && !empty($product->accountancy_code_sell_intra)) {
|
if ($type == 'customer' && !empty($product->accountancy_code_sell_intra)) {
|
||||||
$code_p = $product->accountancy_code_sell_intra;
|
$code_p = $product->accountancy_code_sell_intra;
|
||||||
} elseif ($type=='supplier' && !empty($product->accountancy_code_buy_intra)) {
|
} elseif ($type == 'supplier' && !empty($product->accountancy_code_buy_intra)) {
|
||||||
$code_p = $product->accountancy_code_buy_intra;
|
$code_p = $product->accountancy_code_buy_intra;
|
||||||
}
|
}
|
||||||
$suggestedid = $accountingAccount['intra'];
|
$suggestedid = $accountingAccount['intra'];
|
||||||
$suggestedaccountingaccountfor = 'eec';
|
$suggestedaccountingaccountfor = 'eec';
|
||||||
} else {
|
} else {
|
||||||
// Foreign sale
|
// Foreign sale
|
||||||
if ($type=='customer' && !empty($product->accountancy_code_sell_export)) {
|
if ($type == 'customer' && !empty($product->accountancy_code_sell_export)) {
|
||||||
$code_p = $product->accountancy_code_sell_export;
|
$code_p = $product->accountancy_code_sell_export;
|
||||||
} elseif ($type=='supplier' && !empty($product->accountancy_code_buy_export)) {
|
} elseif ($type == 'supplier' && !empty($product->accountancy_code_buy_export)) {
|
||||||
$code_p = $product->accountancy_code_buy_export;
|
$code_p = $product->accountancy_code_buy_export;
|
||||||
}
|
}
|
||||||
$suggestedid = $accountingAccount['export'];
|
$suggestedid = $accountingAccount['export'];
|
||||||
@ -870,8 +870,12 @@ class AccountingAccount extends CommonObject
|
|||||||
// Manage Deposit
|
// Manage Deposit
|
||||||
if ($factureDet->desc == "(DEPOSIT)" || $facture->type == $facture::TYPE_DEPOSIT) {
|
if ($factureDet->desc == "(DEPOSIT)" || $facture->type == $facture::TYPE_DEPOSIT) {
|
||||||
$accountdeposittoventilated = new self($this->db);
|
$accountdeposittoventilated = new self($this->db);
|
||||||
|
if ($type == 'customer') {
|
||||||
$result = $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT, 1);
|
$result = $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT, 1);
|
||||||
if ($result < 0) {
|
} elseif ($type == 'supplier') {
|
||||||
|
$result = $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT, 1);
|
||||||
|
}
|
||||||
|
if (isset($result) && $result < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -169,6 +169,16 @@ class BookKeeping extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $piece_num;
|
public $piece_num;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var integer|string date of movement validated & lock
|
||||||
|
*/
|
||||||
|
public $date_validation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var integer|string date of movement who are noticed like exported
|
||||||
|
*/
|
||||||
|
public $date_export;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||||
*/
|
*/
|
||||||
@ -788,8 +798,7 @@ class BookKeeping extends CommonObject
|
|||||||
$this->piece_num = $obj->piece_num;
|
$this->piece_num = $obj->piece_num;
|
||||||
$this->date_creation = $this->db->jdate($obj->date_creation);
|
$this->date_creation = $this->db->jdate($obj->date_creation);
|
||||||
$this->date_export = $this->db->jdate($obj->date_export);
|
$this->date_export = $this->db->jdate($obj->date_export);
|
||||||
$this->date_validation = $this->db->jdate($obj->date_validated);
|
$this->date_validation = isset($obj->date_validated) ? $this->db->jdate($obj->date_validated) : '';
|
||||||
$this->date_validation = $this->db->jdate($obj->date_validation);
|
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|
||||||
@ -901,7 +910,8 @@ class BookKeeping extends CommonObject
|
|||||||
}
|
}
|
||||||
// Affichage par compte comptable
|
// Affichage par compte comptable
|
||||||
if (!empty($option)) {
|
if (!empty($option)) {
|
||||||
$sql .= ' AND t.subledger_account IS NOT NULL';
|
$sql .= " AND t.subledger_account IS NOT NULL";
|
||||||
|
$sql .= " AND t.subledger_account <> ''";
|
||||||
$sortfield = 't.subledger_account'.($sortfield ? ','.$sortfield : '');
|
$sortfield = 't.subledger_account'.($sortfield ? ','.$sortfield : '');
|
||||||
$sortorder = 'ASC'.($sortfield ? ','.$sortfield : '');
|
$sortorder = 'ASC'.($sortfield ? ','.$sortfield : '');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
* \brief Home closure page
|
* \brief Home closure page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
@ -75,7 +76,7 @@ if (empty($user->rights->accounting->fiscalyear->write)) {
|
|||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
if ($action == 'validate_movements_confirm' && !empty($user->rights->accounting->fiscalyear->write)) {
|
if ($action == 'validate_movements_confirm' && $user->hasRight('accounting', 'fiscalyear', 'write')) {
|
||||||
$date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int'));
|
$date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int'));
|
||||||
$date_end = dol_mktime(23, 59, 59, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
|
$date_end = dol_mktime(23, 59, 59, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
* \brief Home customer journalization page
|
* \brief Home customer journalization page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
* \brief Home expense report ventilation
|
* \brief Home expense report ventilation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
|
|||||||
@ -23,6 +23,8 @@
|
|||||||
* \brief Home accounting module
|
* \brief Home accounting module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
@ -42,14 +44,14 @@ if ($user->socid > 0) {
|
|||||||
if (!isModEnabled('accounting')) {
|
if (!isModEnabled('accounting')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($user->rights->accounting->mouvements->lire)) {
|
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if (!isModEnabled('comptabilite') && !isModEnabled('accounting') && !isModEnabled('asset') && !isModEnabled('intracommreport')) {
|
if (!isModEnabled('comptabilite') && !isModEnabled('accounting') && !isModEnabled('asset') && !isModEnabled('intracommreport')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($user->rights->compta->resultat->lire) && empty($user->rights->accounting->comptarapport->lire) && empty($user->rights->accounting->mouvements->lire) && empty($user->rights->asset->read) && empty($user->rights->intracommreport->read)) {
|
if (!$user->hasRight('compta', 'resultat', 'lire') && !$user->hasRight('accounting', 'comptarapport', 'lire') && !$user->hasRight('accounting', 'mouvements', 'lire') && !$user->hasRight('asset', 'read') && !$user->hasRight('intracommreport', 'read')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +79,7 @@ if (GETPOST('addbox')) {
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$help_url = '';
|
$help_url = 'EN:Module_Double_Entry_Accounting#Setup';
|
||||||
|
|
||||||
llxHeader('', $langs->trans("AccountancyArea"), $help_url);
|
llxHeader('', $langs->trans("AccountancyArea"), $help_url);
|
||||||
|
|
||||||
@ -117,7 +119,7 @@ if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_S
|
|||||||
print '<div class="'.($helpisexpanded ? '' : 'hideobject').'" id="idfaq">'; // hideobject is to start hidden
|
print '<div class="'.($helpisexpanded ? '' : 'hideobject').'" id="idfaq">'; // hideobject is to start hidden
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print '<span class="opacitymedium">'.$langs->trans("AccountancyAreaDescIntro")."</span><br>\n";
|
print '<span class="opacitymedium">'.$langs->trans("AccountancyAreaDescIntro")."</span><br>\n";
|
||||||
if (!empty($user->rights->accounting->chartofaccount)) {
|
if ($user->hasRight('accounting', 'chartofaccount')) {
|
||||||
print "<br>\n"; print "<br>\n";
|
print "<br>\n"; print "<br>\n";
|
||||||
|
|
||||||
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
|
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
|
||||||
|
|||||||
@ -294,9 +294,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
|
|
||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
|
|
||||||
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
|
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
|
||||||
$companystatic->code_client = $tabcompany[$key]['code_client'];
|
|
||||||
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
|
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
|
||||||
$companystatic->fournisseur = 1;
|
$companystatic->fournisseur = 1;
|
||||||
|
|
||||||
@ -405,8 +403,18 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
|
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
|
||||||
$bookkeeping->thirdparty_code = $companystatic->code_fournisseur;
|
$bookkeeping->thirdparty_code = $companystatic->code_fournisseur;
|
||||||
|
|
||||||
|
if (!empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT)) {
|
||||||
|
if ($k == getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT')) {
|
||||||
|
$bookkeeping->subledger_account = $tabcompany[$key]['code_compta'];
|
||||||
|
$bookkeeping->subledger_label = $tabcompany[$key]['name'];
|
||||||
|
} else {
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
$bookkeeping->subledger_label = '';
|
$bookkeeping->subledger_label = '';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$bookkeeping->subledger_account = '';
|
||||||
|
$bookkeeping->subledger_label = '';
|
||||||
|
}
|
||||||
|
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->label_compte = $label_account;
|
$bookkeeping->label_compte = $label_account;
|
||||||
@ -626,9 +634,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
foreach ($tabfac as $key => $val) {
|
foreach ($tabfac as $key => $val) {
|
||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
|
|
||||||
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
|
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
|
||||||
$companystatic->code_client = $tabcompany[$key]['code_client'];
|
|
||||||
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
|
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
|
||||||
$companystatic->fournisseur = 1;
|
$companystatic->fournisseur = 1;
|
||||||
|
|
||||||
@ -757,7 +763,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$periodlink = '';
|
$periodlink = '';
|
||||||
$exportlink = '';
|
$exportlink = '';
|
||||||
$builddate = dol_now();
|
$builddate = dol_now();
|
||||||
$description .= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
|
$description = $langs->trans("DescJournalOnlyBindedVisible").'<br>';
|
||||||
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
$description .= $langs->trans("DepositsAreNotIncluded");
|
$description .= $langs->trans("DepositsAreNotIncluded");
|
||||||
} else {
|
} else {
|
||||||
@ -837,9 +843,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
foreach ($tabfac as $key => $val) {
|
foreach ($tabfac as $key => $val) {
|
||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
|
|
||||||
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
|
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
|
||||||
$companystatic->code_client = $tabcompany[$key]['code_client'];
|
|
||||||
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
|
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
|
||||||
$companystatic->fournisseur = 1;
|
$companystatic->fournisseur = 1;
|
||||||
|
|
||||||
@ -952,6 +956,13 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
// Subledger account
|
// Subledger account
|
||||||
print "<td>";
|
print "<td>";
|
||||||
|
if (!empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT)) {
|
||||||
|
if ($k == getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT')) {
|
||||||
|
print length_accounta($tabcompany[$key]['code_compta']);
|
||||||
|
}
|
||||||
|
} elseif (($accountoshow == "") || $accountoshow == 'NotDefined') {
|
||||||
|
print '<span class="error">' . $langs->trans("ThirdpartyAccountNotDefined") . '</span>';
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
* \brief Page with sells journal
|
* \brief Page with sells journal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
@ -310,9 +311,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
|
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
|
||||||
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
|
|
||||||
$companystatic->code_client = $tabcompany[$key]['code_client'];
|
$companystatic->code_client = $tabcompany[$key]['code_client'];
|
||||||
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
|
|
||||||
$companystatic->client = 3;
|
$companystatic->client = 3;
|
||||||
|
|
||||||
$invoicestatic->id = $key;
|
$invoicestatic->id = $key;
|
||||||
@ -600,9 +599,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
|
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
|
||||||
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
|
|
||||||
$companystatic->code_client = $tabcompany[$key]['code_client'];
|
$companystatic->code_client = $tabcompany[$key]['code_client'];
|
||||||
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
|
|
||||||
$companystatic->client = 3;
|
$companystatic->client = 3;
|
||||||
|
|
||||||
$invoicestatic->id = $key;
|
$invoicestatic->id = $key;
|
||||||
@ -790,9 +787,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
|
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
|
||||||
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
|
|
||||||
$companystatic->code_client = $tabcompany[$key]['code_client'];
|
$companystatic->code_client = $tabcompany[$key]['code_client'];
|
||||||
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
|
|
||||||
$companystatic->client = 3;
|
$companystatic->client = 3;
|
||||||
|
|
||||||
$invoicestatic->id = $key;
|
$invoicestatic->id = $key;
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
* \brief Page of a journal
|
* \brief Page of a journal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
@ -51,7 +52,7 @@ if ($result > 0) {
|
|||||||
} elseif ($result < 0) {
|
} elseif ($result < 0) {
|
||||||
dol_print_error('', $object->error, $object->errors);
|
dol_print_error('', $object->error, $object->errors);
|
||||||
} elseif ($result == 0) {
|
} elseif ($result == 0) {
|
||||||
accessforbidden($langs->trans('ErrorRecordNotFound'));
|
accessforbidden('ErrorRecordNotFound');
|
||||||
}
|
}
|
||||||
|
|
||||||
$hookmanager->initHooks(array('globaljournal', $object->nature.'journal'));
|
$hookmanager->initHooks(array('globaljournal', $object->nature.'journal'));
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
* \brief Home supplier journalization page
|
* \brief Home supplier journalization page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
* \brief Page to setup the module Foundation
|
* \brief Page to setup the module Foundation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
@ -111,7 +112,7 @@ if ($action == 'set_default') {
|
|||||||
if (isModEnabled('facture')) {
|
if (isModEnabled('facture')) {
|
||||||
$res4 = dolibarr_set_const($db, 'ADHERENT_VAT_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_VAT_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$res4 = dolibarr_set_const($db, 'ADHERENT_VAT_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_VAT_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
$res5 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$res5 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
|
if (isModEnabled("product") || isModEnabled("service")) {
|
||||||
$res6 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$res6 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -238,13 +239,13 @@ print "</td></tr>\n";
|
|||||||
// Insert subscription into bank account
|
// Insert subscription into bank account
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("MoreActionsOnSubscription").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("MoreActionsOnSubscription").'</td>';
|
||||||
$arraychoices = array('0'=>$langs->trans("None"));
|
$arraychoices = array('0'=>$langs->trans("None"));
|
||||||
if (!empty($conf->banque->enabled)) {
|
if (isModEnabled("banque")) {
|
||||||
$arraychoices['bankdirect'] = $langs->trans("MoreActionBankDirect");
|
$arraychoices['bankdirect'] = $langs->trans("MoreActionBankDirect");
|
||||||
}
|
}
|
||||||
if (!empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) {
|
if (isModEnabled("banque") && isModEnabled("societe") && isModEnabled('facture')) {
|
||||||
$arraychoices['invoiceonly'] = $langs->trans("MoreActionInvoiceOnly");
|
$arraychoices['invoiceonly'] = $langs->trans("MoreActionInvoiceOnly");
|
||||||
}
|
}
|
||||||
if (!empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) {
|
if (isModEnabled("banque") && isModEnabled("societe") && isModEnabled('facture')) {
|
||||||
$arraychoices['bankviainvoice'] = $langs->trans("MoreActionBankViaInvoice");
|
$arraychoices['bankviainvoice'] = $langs->trans("MoreActionBankViaInvoice");
|
||||||
}
|
}
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -258,7 +259,7 @@ print "</tr>\n";
|
|||||||
// Use vat for invoice creation
|
// Use vat for invoice creation
|
||||||
if (isModEnabled('facture')) {
|
if (isModEnabled('facture')) {
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("VATToUseForSubscriptions").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("VATToUseForSubscriptions").'</td>';
|
||||||
if (!empty($conf->banque->enabled)) {
|
if (isModEnabled("banque")) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->selectarray('ADHERENT_VAT_FOR_SUBSCRIPTIONS', array('0'=>$langs->trans("NoVatOnSubscription"), 'defaultforfoundationcountry'=>$langs->trans("Default")), (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) ? '0' : $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS), 0);
|
print $form->selectarray('ADHERENT_VAT_FOR_SUBSCRIPTIONS', array('0'=>$langs->trans("NoVatOnSubscription"), 'defaultforfoundationcountry'=>$langs->trans("Default")), (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) ? '0' : $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS), 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -269,7 +270,7 @@ if (isModEnabled('facture')) {
|
|||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
|
if (isModEnabled("product") || isModEnabled("service")) {
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$selected = (empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) ? '' : $conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
$selected = (empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) ? '' : $conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
||||||
|
|||||||
@ -29,6 +29,7 @@
|
|||||||
* \brief Page to setup the module Foundation
|
* \brief Page to setup the module Foundation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
* \brief Page to setup extra fields of members
|
* \brief Page to setup extra fields of members
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
@ -81,14 +82,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
|||||||
print dol_get_fiche_end();
|
print dol_get_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
// Buttons
|
|
||||||
if ($action != 'create' && $action != 'edit') {
|
|
||||||
print '<div class="tabsAction">';
|
|
||||||
print '<a class="butAction reposition" href="'.$_SERVER["PHP_SELF"].'?action=create">'.$langs->trans("NewAttribute").'</a>';
|
|
||||||
print "</div>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Creation of an optional field
|
// Creation of an optional field
|
||||||
if ($action == 'create') {
|
if ($action == 'create') {
|
||||||
print '<div name="topofform"></div><br>';
|
print '<div name="topofform"></div><br>';
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
* \brief Page to setup extra fields of members
|
* \brief Page to setup extra fields of members
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
@ -84,14 +85,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
|||||||
print dol_get_fiche_end();
|
print dol_get_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
// Buttons
|
|
||||||
if ($action != 'create' && $action != 'edit') {
|
|
||||||
print '<div class="tabsAction">';
|
|
||||||
print '<a class="butAction reposition" href="'.$_SERVER["PHP_SELF"].'?action=create">'.$langs->trans("NewAttribute").'</a>';
|
|
||||||
print "</div>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Creation of an optional field
|
// Creation of an optional field
|
||||||
if ($action == 'create') {
|
if ($action == 'create') {
|
||||||
print "<br>";
|
print "<br>";
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
* \brief File of main public page for member module
|
* \brief File of main public page for member module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
@ -58,6 +59,7 @@ if ($action == 'update') {
|
|||||||
$public = GETPOST('MEMBER_ENABLE_PUBLIC');
|
$public = GETPOST('MEMBER_ENABLE_PUBLIC');
|
||||||
$amount = price2num(GETPOST('MEMBER_NEWFORM_AMOUNT'), 'MT', 2);
|
$amount = price2num(GETPOST('MEMBER_NEWFORM_AMOUNT'), 'MT', 2);
|
||||||
$editamount = GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
|
$editamount = GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
|
||||||
|
$publiccounters = GETPOST('MEMBER_COUNTERS_ARE_PUBLIC');
|
||||||
$payonline = GETPOST('MEMBER_NEWFORM_PAYONLINE');
|
$payonline = GETPOST('MEMBER_NEWFORM_PAYONLINE');
|
||||||
$forcetype = GETPOST('MEMBER_NEWFORM_FORCETYPE', 'int');
|
$forcetype = GETPOST('MEMBER_NEWFORM_FORCETYPE', 'int');
|
||||||
$forcemorphy = GETPOST('MEMBER_NEWFORM_FORCEMORPHY', 'aZ09');
|
$forcemorphy = GETPOST('MEMBER_NEWFORM_FORCEMORPHY', 'aZ09');
|
||||||
@ -65,6 +67,7 @@ if ($action == 'update') {
|
|||||||
$res = dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC", $public, 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC", $public, 'chaine', 0, '', $conf->entity);
|
||||||
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT", $amount, 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT", $amount, 'chaine', 0, '', $conf->entity);
|
||||||
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_EDITAMOUNT", $editamount, 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_EDITAMOUNT", $editamount, 'chaine', 0, '', $conf->entity);
|
||||||
|
$res = dolibarr_set_const($db, "MEMBER_COUNTERS_ARE_PUBLIC", $publiccounters, 'chaine', 0, '', $conf->entity);
|
||||||
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE", $payonline, 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE", $payonline, 'chaine', 0, '', $conf->entity);
|
||||||
if ($forcetype < 0) {
|
if ($forcetype < 0) {
|
||||||
$res = dolibarr_del_const($db, "MEMBER_NEWFORM_FORCETYPE", $conf->entity);
|
$res = dolibarr_del_const($db, "MEMBER_NEWFORM_FORCETYPE", $conf->entity);
|
||||||
@ -167,10 +170,30 @@ if (empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
|||||||
print $enabledisablehtml;
|
print $enabledisablehtml;
|
||||||
print '<input type="hidden" id="MEMBER_ENABLE_PUBLIC" name="MEMBER_ENABLE_PUBLIC" value="'.(empty($conf->global->MEMBER_ENABLE_PUBLIC) ? 0 : 1).'">';
|
print '<input type="hidden" id="MEMBER_ENABLE_PUBLIC" name="MEMBER_ENABLE_PUBLIC" value="'.(empty($conf->global->MEMBER_ENABLE_PUBLIC) ? 0 : 1).'">';
|
||||||
|
|
||||||
|
print '<br><br>';
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
||||||
|
print '<br>';
|
||||||
|
//print $langs->trans('FollowingLinksArePublic').'<br>';
|
||||||
|
print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans('BlankSubscriptionForm').'</span><br>';
|
||||||
|
if (isModEnabled('multicompany')) {
|
||||||
|
$entity_qr = '?entity='.$conf->entity;
|
||||||
|
} else {
|
||||||
|
$entity_qr = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define $urlwithroot
|
||||||
|
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
||||||
|
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||||
|
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||||
|
|
||||||
|
print '<div class="urllink">';
|
||||||
|
print '<input type="text" id="publicurlmember" class="quatrevingtpercentminusx" value="'.$urlwithroot.'/public/members/new.php'.$entity_qr.'">';
|
||||||
|
print '<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.'/public/members/new.php'.$entity_qr.'">'.img_picto('', 'globe', 'class="paddingleft"').'</a>';
|
||||||
|
print '</div>';
|
||||||
|
print ajax_autoselect('publicurlmember');
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
@ -216,6 +239,13 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
|||||||
print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT", (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT) ? $conf->global->MEMBER_NEWFORM_EDITAMOUNT : 0), 1);
|
print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT", (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT) ? $conf->global->MEMBER_NEWFORM_EDITAMOUNT : 0), 1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
|
// SHow counter of validated members publicly
|
||||||
|
print '<tr class="oddeven" id="tredit"><td>';
|
||||||
|
print $langs->trans("MemberCountersArePublic");
|
||||||
|
print '</td><td>';
|
||||||
|
print $form->selectyesno("MEMBER_COUNTERS_ARE_PUBLIC", (!empty($conf->global->MEMBER_COUNTERS_ARE_PUBLIC) ? $conf->global->MEMBER_COUNTERS_ARE_PUBLIC : 0), 1);
|
||||||
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Jump to an online payment page
|
// Jump to an online payment page
|
||||||
print '<tr class="oddeven" id="trpayment"><td>';
|
print '<tr class="oddeven" id="trpayment"><td>';
|
||||||
print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
|
print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
|
||||||
@ -223,13 +253,13 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
|||||||
$listofval = array();
|
$listofval = array();
|
||||||
$listofval['-1'] = $langs->trans('No');
|
$listofval['-1'] = $langs->trans('No');
|
||||||
$listofval['all'] = $langs->trans('Yes').' ('.$langs->trans("VisitorCanChooseItsPaymentMode").')';
|
$listofval['all'] = $langs->trans('Yes').' ('.$langs->trans("VisitorCanChooseItsPaymentMode").')';
|
||||||
if (!empty($conf->paybox->enabled)) {
|
if (isModEnabled('paybox')) {
|
||||||
$listofval['paybox'] = 'Paybox';
|
$listofval['paybox'] = 'Paybox';
|
||||||
}
|
}
|
||||||
if (!empty($conf->paypal->enabled)) {
|
if (isModEnabled('paypal')) {
|
||||||
$listofval['paypal'] = 'PayPal';
|
$listofval['paypal'] = 'PayPal';
|
||||||
}
|
}
|
||||||
if (!empty($conf->stripe->enabled)) {
|
if (isModEnabled('stripe')) {
|
||||||
$listofval['stripe'] = 'Stripe';
|
$listofval['stripe'] = 'Stripe';
|
||||||
}
|
}
|
||||||
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE", $listofval, (!empty($conf->global->MEMBER_NEWFORM_PAYONLINE) ? $conf->global->MEMBER_NEWFORM_PAYONLINE : ''), 0);
|
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE", $listofval, (!empty($conf->global->MEMBER_NEWFORM_PAYONLINE) ? $conf->global->MEMBER_NEWFORM_PAYONLINE : ''), 0);
|
||||||
@ -248,29 +278,6 @@ print dol_get_fiche_end();
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
|
||||||
if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
|
||||||
print '<br>';
|
|
||||||
//print $langs->trans('FollowingLinksArePublic').'<br>';
|
|
||||||
print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans('BlankSubscriptionForm').'</span><br>';
|
|
||||||
if (!empty($conf->multicompany->enabled)) {
|
|
||||||
$entity_qr = '?entity='.$conf->entity;
|
|
||||||
} else {
|
|
||||||
$entity_qr = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define $urlwithroot
|
|
||||||
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
|
||||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
|
||||||
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
|
||||||
|
|
||||||
print '<div class="urllink">';
|
|
||||||
print '<input type="text" id="publicurlmember" class="quatrevingtpercentminusx" value="'.$urlwithroot.'/public/members/new.php'.$entity_qr.'">';
|
|
||||||
print '<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.'/public/members/new.php'.$entity_qr.'">'.img_picto('', 'globe', 'class="paddingleft"').'</a>';
|
|
||||||
print '</div>';
|
|
||||||
print ajax_autoselect('publicurlmember');
|
|
||||||
}
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -26,18 +26,21 @@
|
|||||||
* \brief Page of members events
|
* \brief Page of members events
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("companies", "members"));
|
$langs->loadLangs(array('companies', 'members'));
|
||||||
|
|
||||||
|
// Get Parameters
|
||||||
$id = GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('rowid', 'int');
|
$id = GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('rowid', 'int');
|
||||||
|
|
||||||
|
// Pagination
|
||||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||||
@ -71,6 +74,7 @@ $objcanvas = null;
|
|||||||
// Security check
|
// Security check
|
||||||
$result = restrictedArea($user, 'adherent', $id);
|
$result = restrictedArea($user, 'adherent', $id);
|
||||||
|
|
||||||
|
// Initialize technical objects
|
||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
@ -115,9 +119,7 @@ $contactstatic = new Contact($db);
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
/*
|
|
||||||
* Customer and/or supplier category sheet
|
|
||||||
*/
|
|
||||||
if ($object->id > 0) {
|
if ($object->id > 0) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
@ -130,7 +132,7 @@ if ($object->id > 0) {
|
|||||||
|
|
||||||
llxHeader("", $title, $help_url);
|
llxHeader("", $title, $help_url);
|
||||||
|
|
||||||
if (!empty($conf->notification->enabled)) {
|
if (isModEnabled('notification')) {
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
}
|
}
|
||||||
$head = member_prepare_head($object);
|
$head = member_prepare_head($object);
|
||||||
|
|||||||
@ -65,7 +65,7 @@ abstract class ActionsAdherentCardCommon
|
|||||||
|
|
||||||
/*if (is_object($this->object) && method_exists($this->object,'fetch'))
|
/*if (is_object($this->object) && method_exists($this->object,'fetch'))
|
||||||
{
|
{
|
||||||
if (! empty($id)) $this->object->fetch($id);
|
if (!empty($id)) $this->object->fetch($id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{*/
|
{*/
|
||||||
@ -179,7 +179,7 @@ abstract class ActionsAdherentCardCommon
|
|||||||
|
|
||||||
if ($action == 'view' || $action == 'edit' || $action == 'delete') {
|
if ($action == 'view' || $action == 'edit' || $action == 'delete') {
|
||||||
// Emailing
|
// Emailing
|
||||||
if (!empty($conf->mailing->enabled)) {
|
if (isModEnabled('mailing')) {
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
$this->tpl['nb_emailing'] = $this->object->getNbOfEMailings();
|
$this->tpl['nb_emailing'] = $this->object->getNbOfEMailings();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2012 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2012-2022 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -124,7 +124,7 @@ if (!empty($this->control->tpl['action_delete'])) {
|
|||||||
if (empty($user->socid)) {
|
if (empty($user->socid)) {
|
||||||
echo '<div class="tabsAction">';
|
echo '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($user->rights->adherent->creer) {
|
if ($user->hasRight('adherent', 'creer')) {
|
||||||
echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
|
echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,8 @@
|
|||||||
* \brief Page of a member
|
* \brief Page of a member
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
@ -40,12 +42,16 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
|
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("companies", "bills", "members", "users", "other", "paypal"));
|
$langs->loadLangs(array("companies", "bills", "members", "users", "other", "paypal"));
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
@ -57,7 +63,7 @@ $userid = GETPOST('userid', 'int');
|
|||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
|
|
||||||
if (!empty($conf->mailmanspip->enabled)) {
|
if (isModEnabled('mailmanspip')) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
|
||||||
|
|
||||||
$langs->load('mailmanspip');
|
$langs->load('mailmanspip');
|
||||||
@ -104,10 +110,10 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define variables to determine what the current user can do on the members
|
// Define variables to determine what the current user can do on the members
|
||||||
$canaddmember = $user->rights->adherent->creer;
|
$canaddmember = $user->hasRight('adherent', 'creer');
|
||||||
// Define variables to determine what the current user can do on the properties of a member
|
// Define variables to determine what the current user can do on the properties of a member
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$caneditfieldmember = $user->rights->adherent->creer;
|
$caneditfieldmember = $user->hasRight('adherent', 'creer');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@ -240,7 +246,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'update' && !$cancel && $user->rights->adherent->creer) {
|
if ($action == 'update' && !$cancel && $user->hasRight('adherent', 'creer')) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
$birthdate = '';
|
$birthdate = '';
|
||||||
@ -277,7 +283,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
// Create new object
|
// Create new object
|
||||||
if ($result > 0 && !$error) {
|
if ($result > 0 && !$error) {
|
||||||
$object->oldcopy = clone $object;
|
$object->oldcopy = dol_clone($object);
|
||||||
|
|
||||||
// Change values
|
// Change values
|
||||||
$object->civility_id = trim(GETPOST("civility_id", 'alphanohtml'));
|
$object->civility_id = trim(GETPOST("civility_id", 'alphanohtml'));
|
||||||
@ -312,7 +318,7 @@ if (empty($reshook)) {
|
|||||||
//$object->facebook = trim(GETPOST("facebook", 'alpha'));
|
//$object->facebook = trim(GETPOST("facebook", 'alpha'));
|
||||||
//$object->linkedin = trim(GETPOST("linkedin", 'alpha'));
|
//$object->linkedin = trim(GETPOST("linkedin", 'alpha'));
|
||||||
$object->birth = $birthdate;
|
$object->birth = $birthdate;
|
||||||
|
$object->default_lang = GETPOST('default_lang', 'alpha');
|
||||||
$object->typeid = GETPOST("typeid", 'int');
|
$object->typeid = GETPOST("typeid", 'int');
|
||||||
//$object->note = trim(GETPOST("comment","alpha"));
|
//$object->note = trim(GETPOST("comment","alpha"));
|
||||||
$object->morphy = GETPOST("morphy", 'alpha');
|
$object->morphy = GETPOST("morphy", 'alpha');
|
||||||
@ -415,7 +421,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'add' && $user->rights->adherent->creer) {
|
if ($action == 'add' && $user->hasRight('adherent', 'creer')) {
|
||||||
if ($canvas) {
|
if ($canvas) {
|
||||||
$object->canvas = $canvas;
|
$object->canvas = $canvas;
|
||||||
}
|
}
|
||||||
@ -457,6 +463,7 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
$userid = GETPOST("userid", 'int');
|
$userid = GETPOST("userid", 'int');
|
||||||
$socid = GETPOST("socid", 'int');
|
$socid = GETPOST("socid", 'int');
|
||||||
|
$default_lang = GETPOST('default_lang', 'alpha');
|
||||||
|
|
||||||
$object->civility_id = $civility_id;
|
$object->civility_id = $civility_id;
|
||||||
$object->firstname = $firstname;
|
$object->firstname = $firstname;
|
||||||
@ -473,7 +480,7 @@ if (empty($reshook)) {
|
|||||||
$object->phone_perso = $phone_perso;
|
$object->phone_perso = $phone_perso;
|
||||||
$object->phone_mobile = $phone_mobile;
|
$object->phone_mobile = $phone_mobile;
|
||||||
$object->socialnetworks = array();
|
$object->socialnetworks = array();
|
||||||
if (!empty($conf->socialnetworks->enabled)) {
|
if (isModEnabled('socialnetworks')) {
|
||||||
foreach ($socialnetworks as $key => $value) {
|
foreach ($socialnetworks as $key => $value) {
|
||||||
if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') {
|
if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') {
|
||||||
$object->socialnetworks[$key] = GETPOST("member_".$key, 'alphanohtml');
|
$object->socialnetworks[$key] = GETPOST("member_".$key, 'alphanohtml');
|
||||||
@ -498,7 +505,7 @@ if (empty($reshook)) {
|
|||||||
$object->user_id = $userid;
|
$object->user_id = $userid;
|
||||||
$object->socid = $socid;
|
$object->socid = $socid;
|
||||||
$object->public = $public;
|
$object->public = $public;
|
||||||
|
$object->default_lang = $default_lang;
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||||
if ($ret < 0) {
|
if ($ret < 0) {
|
||||||
@ -580,36 +587,15 @@ if (empty($reshook)) {
|
|||||||
$id = $object->id;
|
$id = $object->id;
|
||||||
} else {
|
} else {
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
if ($object->error) {
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
} else {
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Auto-create thirdparty on member creation
|
// Auto-create thirdparty on member creation
|
||||||
if (!empty($conf->global->ADHERENT_DEFAULT_CREATE_THIRDPARTY)) {
|
if (!empty($conf->global->ADHERENT_DEFAULT_CREATE_THIRDPARTY)) {
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
// User creation
|
// Create third party out of a member
|
||||||
$company = new Societe($db);
|
$company = new Societe($db);
|
||||||
|
$result = $company->create_from_member($object);
|
||||||
$companyalias = '';
|
|
||||||
$fullname = $object->getFullName($langs);
|
|
||||||
|
|
||||||
if ($object->morphy == 'mor') {
|
|
||||||
$companyname = $object->company;
|
|
||||||
if (!empty($fullname)) {
|
|
||||||
$companyalias = $fullname;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$companyname = $fullname;
|
|
||||||
if (!empty($object->company)) {
|
|
||||||
$companyalias = $object->company;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = $company->create_from_member($object, $companyname, $companyalias);
|
|
||||||
|
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessages($langs->trans($company->error), null, 'errors');
|
setEventMessages($langs->trans($company->error), null, 'errors');
|
||||||
@ -621,6 +607,11 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$action = ($result < 0 || !$error) ? '' : 'create';
|
$action = ($result < 0 || !$error) ? '' : 'create';
|
||||||
|
|
||||||
|
if (!$error && $backtopage) {
|
||||||
|
header("Location: ".$backtopage);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->adherent->supprimer && $action == 'confirm_delete' && $confirm == 'yes') {
|
if ($user->rights->adherent->supprimer && $action == 'confirm_delete' && $confirm == 'yes') {
|
||||||
@ -638,7 +629,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->adherent->creer && $action == 'confirm_valid' && $confirm == 'yes') {
|
if ($user->hasRight('adherent', 'creer') && $action == 'confirm_valid' && $confirm == 'yes') {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
@ -677,7 +668,8 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
if (empty($labeltouse) || (int) $labeltouse === -1) {
|
if (empty($labeltouse) || (int) $labeltouse === -1) {
|
||||||
//fallback on the old configuration.
|
//fallback on the old configuration.
|
||||||
setEventMessages('WarningMandatorySetupNotComplete', null, 'errors');
|
$langs->load("errors");
|
||||||
|
setEventMessages('<a href="'.DOL_URL_ROOT.'/adherents/admin/member_emails.php">'.$langs->trans('WarningMandatorySetupNotComplete').'</a>', null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
} else {
|
} else {
|
||||||
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object);
|
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object);
|
||||||
@ -862,7 +854,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->adherent->creer && $action == 'confirm_add_spip' && $confirm == 'yes') {
|
if ($user->hasRight('adherent', 'creer') && $action == 'confirm_add_spip' && $confirm == 'yes') {
|
||||||
if (!count($object->errors)) {
|
if (!count($object->errors)) {
|
||||||
if (!$mailmanspip->add_to_spip($object)) {
|
if (!$mailmanspip->add_to_spip($object)) {
|
||||||
setEventMessages($langs->trans('AddIntoSpipError').': '.$mailmanspip->error, null, 'errors');
|
setEventMessages($langs->trans('AddIntoSpipError').': '.$mailmanspip->error, null, 'errors');
|
||||||
@ -875,7 +867,7 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
// Actions to build doc
|
// Actions to build doc
|
||||||
$upload_dir = $conf->adherent->dir_output;
|
$upload_dir = $conf->adherent->dir_output;
|
||||||
$permissiontoadd = $user->rights->adherent->creer;
|
$permissiontoadd = $user->hasRight('adherent', 'creer');
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||||
|
|
||||||
// Actions to send emails
|
// Actions to send emails
|
||||||
@ -893,6 +885,7 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
|
$formadmin = new FormAdmin($db);
|
||||||
$formcompany = new FormCompany($db);
|
$formcompany = new FormCompany($db);
|
||||||
|
|
||||||
$title = $langs->trans("Member")." - ".$langs->trans("Card");
|
$title = $langs->trans("Member")." - ".$langs->trans("Card");
|
||||||
@ -1101,7 +1094,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
|
||||||
print '<td>'.img_picto('', 'object_phoning_mobile', 'class="pictofixedwidth"').'<input type="text" name="phone_mobile" size="20" value="'.(GETPOSTISSET('phone_mobile') ? GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td></tr>';
|
print '<td>'.img_picto('', 'object_phoning_mobile', 'class="pictofixedwidth"').'<input type="text" name="phone_mobile" size="20" value="'.(GETPOSTISSET('phone_mobile') ? GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td></tr>';
|
||||||
|
|
||||||
if (!empty($conf->socialnetworks->enabled)) {
|
if (isModEnabled('socialnetworks')) {
|
||||||
foreach ($socialnetworks as $key => $value) {
|
foreach ($socialnetworks as $key => $value) {
|
||||||
if (!$value['active']) {
|
if (!$value['active']) {
|
||||||
break;
|
break;
|
||||||
@ -1122,7 +1115,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||||
print '<tr><td>'.$form->editfieldkey("Categories", 'memcats', '', $object, 0).'</td><td>';
|
print '<tr><td>'.$form->editfieldkey("Categories", 'memcats', '', $object, 0).'</td><td>';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_MEMBER, null, 'parent', null, null, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_MEMBER, null, 'parent', null, null, 1);
|
||||||
print img_picto('', 'category').$form->multiselectarray('memcats', $cate_arbo, GETPOST('memcats', 'array'), null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
print img_picto('', 'category').$form->multiselectarray('memcats', $cate_arbo, GETPOST('memcats', 'array'), null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||||
@ -1229,7 +1222,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
|
||||||
if ($user->rights->adherent->creer) {
|
if ($user->hasRight('adherent', 'creer')) {
|
||||||
print $form->selectarray("typeid", $adht->liste_array(), (GETPOSTISSET("typeid") ? GETPOST("typeid", 'int') : $object->typeid), 0, 0, 0, '', 0, 0, 0, '', '', 1);
|
print $form->selectarray("typeid", $adht->liste_array(), (GETPOSTISSET("typeid") ? GETPOST("typeid", 'int') : $object->typeid), 0, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||||
} else {
|
} else {
|
||||||
print $adht->getNomUrl(1);
|
print $adht->getNomUrl(1);
|
||||||
@ -1343,7 +1336,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
|
||||||
print '<td>'.img_picto('', 'object_phoning_mobile', 'class="pictofixedwidth"').'<input type="text" name="phone_mobile" value="'.(GETPOSTISSET("phone_mobile") ? GETPOST("phone_mobile") : $object->phone_mobile).'"></td></tr>';
|
print '<td>'.img_picto('', 'object_phoning_mobile', 'class="pictofixedwidth"').'<input type="text" name="phone_mobile" value="'.(GETPOSTISSET("phone_mobile") ? GETPOST("phone_mobile") : $object->phone_mobile).'"></td></tr>';
|
||||||
|
|
||||||
if (!empty($conf->socialnetworks->enabled)) {
|
if (isModEnabled('socialnetworks')) {
|
||||||
foreach ($socialnetworks as $key => $value) {
|
foreach ($socialnetworks as $key => $value) {
|
||||||
if (!$value['active']) {
|
if (!$value['active']) {
|
||||||
break;
|
break;
|
||||||
@ -1357,13 +1350,21 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
print $form->selectDate(($object->birth ? $object->birth : -1), 'birth', '', '', 1, 'formsoc');
|
print $form->selectDate(($object->birth ? $object->birth : -1), 'birth', '', '', 1, 'formsoc');
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
|
// Default language
|
||||||
|
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||||
|
print '<tr><td>'.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).'</td><td colspan="3">'."\n";
|
||||||
|
print img_picto('', 'language').$formadmin->select_language($object->default_lang, 'default_lang', 0, 0, 1);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Public profil
|
// Public profil
|
||||||
print "<tr><td>".$langs->trans("Public")."</td><td>\n";
|
print "<tr><td>".$langs->trans("Public")."</td><td>\n";
|
||||||
print $form->selectyesno("public", (GETPOSTISSET("public") ? GETPOST("public", 'alphanohtml', 2) : $object->public), 1);
|
print $form->selectyesno("public", (GETPOSTISSET("public") ? GETPOST("public", 'alphanohtml', 2) : $object->public), 1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||||
print '<tr><td>'.$form->editfieldkey("Categories", 'memcats', '', $object, 0).'</td>';
|
print '<tr><td>'.$form->editfieldkey("Categories", 'memcats', '', $object, 0).'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_MEMBER, null, null, null, null, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_MEMBER, null, null, null, null, 1);
|
||||||
@ -1380,7 +1381,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Third party Dolibarr
|
// Third party Dolibarr
|
||||||
if (!empty($conf->societe->enabled)) {
|
if (isModEnabled('societe')) {
|
||||||
print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td colspan="2" class="valeur">';
|
print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td colspan="2" class="valeur">';
|
||||||
if ($object->socid) {
|
if ($object->socid) {
|
||||||
$company = new Societe($db);
|
$company = new Societe($db);
|
||||||
@ -1453,12 +1454,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
$formquestion = array(
|
$formquestion = array(
|
||||||
array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login)
|
array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login)
|
||||||
);
|
);
|
||||||
if (!empty($conf->societe->enabled) && $object->socid > 0) {
|
if (isModEnabled('societe') && $object->socid > 0) {
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
$formquestion[] = array('label' => $langs->trans("UserWillBe"), 'type' => 'radio', 'name' => 'internalorexternal', 'default'=>'external', 'values' => array('external'=>$langs->trans("External").' - '.$langs->trans("LinkedToDolibarrThirdParty").' '.$object->thirdparty->getNomUrl(1, '', 0, 1), 'internal'=>$langs->trans("Internal")));
|
$formquestion[] = array('label' => $langs->trans("UserWillBe"), 'type' => 'radio', 'name' => 'internalorexternal', 'default'=>'external', 'values' => array('external'=>$langs->trans("External").' - '.$langs->trans("LinkedToDolibarrThirdParty").' '.$object->thirdparty->getNomUrl(1, '', 0, 1), 'internal'=>$langs->trans("Internal")));
|
||||||
}
|
}
|
||||||
$text = '';
|
$text = '';
|
||||||
if (!empty($conf->societe->enabled) && $object->socid <= 0) {
|
if (isModEnabled('societe') && $object->socid <= 0) {
|
||||||
$text .= $langs->trans("UserWillBeInternalUser").'<br>';
|
$text .= $langs->trans("UserWillBeInternalUser").'<br>';
|
||||||
}
|
}
|
||||||
$text .= $langs->trans("ConfirmCreateLogin");
|
$text .= $langs->trans("ConfirmCreateLogin");
|
||||||
@ -1545,10 +1546,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
if ($object->email) {
|
if ($object->email) {
|
||||||
$formquestion[] = array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (getDolGlobalString('ADHERENT_DEFAULT_SENDINFOBYMAIL') ? true : false));
|
$formquestion[] = array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (getDolGlobalString('ADHERENT_DEFAULT_SENDINFOBYMAIL') ? true : false));
|
||||||
}
|
}
|
||||||
if (!empty($conf->mailman->enabled) && !empty($conf->global->ADHERENT_USE_MAILMAN)) {
|
if (isModEnabled('mailman') && !empty($conf->global->ADHERENT_USE_MAILMAN)) {
|
||||||
$formquestion[] = array('type'=>'other', 'label'=>$langs->transnoentitiesnoconv("SynchroMailManEnabled"), 'value'=>'');
|
$formquestion[] = array('type'=>'other', 'label'=>$langs->transnoentitiesnoconv("SynchroMailManEnabled"), 'value'=>'');
|
||||||
}
|
}
|
||||||
if (!empty($conf->mailman->enabled) && !empty($conf->global->ADHERENT_USE_SPIP)) {
|
if (isModEnabled('mailman') && !empty($conf->global->ADHERENT_USE_SPIP)) {
|
||||||
$formquestion[] = array('type'=>'other', 'label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"), 'value'=>'');
|
$formquestion[] = array('type'=>'other', 'label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"), 'value'=>'');
|
||||||
}
|
}
|
||||||
print $form->formconfirm("card.php?rowid=".$id, $langs->trans("ValidateMember"), $langs->trans("ConfirmValidateMember"), "confirm_valid", $formquestion, 'yes', 1, 220);
|
print $form->formconfirm("card.php?rowid=".$id, $langs->trans("ValidateMember"), $langs->trans("ConfirmValidateMember"), "confirm_valid", $formquestion, 'yes', 1, 220);
|
||||||
@ -1696,7 +1697,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
|
||||||
$rowspan++;
|
$rowspan++;
|
||||||
}
|
}
|
||||||
if (!empty($conf->societe->enabled)) {
|
if (isModEnabled('societe')) {
|
||||||
$rowspan++;
|
$rowspan++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1787,7 +1788,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
print '<table class="border tableforfield centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Tags / Categories
|
// Tags / Categories
|
||||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||||
print '<tr><td>'.$langs->trans("Categories").'</td>';
|
print '<tr><td>'.$langs->trans("Categories").'</td>';
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
print $form->showCategories($object->id, Categorie::TYPE_MEMBER, 1);
|
print $form->showCategories($object->id, Categorie::TYPE_MEMBER, 1);
|
||||||
@ -1797,6 +1798,19 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
// Birth Date
|
// Birth Date
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("DateOfBirth").'</td><td class="valeur">'.dol_print_date($object->birth, 'day').'</td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("DateOfBirth").'</td><td class="valeur">'.dol_print_date($object->birth, 'day').'</td></tr>';
|
||||||
|
|
||||||
|
// Default language
|
||||||
|
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
print '<tr><td>'.$langs->trans("DefaultLang").'</td><td>';
|
||||||
|
//$s=picto_from_langcode($object->default_lang);
|
||||||
|
//print ($s?$s.' ':'');
|
||||||
|
$langs->load("languages");
|
||||||
|
$labellang = ($object->default_lang ? $langs->trans('Language_'.$object->default_lang) : '');
|
||||||
|
print picto_from_langcode($object->default_lang, 'class="paddingrightonly saturatemedium opacitylow"');
|
||||||
|
print $labellang;
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
||||||
|
|
||||||
@ -1804,9 +1818,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|
||||||
// Third party Dolibarr
|
// Third party Dolibarr
|
||||||
if (!empty($conf->societe->enabled)) {
|
if (isModEnabled('societe')) {
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
$editenable = $user->rights->adherent->creer;
|
$editenable = $user->hasRight('adherent', 'creer');
|
||||||
print $form->editfieldkey('LinkedToDolibarrThirdParty', 'thirdparty', '', $object, $editenable);
|
print $form->editfieldkey('LinkedToDolibarrThirdParty', 'thirdparty', '', $object, $editenable);
|
||||||
print '</td><td colspan="2" class="valeur">';
|
print '</td><td colspan="2" class="valeur">';
|
||||||
if ($action == 'editthirdparty') {
|
if ($action == 'editthirdparty') {
|
||||||
@ -1843,7 +1857,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
// Login Dolibarr - Link to user
|
// Login Dolibarr - Link to user
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
$editenable = $user->rights->adherent->creer && $user->rights->user->user->creer;
|
$editenable = $user->hasRight('adherent', 'creer') && $user->rights->user->user->creer;
|
||||||
print $form->editfieldkey('LinkedToDolibarrUser', 'login', '', $object, $editenable);
|
print $form->editfieldkey('LinkedToDolibarrUser', 'login', '', $object, $editenable);
|
||||||
print '</td><td colspan="2" class="valeur">';
|
print '</td><td colspan="2" class="valeur">';
|
||||||
if ($action == 'editlogin') {
|
if ($action == 'editlogin') {
|
||||||
@ -1887,7 +1901,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
// Send card by email
|
// Send card by email
|
||||||
// TODO Remove this to replace with a template
|
// TODO Remove this to replace with a template
|
||||||
/*
|
/*
|
||||||
if ($user->rights->adherent->creer) {
|
if ($user->hasRight('adherent', 'creer')) {
|
||||||
if (Adherent::STATUS_VALIDATED == $object->statut) {
|
if (Adherent::STATUS_VALIDATED == $object->statut) {
|
||||||
if ($object->email) print '<a class="butAction" href="card.php?rowid='.$object->id.'&action=sendinfo">'.$langs->trans("SendCardByMail")."</a>\n";
|
if ($object->email) print '<a class="butAction" href="card.php?rowid='.$object->id.'&action=sendinfo">'.$langs->trans("SendCardByMail")."</a>\n";
|
||||||
else print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans("SendCardByMail")."</a>\n";
|
else print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans("SendCardByMail")."</a>\n";
|
||||||
@ -1899,7 +1913,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
// Modify
|
// Modify
|
||||||
if (!empty($user->rights->adherent->creer)) {
|
if ($user->hasRight('adherent', 'creer')) {
|
||||||
print '<a class="butAction" href="card.php?rowid='.$id.'&action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>'."\n";
|
print '<a class="butAction" href="card.php?rowid='.$id.'&action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>'."\n";
|
||||||
} else {
|
} else {
|
||||||
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Modify").'</span>'."\n";
|
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Modify").'</span>'."\n";
|
||||||
@ -1907,7 +1921,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
// Validate
|
// Validate
|
||||||
if (Adherent::STATUS_DRAFT == $object->statut) {
|
if (Adherent::STATUS_DRAFT == $object->statut) {
|
||||||
if ($user->rights->adherent->creer) {
|
if ($user->hasRight('adherent', 'creer')) {
|
||||||
print '<a class="butAction" href="card.php?rowid='.$id.'&action=valid">'.$langs->trans("Validate").'</a>'."\n";
|
print '<a class="butAction" href="card.php?rowid='.$id.'&action=valid">'.$langs->trans("Validate").'</a>'."\n";
|
||||||
} else {
|
} else {
|
||||||
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Validate").'</span>'."\n";
|
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Validate").'</span>'."\n";
|
||||||
@ -1916,7 +1930,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
// Reactivate
|
// Reactivate
|
||||||
if (Adherent::STATUS_RESILIATED == $object->statut || Adherent::STATUS_EXCLUDED == $object->statut) {
|
if (Adherent::STATUS_RESILIATED == $object->statut || Adherent::STATUS_EXCLUDED == $object->statut) {
|
||||||
if ($user->rights->adherent->creer) {
|
if ($user->hasRight('adherent', 'creer')) {
|
||||||
print '<a class="butAction" href="card.php?rowid='.$id.'&action=valid">'.$langs->trans("Reenable")."</a>\n";
|
print '<a class="butAction" href="card.php?rowid='.$id.'&action=valid">'.$langs->trans("Reenable")."</a>\n";
|
||||||
} else {
|
} else {
|
||||||
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Reenable").'</span>'."\n";
|
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Reenable").'</span>'."\n";
|
||||||
@ -1942,7 +1956,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create third party
|
// Create third party
|
||||||
if (!empty($conf->societe->enabled) && !$object->socid) {
|
if (isModEnabled('societe') && !$object->socid) {
|
||||||
if ($user->rights->societe->creer) {
|
if ($user->rights->societe->creer) {
|
||||||
if (Adherent::STATUS_DRAFT != $object->statut) {
|
if (Adherent::STATUS_DRAFT != $object->statut) {
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=create_thirdparty" title="'.dol_escape_htmltag($langs->trans("CreateDolibarrThirdPartyDesc")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>'."\n";
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=create_thirdparty" title="'.dol_escape_htmltag($langs->trans("CreateDolibarrThirdPartyDesc")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>'."\n";
|
||||||
@ -1968,7 +1982,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Action SPIP
|
// Action SPIP
|
||||||
if (!empty($conf->mailmanspip->enabled) && !empty($conf->global->ADHERENT_USE_SPIP)) {
|
if (isModEnabled('mailmanspip') && !empty($conf->global->ADHERENT_USE_SPIP)) {
|
||||||
$isinspip = $mailmanspip->is_in_spip($object);
|
$isinspip = $mailmanspip->is_in_spip($object);
|
||||||
|
|
||||||
if ($isinspip == 1) {
|
if ($isinspip == 1) {
|
||||||
@ -2008,7 +2022,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
$filedir = $conf->adherent->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, 'member');
|
$filedir = $conf->adherent->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, 'member');
|
||||||
$urlsource = $_SERVER['PHP_SELF'].'?id='.$object->id;
|
$urlsource = $_SERVER['PHP_SELF'].'?id='.$object->id;
|
||||||
$genallowed = $user->rights->adherent->lire;
|
$genallowed = $user->rights->adherent->lire;
|
||||||
$delallowed = $user->rights->adherent->creer;
|
$delallowed = $user->hasRight('adherent', 'creer');
|
||||||
|
|
||||||
print $formfile->showdocuments('member', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', (empty($object->default_lang) ? '' : $object->default_lang), '', $object);
|
print $formfile->showdocuments('member', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', (empty($object->default_lang) ? '' : $object->default_lang), '', $object);
|
||||||
$somethingshown = $formfile->numoffiles;
|
$somethingshown = $formfile->numoffiles;
|
||||||
@ -2025,13 +2039,18 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Show online payment link
|
// Show online payment link
|
||||||
$useonlinepayment = (!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled));
|
$useonlinepayment = (isModEnabled('paypal') || isModEnabled('stripe') || isModEnabled('paybox'));
|
||||||
|
|
||||||
if ($useonlinepayment) {
|
if ($useonlinepayment) {
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
if (empty($amount)) { // Take the maximum amount among what the member is supposed to pay / has paid in the past
|
||||||
|
$amount = price(max($adht->amount, $object->first_subscription_amount, $object->last_subscription_amount));
|
||||||
|
}
|
||||||
|
if (empty($amount)) {
|
||||||
|
$amount = 0;
|
||||||
|
}
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||||
print showOnlinePaymentUrl('membersubscription', $object->ref);
|
print showOnlinePaymentUrl('membersubscription', $object->ref, $amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div><div class="fichehalfright">';
|
print '</div><div class="fichehalfright">';
|
||||||
|
|||||||
@ -215,6 +215,12 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $public;
|
public $public;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default language code of member (en_US, ...)
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $default_lang;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string photo of member
|
* @var string photo of member
|
||||||
*/
|
*/
|
||||||
@ -328,8 +334,9 @@ class Adherent extends CommonObject
|
|||||||
'photo' => array('type' => 'varchar(255)', 'label' => 'Photo', 'enabled' => 1, 'visible' => -1, 'position' => 135),
|
'photo' => array('type' => 'varchar(255)', 'label' => 'Photo', 'enabled' => 1, 'visible' => -1, 'position' => 135),
|
||||||
'public' => array('type' => 'smallint(6)', 'label' => 'Public', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 145),
|
'public' => array('type' => 'smallint(6)', 'label' => 'Public', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 145),
|
||||||
'datefin' => array('type' => 'datetime', 'label' => 'DateEnd', 'enabled' => 1, 'visible' => -1, 'position' => 150),
|
'datefin' => array('type' => 'datetime', 'label' => 'DateEnd', 'enabled' => 1, 'visible' => -1, 'position' => 150),
|
||||||
'note_private' => array('type' => 'text', 'label' => 'NotePrivate', 'enabled' => 1, 'visible' => 0, 'position' => 155),
|
'default_lang' =>array('type'=>'varchar(6)', 'label'=>'Default lang', 'enabled'=>1, 'visible'=>-1, 'position'=> 153),
|
||||||
'note_public' => array('type' => 'text', 'label' => 'NotePublic', 'enabled' => 1, 'visible' => 0, 'position' => 160),
|
'note_public' => array('type' => 'text', 'label' => 'NotePublic', 'enabled' => 1, 'visible' => 0, 'position' => 155),
|
||||||
|
'note_private' => array('type' => 'text', 'label' => 'NotePrivate', 'enabled' => 1, 'visible' => 0, 'position' => 160),
|
||||||
'datevalid' => array('type' => 'datetime', 'label' => 'DateValidation', 'enabled' => 1, 'visible' => -1, 'position' => 165),
|
'datevalid' => array('type' => 'datetime', 'label' => 'DateValidation', 'enabled' => 1, 'visible' => -1, 'position' => 165),
|
||||||
'datec' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => -1, 'position' => 170),
|
'datec' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => -1, 'position' => 170),
|
||||||
'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 175),
|
'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 175),
|
||||||
@ -672,11 +679,10 @@ class Adherent extends CommonObject
|
|||||||
$this->town = ($this->town ? $this->town : $this->town);
|
$this->town = ($this->town ? $this->town : $this->town);
|
||||||
$this->country_id = ($this->country_id > 0 ? $this->country_id : $this->country_id);
|
$this->country_id = ($this->country_id > 0 ? $this->country_id : $this->country_id);
|
||||||
$this->state_id = ($this->state_id > 0 ? $this->state_id : $this->state_id);
|
$this->state_id = ($this->state_id > 0 ? $this->state_id : $this->state_id);
|
||||||
$this->setUpperOrLowerCase();
|
|
||||||
$this->note_public = ($this->note_public ? $this->note_public : $this->note_public);
|
$this->note_public = ($this->note_public ? $this->note_public : $this->note_public);
|
||||||
$this->note_private = ($this->note_private ? $this->note_private : $this->note_private);
|
$this->note_private = ($this->note_private ? $this->note_private : $this->note_private);
|
||||||
$this->url = $this->url ?clean_url($this->url, 0) : '';
|
$this->url = $this->url ?clean_url($this->url, 0) : '';
|
||||||
|
$this->setUpperOrLowerCase();
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if (!empty($conf->global->ADHERENT_MAIL_REQUIRED) && !isValidEMail($this->email)) {
|
if (!empty($conf->global->ADHERENT_MAIL_REQUIRED) && !isValidEMail($this->email)) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
@ -713,9 +719,11 @@ class Adherent extends CommonObject
|
|||||||
$sql .= ", photo = ".($this->photo ? "'".$this->db->escape($this->photo)."'" : "null");
|
$sql .= ", photo = ".($this->photo ? "'".$this->db->escape($this->photo)."'" : "null");
|
||||||
$sql .= ", public = '".$this->db->escape($this->public)."'";
|
$sql .= ", public = '".$this->db->escape($this->public)."'";
|
||||||
$sql .= ", statut = ".$this->db->escape($this->statut);
|
$sql .= ", statut = ".$this->db->escape($this->statut);
|
||||||
|
$sql .= ", default_lang = ".(!empty($this->default_lang) ? "'".$this->db->escape($this->default_lang)."'" : "null");
|
||||||
$sql .= ", fk_adherent_type = ".$this->db->escape($this->typeid);
|
$sql .= ", fk_adherent_type = ".$this->db->escape($this->typeid);
|
||||||
$sql .= ", morphy = '".$this->db->escape($this->morphy)."'";
|
$sql .= ", morphy = '".$this->db->escape($this->morphy)."'";
|
||||||
$sql .= ", birth = ".($this->birth ? "'".$this->db->idate($this->birth)."'" : "null");
|
$sql .= ", birth = ".($this->birth ? "'".$this->db->idate($this->birth)."'" : "null");
|
||||||
|
|
||||||
if ($this->datefin) {
|
if ($this->datefin) {
|
||||||
$sql .= ", datefin = '".$this->db->idate($this->datefin)."'"; // Must be modified only when deleting a subscription
|
$sql .= ", datefin = '".$this->db->idate($this->datefin)."'"; // Must be modified only when deleting a subscription
|
||||||
}
|
}
|
||||||
@ -836,6 +844,8 @@ class Adherent extends CommonObject
|
|||||||
$luser->office_phone = $this->phone;
|
$luser->office_phone = $this->phone;
|
||||||
$luser->user_mobile = $this->phone_mobile;
|
$luser->user_mobile = $this->phone_mobile;
|
||||||
|
|
||||||
|
$luser->lang = $this->default_lang;
|
||||||
|
|
||||||
$luser->fk_member = $this->id;
|
$luser->fk_member = $this->id;
|
||||||
|
|
||||||
$result = $luser->update($user, 0, 1, 1); // Use nosync to 1 to avoid cyclic updates
|
$result = $luser->update($user, 0, 1, 1); // Use nosync to 1 to avoid cyclic updates
|
||||||
@ -871,6 +881,7 @@ class Adherent extends CommonObject
|
|||||||
$lthirdparty->state_id = $this->state_id;
|
$lthirdparty->state_id = $this->state_id;
|
||||||
$lthirdparty->country_id = $this->country_id;
|
$lthirdparty->country_id = $this->country_id;
|
||||||
//$lthirdparty->phone_mobile=$this->phone_mobile;
|
//$lthirdparty->phone_mobile=$this->phone_mobile;
|
||||||
|
$lthirdparty->default_lang = $this->default_lang;
|
||||||
|
|
||||||
$result = $lthirdparty->update($this->fk_soc, $user, 0, 1, 1, 'update'); // Use sync to 0 to avoid cyclic updates
|
$result = $lthirdparty->update($this->fk_soc, $user, 0, 1, 1, 'update'); // Use sync to 0 to avoid cyclic updates
|
||||||
|
|
||||||
@ -1095,7 +1106,7 @@ class Adherent extends CommonObject
|
|||||||
// Mise a jour
|
// Mise a jour
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent";
|
||||||
$sql .= " SET pass_crypted = '".$this->db->escape($password_crypted)."'";
|
$sql .= " SET pass_crypted = '".$this->db->escape($password_crypted)."'";
|
||||||
//if (! empty($conf->global->DATABASE_PWD_ENCRYPTED))
|
//if (!empty($conf->global->DATABASE_PWD_ENCRYPTED))
|
||||||
if ($isencrypted) {
|
if ($isencrypted) {
|
||||||
$sql .= ", pass = null";
|
$sql .= ", pass = null";
|
||||||
} else {
|
} else {
|
||||||
@ -1317,7 +1328,7 @@ class Adherent extends CommonObject
|
|||||||
$sql .= " d.photo, d.fk_adherent_type, d.morphy, d.entity,";
|
$sql .= " d.photo, d.fk_adherent_type, d.morphy, d.entity,";
|
||||||
$sql .= " d.datec as datec,";
|
$sql .= " d.datec as datec,";
|
||||||
$sql .= " d.tms as datem,";
|
$sql .= " d.tms as datem,";
|
||||||
$sql .= " d.datefin as datefin,";
|
$sql .= " d.datefin as datefin, d.default_lang,";
|
||||||
$sql .= " d.birth as birthday,";
|
$sql .= " d.birth as birthday,";
|
||||||
$sql .= " d.datevalid as datev,";
|
$sql .= " d.datevalid as datev,";
|
||||||
$sql .= " d.country,";
|
$sql .= " d.country,";
|
||||||
@ -1394,7 +1405,7 @@ class Adherent extends CommonObject
|
|||||||
$this->email = $obj->email;
|
$this->email = $obj->email;
|
||||||
$this->url = $obj->url;
|
$this->url = $obj->url;
|
||||||
|
|
||||||
$this->socialnetworks = (array) json_decode($obj->socialnetworks, true);
|
$this->socialnetworks = ($obj->socialnetworks ? (array) json_decode($obj->socialnetworks, true) : array());
|
||||||
|
|
||||||
$this->photo = $obj->photo;
|
$this->photo = $obj->photo;
|
||||||
$this->statut = $obj->statut;
|
$this->statut = $obj->statut;
|
||||||
@ -1410,6 +1421,8 @@ class Adherent extends CommonObject
|
|||||||
$this->date_validation = $this->db->jdate($obj->datev);
|
$this->date_validation = $this->db->jdate($obj->datev);
|
||||||
$this->birth = $this->db->jdate($obj->birthday);
|
$this->birth = $this->db->jdate($obj->birthday);
|
||||||
|
|
||||||
|
$this->default_lang = $obj->default_lang;
|
||||||
|
|
||||||
$this->note_private = $obj->note_private;
|
$this->note_private = $obj->note_private;
|
||||||
$this->note_public = $obj->note_public;
|
$this->note_public = $obj->note_public;
|
||||||
$this->morphy = $obj->morphy;
|
$this->morphy = $obj->morphy;
|
||||||
@ -1762,7 +1775,7 @@ class Adherent extends CommonObject
|
|||||||
if (!$error) {
|
if (!$error) {
|
||||||
// Add line to draft invoice
|
// Add line to draft invoice
|
||||||
$idprodsubscription = 0;
|
$idprodsubscription = 0;
|
||||||
if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) {
|
if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (isModEnabled("product") || isModEnabled("service"))) {
|
||||||
$idprodsubscription = $conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS;
|
$idprodsubscription = $conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1854,10 +1867,10 @@ class Adherent extends CommonObject
|
|||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang = '';
|
$newlang = '';
|
||||||
$lang_id = GETPOST('lang_id');
|
$lang_id = GETPOST('lang_id');
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && !empty($lang_id)) {
|
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && !empty($lang_id)) {
|
||||||
$newlang = $lang_id;
|
$newlang = $lang_id;
|
||||||
}
|
}
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) {
|
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
|
||||||
$newlang = $customer->default_lang;
|
$newlang = $customer->default_lang;
|
||||||
}
|
}
|
||||||
if (!empty($newlang)) {
|
if (!empty($newlang)) {
|
||||||
@ -2046,7 +2059,7 @@ class Adherent extends CommonObject
|
|||||||
$err = 0;
|
$err = 0;
|
||||||
|
|
||||||
// mailman
|
// mailman
|
||||||
if (!empty($conf->global->ADHERENT_USE_MAILMAN) && !empty($conf->mailmanspip->enabled)) {
|
if (!empty($conf->global->ADHERENT_USE_MAILMAN) && isModEnabled('mailmanspip')) {
|
||||||
$result = $mailmanspip->add_to_mailman($this);
|
$result = $mailmanspip->add_to_mailman($this);
|
||||||
|
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
@ -2066,7 +2079,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// spip
|
// spip
|
||||||
if (!empty($conf->global->ADHERENT_USE_SPIP) && !empty($conf->mailmanspip->enabled)) {
|
if (!empty($conf->global->ADHERENT_USE_SPIP) && isModEnabled('mailmanspip')) {
|
||||||
$result = $mailmanspip->add_to_spip($this);
|
$result = $mailmanspip->add_to_spip($this);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$this->errors[] = $mailmanspip->error;
|
$this->errors[] = $mailmanspip->error;
|
||||||
@ -2117,7 +2130,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->global->ADHERENT_USE_SPIP && !empty($conf->mailmanspip->enabled)) {
|
if ($conf->global->ADHERENT_USE_SPIP && isModEnabled('mailmanspip')) {
|
||||||
$result = $mailmanspip->del_to_spip($this);
|
$result = $mailmanspip->del_to_spip($this);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$this->errors[] = $mailmanspip->error;
|
$this->errors[] = $mailmanspip->error;
|
||||||
@ -2559,6 +2572,7 @@ class Adherent extends CommonObject
|
|||||||
|
|
||||||
$this->datefin = $now;
|
$this->datefin = $now;
|
||||||
$this->datevalid = $now;
|
$this->datevalid = $now;
|
||||||
|
$this->default_lang = '';
|
||||||
|
|
||||||
$this->typeid = 1; // Id type adherent
|
$this->typeid = 1; // Id type adherent
|
||||||
$this->type = 'Type adherent'; // Libelle type adherent
|
$this->type = 'Type adherent'; // Libelle type adherent
|
||||||
|
|||||||
@ -94,6 +94,11 @@ class AdherentType extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $amount;
|
public $amount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Amount can be choosen by the visitor during subscription (0 or 1)
|
||||||
|
*/
|
||||||
|
public $caneditamount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Public note
|
* @var string Public note
|
||||||
* @deprecated
|
* @deprecated
|
||||||
@ -380,6 +385,7 @@ class AdherentType extends CommonObject
|
|||||||
$sql .= "morphy = '".$this->db->escape($this->morphy)."',";
|
$sql .= "morphy = '".$this->db->escape($this->morphy)."',";
|
||||||
$sql .= "subscription = '".$this->db->escape($this->subscription)."',";
|
$sql .= "subscription = '".$this->db->escape($this->subscription)."',";
|
||||||
$sql .= "amount = ".((empty($this->amount) && $this->amount == '') ? 'null' : ((float) $this->amount)).",";
|
$sql .= "amount = ".((empty($this->amount) && $this->amount == '') ? 'null' : ((float) $this->amount)).",";
|
||||||
|
$sql .= "caneditamount = ".((int) $this->caneditamount).",";
|
||||||
$sql .= "duration = '".$this->db->escape($this->duration_value.$this->duration_unit)."',";
|
$sql .= "duration = '".$this->db->escape($this->duration_value.$this->duration_unit)."',";
|
||||||
$sql .= "note = '".$this->db->escape($this->note_public)."',";
|
$sql .= "note = '".$this->db->escape($this->note_public)."',";
|
||||||
$sql .= "vote = ".(integer) $this->db->escape($this->vote).",";
|
$sql .= "vote = ".(integer) $this->db->escape($this->vote).",";
|
||||||
@ -391,7 +397,7 @@ class AdherentType extends CommonObject
|
|||||||
$this->description = $this->db->escape($this->note_public);
|
$this->description = $this->db->escape($this->note_public);
|
||||||
|
|
||||||
// Multilangs
|
// Multilangs
|
||||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||||
if ($this->setMultiLangs($user) < 0) {
|
if ($this->setMultiLangs($user) < 0) {
|
||||||
$this->error = $langs->trans("Error")." : ".$this->db->error()." - ".$sql;
|
$this->error = $langs->trans("Error")." : ".$this->db->error()." - ".$sql;
|
||||||
return -2;
|
return -2;
|
||||||
@ -475,7 +481,7 @@ class AdherentType extends CommonObject
|
|||||||
{
|
{
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
|
|
||||||
$sql = "SELECT d.rowid, d.libelle as label, d.morphy, d.statut as status, d.duration, d.subscription, d.amount, d.mail_valid, d.note as note_public, d.vote";
|
$sql = "SELECT d.rowid, d.libelle as label, d.morphy, d.statut as status, d.duration, d.subscription, d.amount, d.caneditamount, d.mail_valid, d.note as note_public, d.vote";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||||
$sql .= " WHERE d.rowid = ".(int) $rowid;
|
$sql .= " WHERE d.rowid = ".(int) $rowid;
|
||||||
|
|
||||||
@ -496,13 +502,14 @@ class AdherentType extends CommonObject
|
|||||||
$this->duration_unit = substr($obj->duration, -1);
|
$this->duration_unit = substr($obj->duration, -1);
|
||||||
$this->subscription = $obj->subscription;
|
$this->subscription = $obj->subscription;
|
||||||
$this->amount = $obj->amount;
|
$this->amount = $obj->amount;
|
||||||
|
$this->caneditamount = $obj->caneditamount;
|
||||||
$this->mail_valid = $obj->mail_valid;
|
$this->mail_valid = $obj->mail_valid;
|
||||||
$this->note = $obj->note_public; // deprecated
|
$this->note = $obj->note_public; // deprecated
|
||||||
$this->note_public = $obj->note_public;
|
$this->note_public = $obj->note_public;
|
||||||
$this->vote = $obj->vote;
|
$this->vote = $obj->vote;
|
||||||
|
|
||||||
// multilangs
|
// multilangs
|
||||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||||
$this->getMultiLangs();
|
$this->getMultiLangs();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -851,6 +858,7 @@ class AdherentType extends CommonObject
|
|||||||
$this->note_public = 'This is a public note';
|
$this->note_public = 'This is a public note';
|
||||||
$this->mail_valid = 'This is welcome email';
|
$this->mail_valid = 'This is welcome email';
|
||||||
$this->subscription = 1;
|
$this->subscription = 1;
|
||||||
|
$this->caneditamount = 0;
|
||||||
$this->vote = 0;
|
$this->vote = 0;
|
||||||
|
|
||||||
$this->status = 1;
|
$this->status = 1;
|
||||||
|
|||||||
@ -286,7 +286,7 @@ class Members extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function post($request_data = null)
|
public function post($request_data = null)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->creer) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'creer')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
// Check mandatory fields
|
// Check mandatory fields
|
||||||
@ -311,7 +311,7 @@ class Members extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function put($id, $request_data = null)
|
public function put($id, $request_data = null)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->creer) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'creer')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -173,7 +173,7 @@ class Subscriptions extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function put($id, $request_data = null)
|
public function put($id, $request_data = null)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->creer) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'creer')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
* \ingroup societe
|
* \ingroup societe
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
@ -87,10 +88,10 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define variables to determine what the current user can do on the members
|
// Define variables to determine what the current user can do on the members
|
||||||
$canaddmember = $user->rights->adherent->creer;
|
$canaddmember = $user->hasRight('adherent', 'creer');
|
||||||
// Define variables to determine what the current user can do on the properties of a member
|
// Define variables to determine what the current user can do on the properties of a member
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$caneditfieldmember = $user->rights->adherent->creer;
|
$caneditfieldmember = $user->hasRight('adherent', 'creer');
|
||||||
}
|
}
|
||||||
|
|
||||||
$permissiontoadd = $canaddmember;
|
$permissiontoadd = $canaddmember;
|
||||||
@ -128,7 +129,7 @@ if ($id > 0) {
|
|||||||
$totalsize += $file['size'];
|
$totalsize += $file['size'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->notification->enabled)) {
|
if (isModEnabled('notification')) {
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,8 +187,8 @@ if ($id > 0) {
|
|||||||
print dol_get_fiche_end();
|
print dol_get_fiche_end();
|
||||||
|
|
||||||
$modulepart = 'member';
|
$modulepart = 'member';
|
||||||
$permissiontoadd = $user->rights->adherent->creer;
|
$permissiontoadd = $user->hasRight('adherent', 'creer');
|
||||||
$permtoedit = $user->rights->adherent->creer;
|
$permtoedit = $user->hasRight('adherent', 'creer');
|
||||||
$param = '&id='.$object->id;
|
$param = '&id='.$object->id;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
print "<br><br>";
|
print "<br><br>";
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
* \brief Export page htpasswd of the membership file
|
* \brief Export page htpasswd of the membership file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ $sortfield = GETPOST('sortfield', 'alphanohtml');
|
|||||||
$sortorder = GETPOST('sortorder', 'aZ09');
|
$sortorder = GETPOST('sortorder', 'aZ09');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($conf->adherent->enabled)) {
|
if (!isModEnabled('adherent')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($user->rights->adherent->export)) {
|
if (empty($user->rights->adherent->export)) {
|
||||||
|
|||||||
@ -27,19 +27,24 @@
|
|||||||
* \brief Home page of membership module
|
* \brief Home page of membership module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array("companies", "members"));
|
||||||
|
|
||||||
|
|
||||||
$hookmanager = new HookManager($db);
|
$hookmanager = new HookManager($db);
|
||||||
|
|
||||||
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||||
$hookmanager->initHooks(array('membersindex'));
|
$hookmanager->initHooks(array('membersindex'));
|
||||||
|
|
||||||
// Load translation files required by the page
|
|
||||||
$langs->loadLangs(array("companies", "members"));
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$result = restrictedArea($user, 'adherent');
|
$result = restrictedArea($user, 'adherent');
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
* \brief Page fiche LDAP adherent
|
* \brief Page fiche LDAP adherent
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php';
|
||||||
@ -62,10 +63,10 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define variables to determine what the current user can do on the members
|
// Define variables to determine what the current user can do on the members
|
||||||
$canaddmember = $user->rights->adherent->creer;
|
$canaddmember = $user->hasRight('adherent', 'creer');
|
||||||
// Define variables to determine what the current user can do on the properties of a member
|
// Define variables to determine what the current user can do on the properties of a member
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$caneditfieldmember = $user->rights->adherent->creer;
|
$caneditfieldmember = $user->hasRight('adherent', 'creer');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@ -27,14 +27,20 @@
|
|||||||
* \brief Page to list all members of foundation
|
* \brief Page to list all members of foundation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("members", "companies"));
|
$langs->loadLangs(array("members", "companies"));
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$massaction = GETPOST('massaction', 'alpha');
|
$massaction = GETPOST('massaction', 'alpha');
|
||||||
$show_files = GETPOST('show_files', 'int');
|
$show_files = GETPOST('show_files', 'int');
|
||||||
@ -42,6 +48,8 @@ $confirm = GETPOST('confirm', 'alpha');
|
|||||||
$toselect = GETPOST('toselect', 'array');
|
$toselect = GETPOST('toselect', 'array');
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'memberslist'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'memberslist'; // To manage different context of search
|
||||||
|
|
||||||
|
|
||||||
|
// Search fields
|
||||||
$search = GETPOST("search", 'alpha');
|
$search = GETPOST("search", 'alpha');
|
||||||
$search_ref = GETPOST("search_ref", 'alpha');
|
$search_ref = GETPOST("search_ref", 'alpha');
|
||||||
$search_lastname = GETPOST("search_lastname", 'alpha');
|
$search_lastname = GETPOST("search_lastname", 'alpha');
|
||||||
@ -63,6 +71,7 @@ $search_email = GETPOST("search_email", 'alpha');
|
|||||||
$search_categ = GETPOST("search_categ", 'int');
|
$search_categ = GETPOST("search_categ", 'int');
|
||||||
$search_filter = GETPOST("search_filter", 'alpha');
|
$search_filter = GETPOST("search_filter", 'alpha');
|
||||||
$search_status = GETPOST("search_status", 'intcomma');
|
$search_status = GETPOST("search_status", 'intcomma');
|
||||||
|
$search_morphy = GETPOST("search_morphy", 'alpha');
|
||||||
$search_import_key = trim(GETPOST("search_import_key", "alpha"));
|
$search_import_key = trim(GETPOST("search_import_key", "alpha"));
|
||||||
$catid = GETPOST("catid", 'int');
|
$catid = GETPOST("catid", 'int');
|
||||||
$optioncss = GETPOST('optioncss', 'alpha');
|
$optioncss = GETPOST('optioncss', 'alpha');
|
||||||
@ -223,7 +232,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Close
|
// Close
|
||||||
if ($massaction == 'close' && $user->rights->adherent->creer) {
|
if ($massaction == 'close' && $user->hasRight('adherent', 'creer')) {
|
||||||
$tmpmember = new Adherent($db);
|
$tmpmember = new Adherent($db);
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$nbclose = 0;
|
$nbclose = 0;
|
||||||
@ -253,7 +262,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create external user
|
// Create external user
|
||||||
if ($massaction == 'createexternaluser' && $user->rights->adherent->creer && $user->rights->user->user->creer) {
|
if ($massaction == 'createexternaluser' && $user->hasRight('adherent', 'creer') && $user->rights->user->user->creer) {
|
||||||
$tmpmember = new Adherent($db);
|
$tmpmember = new Adherent($db);
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$nbcreated = 0;
|
$nbcreated = 0;
|
||||||
@ -293,7 +302,7 @@ if (empty($reshook)) {
|
|||||||
$objectlabel = 'Members';
|
$objectlabel = 'Members';
|
||||||
$permissiontoread = $user->rights->adherent->lire;
|
$permissiontoread = $user->rights->adherent->lire;
|
||||||
$permissiontodelete = $user->rights->adherent->supprimer;
|
$permissiontodelete = $user->rights->adherent->supprimer;
|
||||||
$permissiontoadd = $user->rights->adherent->creer;
|
$permissiontoadd = $user->hasRight('adherent', 'creer');
|
||||||
$uploaddir = $conf->adherent->dir_output;
|
$uploaddir = $conf->adherent->dir_output;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||||
}
|
}
|
||||||
@ -382,6 +391,9 @@ if ($search_status != '') {
|
|||||||
// Peut valoir un nombre ou liste de nombre separes par virgules
|
// Peut valoir un nombre ou liste de nombre separes par virgules
|
||||||
$sql .= " AND d.statut in (".$db->sanitize($db->escape($search_status)).")";
|
$sql .= " AND d.statut in (".$db->sanitize($db->escape($search_status)).")";
|
||||||
}
|
}
|
||||||
|
if ($search_morphy != '') {
|
||||||
|
$sql .= natural_search("d.morphy", $search_morphy);
|
||||||
|
}
|
||||||
if ($search_ref) {
|
if ($search_ref) {
|
||||||
$sql .= natural_search("d.ref", $search_ref);
|
$sql .= natural_search("d.ref", $search_ref);
|
||||||
}
|
}
|
||||||
@ -605,16 +617,16 @@ $arrayofmassactions = array(
|
|||||||
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
||||||
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
||||||
);
|
);
|
||||||
if ($user->rights->adherent->creer) {
|
if ($user->hasRight('adherent', 'creer')) {
|
||||||
$arrayofmassactions['close'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Resiliate");
|
$arrayofmassactions['close'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Resiliate");
|
||||||
}
|
}
|
||||||
if ($user->rights->adherent->supprimer) {
|
if ($user->rights->adherent->supprimer) {
|
||||||
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||||
}
|
}
|
||||||
if ($user->rights->societe->creer) {
|
if (isModEnabled('category') && $user->rights->adherent->creer) {
|
||||||
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
||||||
}
|
}
|
||||||
if ($user->rights->adherent->creer && $user->rights->user->user->creer) {
|
if ($user->hasRight('adherent', 'creer') && $user->rights->user->user->creer) {
|
||||||
$arrayofmassactions['createexternaluser'] = img_picto('', 'user', 'class="pictofixedwidth"').$langs->trans("CreateExternalUser");
|
$arrayofmassactions['createexternaluser'] = img_picto('', 'user', 'class="pictofixedwidth"').$langs->trans("CreateExternalUser");
|
||||||
}
|
}
|
||||||
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) {
|
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) {
|
||||||
@ -623,7 +635,7 @@ if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'pr
|
|||||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||||
|
|
||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
if ($user->rights->adherent->creer) {
|
if ($user->hasRight('adherent', 'creer')) {
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create');
|
$newcardbutton .= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -655,7 +667,7 @@ if ($sall) {
|
|||||||
|
|
||||||
// Filter on categories
|
// Filter on categories
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
$moreforfilter .= img_picto($langs->trans('Categories'), 'category', 'class="pictofixedlength"').$formother->select_categories(Categorie::TYPE_MEMBER, $search_categ, 'search_categ', 1);
|
$moreforfilter .= img_picto($langs->trans('Categories'), 'category', 'class="pictofixedlength"').$formother->select_categories(Categorie::TYPE_MEMBER, $search_categ, 'search_categ', 1);
|
||||||
@ -675,7 +687,7 @@ if (!empty($moreforfilter)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
|
||||||
if ($massactionbutton) {
|
if ($massactionbutton) {
|
||||||
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||||
}
|
}
|
||||||
@ -685,7 +697,13 @@ print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" :
|
|||||||
|
|
||||||
// Line for filters fields
|
// Line for filters fields
|
||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
|
// Action column
|
||||||
|
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||||
|
print '<td class="liste_titre middle">';
|
||||||
|
$searchpicto = $form->showFilterButtons('left');
|
||||||
|
print $searchpicto;
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
// Line numbering
|
// Line numbering
|
||||||
if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
|
if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
@ -725,6 +743,11 @@ if (!empty($arrayfields['d.login']['checked'])) {
|
|||||||
}
|
}
|
||||||
if (!empty($arrayfields['d.morphy']['checked'])) {
|
if (!empty($arrayfields['d.morphy']['checked'])) {
|
||||||
print '<td class="liste_titre left">';
|
print '<td class="liste_titre left">';
|
||||||
|
$arraymorphy = array('mor'=>$langs->trans("Moral"), 'phy'=>$langs->trans("Physical"));
|
||||||
|
print $form->selectarray('search_morphy', $arraymorphy, $search_morphy, 1);
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
if (!empty($arrayfields['t.libelle']['checked'])) {
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['t.libelle']['checked'])) {
|
if (!empty($arrayfields['t.libelle']['checked'])) {
|
||||||
@ -962,6 +985,19 @@ while ($i < min($num, $limit)) {
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
|
// Action column
|
||||||
|
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||||
|
print '<td class="center">';
|
||||||
|
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
|
$selected = 0;
|
||||||
|
if (in_array($obj->rowid, $arrayofselected)) {
|
||||||
|
$selected = 1;
|
||||||
|
}
|
||||||
|
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
|
if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
|
||||||
print '<td class="center" data-key="id">'.$obj->rowid.'</td>';
|
print '<td class="center" data-key="id">'.$obj->rowid.'</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
|
|||||||
@ -23,26 +23,35 @@
|
|||||||
* \brief Tab for note of a member
|
* \brief Tab for note of a member
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
|
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("companies", "members", "bills"));
|
$langs->loadLangs(array("companies", "members", "bills"));
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alphanohtml');
|
$ref = GETPOST('ref', 'alphanohtml');
|
||||||
|
|
||||||
|
|
||||||
|
// Initialize objects
|
||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
|
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
$adht = new AdherentType($db);
|
$adht = new AdherentType($db);
|
||||||
$result = $adht->fetch($object->typeid);
|
$result = $adht->fetch($object->typeid);
|
||||||
}
|
}
|
||||||
|
|
||||||
$permissionnote = $user->rights->adherent->creer; // Used by the include of actions_setnotes.inc.php
|
|
||||||
|
$permissionnote = $user->hasRight('adherent', 'creer'); // Used by the include of actions_setnotes.inc.php
|
||||||
|
|
||||||
// Fetch object
|
// Fetch object
|
||||||
if ($id > 0 || !empty($ref)) {
|
if ($id > 0 || !empty($ref)) {
|
||||||
@ -62,10 +71,10 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define variables to determine what the current user can do on the members
|
// Define variables to determine what the current user can do on the members
|
||||||
$canaddmember = $user->rights->adherent->creer;
|
$canaddmember = $user->hasRight('adherent', 'creer');
|
||||||
// Define variables to determine what the current user can do on the properties of a member
|
// Define variables to determine what the current user can do on the properties of a member
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$caneditfieldmember = $user->rights->adherent->creer;
|
$caneditfieldmember = $user->hasRight('adherent', 'creer');
|
||||||
}
|
}
|
||||||
|
|
||||||
$hookmanager->initHooks(array('membernote'));
|
$hookmanager->initHooks(array('membernote'));
|
||||||
@ -120,7 +129,7 @@ if ($id) {
|
|||||||
|
|
||||||
// Login
|
// Login
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.dol_escape_htmltag($object->login).'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
@ -134,10 +143,10 @@ if ($id) {
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Company
|
// Company
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->company.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.dol_escape_htmltag($object->company).'</td></tr>';
|
||||||
|
|
||||||
// Civility
|
// Civility
|
||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
@ -146,7 +155,7 @@ if ($id) {
|
|||||||
|
|
||||||
|
|
||||||
$cssclass = 'titlefield';
|
$cssclass = 'titlefield';
|
||||||
$permission = $user->rights->adherent->creer; // Used by the include of notes.tpl.php
|
$permission = $user->hasRight('adherent', 'creer'); // Used by the include of notes.tpl.php
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -88,7 +88,7 @@ $upload_dir = $conf->partnership->multidir_output[isset($object->entity) ? $o
|
|||||||
if (getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') != 'member') {
|
if (getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') != 'member') {
|
||||||
accessforbidden('Partnership module is not activated for members');
|
accessforbidden('Partnership module is not activated for members');
|
||||||
}
|
}
|
||||||
if (empty($conf->partnership->enabled)) {
|
if (!isModEnabled('partnership')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($permissiontoread)) {
|
if (empty($permissiontoread)) {
|
||||||
@ -151,7 +151,7 @@ if ($id > 0) {
|
|||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
|
|
||||||
if (!empty($conf->notification->enabled)) {
|
if (isModEnabled('notification')) {
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
* \brief Page with statistics on members
|
* \brief Page with statistics on members
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
* \brief Page with geographical statistics on members
|
* \brief Page with geographical statistics on members
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
* \brief Page of subscription members statistics
|
* \brief Page of subscription members statistics
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherentstats.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherentstats.class.php';
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
* \brief tab for Adding, editing, deleting a member's memberships
|
* \brief tab for Adding, editing, deleting a member's memberships
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
@ -112,10 +113,10 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define variables to determine what the current user can do on the members
|
// Define variables to determine what the current user can do on the members
|
||||||
$canaddmember = $user->rights->adherent->creer;
|
$canaddmember = $user->hasRight('adherent', 'creer');
|
||||||
// Define variables to determine what the current user can do on the properties of a member
|
// Define variables to determine what the current user can do on the properties of a member
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$caneditfieldmember = $user->rights->adherent->creer;
|
$caneditfieldmember = $user->hasRight('adherent', 'creer');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@ -271,7 +272,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
|||||||
$action = 'addsubscription';
|
$action = 'addsubscription';
|
||||||
} else {
|
} else {
|
||||||
// If an amount has been provided, we check also fields that becomes mandatory when amount is not null.
|
// If an amount has been provided, we check also fields that becomes mandatory when amount is not null.
|
||||||
if (!empty($conf->banque->enabled) && GETPOST("paymentsave") != 'none') {
|
if (isModEnabled('banque') && GETPOST("paymentsave") != 'none') {
|
||||||
if (GETPOST("subscription")) {
|
if (GETPOST("subscription")) {
|
||||||
if (!GETPOST("label")) {
|
if (!GETPOST("label")) {
|
||||||
$errmsg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Label"));
|
$errmsg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Label"));
|
||||||
@ -475,7 +476,7 @@ if ($rowid > 0) {
|
|||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
|
||||||
$rowspan++;
|
$rowspan++;
|
||||||
}
|
}
|
||||||
if (!empty($conf->societe->enabled)) {
|
if (isModEnabled('societe')) {
|
||||||
$rowspan++;
|
$rowspan++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -571,7 +572,7 @@ if ($rowid > 0) {
|
|||||||
print '<table class="border tableforfield centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Tags / Categories
|
// Tags / Categories
|
||||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||||
print '<tr><td>'.$langs->trans("Categories").'</td>';
|
print '<tr><td>'.$langs->trans("Categories").'</td>';
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
print $form->showCategories($object->id, Categorie::TYPE_MEMBER, 1);
|
print $form->showCategories($object->id, Categorie::TYPE_MEMBER, 1);
|
||||||
@ -589,12 +590,12 @@ if ($rowid > 0) {
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|
||||||
// Third party Dolibarr
|
// Third party Dolibarr
|
||||||
if (!empty($conf->societe->enabled)) {
|
if (isModEnabled('societe')) {
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans("LinkedToDolibarrThirdParty");
|
print $langs->trans("LinkedToDolibarrThirdParty");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editthirdparty' && $user->rights->adherent->creer) {
|
if ($action != 'editthirdparty' && $user->hasRight('adherent', 'creer')) {
|
||||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&token='.newToken().'&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'), 1).'</a></td>';
|
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&token='.newToken().'&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'), 1).'</a></td>';
|
||||||
}
|
}
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
@ -636,7 +637,7 @@ if ($rowid > 0) {
|
|||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans("LinkedToDolibarrUser");
|
print $langs->trans("LinkedToDolibarrUser");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editlogin' && $user->rights->adherent->creer) {
|
if ($action != 'editlogin' && $user->hasRight('adherent', 'creer')) {
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
if ($user->rights->user->user->creer) {
|
if ($user->rights->user->user->creer) {
|
||||||
print '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editlogin&token='.newToken().'&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToUser'), 1).'</a>';
|
print '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editlogin&token='.newToken().'&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToUser'), 1).'</a>';
|
||||||
@ -718,7 +719,7 @@ if ($rowid > 0) {
|
|||||||
print_liste_field_titre('DateStart', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre('DateStart', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre('DateEnd', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre('DateEnd', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre('Amount', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre('Amount', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if (!empty($conf->banque->enabled)) {
|
if (isModEnabled('banque')) {
|
||||||
print_liste_field_titre('Account', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre('Account', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -753,7 +754,7 @@ if ($rowid > 0) {
|
|||||||
print '<td class="center">'.dol_print_date($db->jdate($objp->dateh), 'day')."</td>\n";
|
print '<td class="center">'.dol_print_date($db->jdate($objp->dateh), 'day')."</td>\n";
|
||||||
print '<td class="center">'.dol_print_date($db->jdate($objp->datef), 'day')."</td>\n";
|
print '<td class="center">'.dol_print_date($db->jdate($objp->datef), 'day')."</td>\n";
|
||||||
print '<td class="right">'.price($objp->subscription).'</td>';
|
print '<td class="right">'.price($objp->subscription).'</td>';
|
||||||
if (!empty($conf->banque->enabled)) {
|
if (isModEnabled('banque')) {
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
if ($objp->bid) {
|
if ($objp->bid) {
|
||||||
$accountstatic->label = $objp->label;
|
$accountstatic->label = $objp->label;
|
||||||
@ -762,7 +763,7 @@ if ($rowid > 0) {
|
|||||||
$accountstatic->account_number = $objp->account_number;
|
$accountstatic->account_number = $objp->account_number;
|
||||||
$accountstatic->currency_code = $objp->currency_code;
|
$accountstatic->currency_code = $objp->currency_code;
|
||||||
|
|
||||||
if (!empty($conf->accounting->enabled) && $objp->fk_accountancy_journal > 0) {
|
if (isModEnabled('accounting') && $objp->fk_accountancy_journal > 0) {
|
||||||
$accountingjournal = new AccountingJournal($db);
|
$accountingjournal = new AccountingJournal($db);
|
||||||
$accountingjournal->fetch($objp->fk_accountancy_journal);
|
$accountingjournal->fetch($objp->fk_accountancy_journal);
|
||||||
|
|
||||||
@ -782,7 +783,7 @@ if ($rowid > 0) {
|
|||||||
|
|
||||||
if (empty($num)) {
|
if (empty($num)) {
|
||||||
$colspan = 6;
|
$colspan = 6;
|
||||||
if (!empty($conf->banque->enabled)) {
|
if (isModEnabled('banque')) {
|
||||||
$colspan++;
|
$colspan++;
|
||||||
}
|
}
|
||||||
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||||
@ -797,7 +798,7 @@ if ($rowid > 0) {
|
|||||||
|
|
||||||
if (($action != 'addsubscription' && $action != 'create_thirdparty')) {
|
if (($action != 'addsubscription' && $action != 'create_thirdparty')) {
|
||||||
// Shon online payment link
|
// Shon online payment link
|
||||||
$useonlinepayment = (!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled));
|
$useonlinepayment = (isModEnabled('paypal') || isModEnabled('stripe') || isModEnabled('paybox'));
|
||||||
|
|
||||||
if ($useonlinepayment) {
|
if ($useonlinepayment) {
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -831,11 +832,11 @@ if ($rowid > 0) {
|
|||||||
$bankviainvoice = 1;
|
$bankviainvoice = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) {
|
if (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && isModEnabled('banque') && isModEnabled('societe') && isModEnabled('facture')) {
|
||||||
$bankviainvoice = 1;
|
$bankviainvoice = 1;
|
||||||
} elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && !empty($conf->banque->enabled)) {
|
} elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && isModEnabled('banque')) {
|
||||||
$bankdirect = 1;
|
$bankdirect = 1;
|
||||||
} elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) {
|
} elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && isModEnabled('banque') && isModEnabled('societe') && isModEnabled('facture')) {
|
||||||
$invoiceonly = 1;
|
$invoiceonly = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -982,7 +983,7 @@ if ($rowid > 0) {
|
|||||||
print '"></td></tr>';
|
print '"></td></tr>';
|
||||||
|
|
||||||
// Complementary action
|
// Complementary action
|
||||||
if ((!empty($conf->banque->enabled) || isModEnabled('facture')) && empty($conf->global->ADHERENT_SUBSCRIPTION_HIDECOMPLEMENTARYACTIONS)) {
|
if ((isModEnabled('banque') || isModEnabled('facture')) && empty($conf->global->ADHERENT_SUBSCRIPTION_HIDECOMPLEMENTARYACTIONS)) {
|
||||||
$company = new Societe($db);
|
$company = new Societe($db);
|
||||||
if ($object->fk_soc) {
|
if ($object->fk_soc) {
|
||||||
$result = $company->fetch($object->fk_soc);
|
$result = $company->fetch($object->fk_soc);
|
||||||
@ -998,12 +999,12 @@ if ($rowid > 0) {
|
|||||||
print '<input type="radio" class="moreaction" id="none" name="paymentsave" value="none"'.(empty($bankdirect) && empty($invoiceonly) && empty($bankviainvoice) ? ' checked' : '').'>';
|
print '<input type="radio" class="moreaction" id="none" name="paymentsave" value="none"'.(empty($bankdirect) && empty($invoiceonly) && empty($bankviainvoice) ? ' checked' : '').'>';
|
||||||
print '<label for="none"> '.$langs->trans("None").'</label><br>';
|
print '<label for="none"> '.$langs->trans("None").'</label><br>';
|
||||||
// Add entry into bank accoun
|
// Add entry into bank accoun
|
||||||
if (!empty($conf->banque->enabled)) {
|
if (isModEnabled('banque')) {
|
||||||
print '<input type="radio" class="moreaction" id="bankdirect" name="paymentsave" value="bankdirect"'.(!empty($bankdirect) ? ' checked' : '');
|
print '<input type="radio" class="moreaction" id="bankdirect" name="paymentsave" value="bankdirect"'.(!empty($bankdirect) ? ' checked' : '');
|
||||||
print '><label for="bankdirect"> '.$langs->trans("MoreActionBankDirect").'</label><br>';
|
print '><label for="bankdirect"> '.$langs->trans("MoreActionBankDirect").'</label><br>';
|
||||||
}
|
}
|
||||||
// Add invoice with no payments
|
// Add invoice with no payments
|
||||||
if (!empty($conf->societe->enabled) && isModEnabled('facture')) {
|
if (isModEnabled('societe') && isModEnabled('facture')) {
|
||||||
print '<input type="radio" class="moreaction" id="invoiceonly" name="paymentsave" value="invoiceonly"'.(!empty($invoiceonly) ? ' checked' : '');
|
print '<input type="radio" class="moreaction" id="invoiceonly" name="paymentsave" value="invoiceonly"'.(!empty($invoiceonly) ? ' checked' : '');
|
||||||
//if (empty($object->fk_soc)) print ' disabled';
|
//if (empty($object->fk_soc)) print ' disabled';
|
||||||
print '><label for="invoiceonly"> '.$langs->trans("MoreActionInvoiceOnly");
|
print '><label for="invoiceonly"> '.$langs->trans("MoreActionInvoiceOnly");
|
||||||
@ -1022,7 +1023,7 @@ if ($rowid > 0) {
|
|||||||
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') {
|
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') {
|
||||||
print '. <span class="opacitymedium">'.$langs->trans("NoVatOnSubscription", 0).'</span>';
|
print '. <span class="opacitymedium">'.$langs->trans("NoVatOnSubscription", 0).'</span>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) {
|
if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (isModEnabled('product') || isModEnabled('service'))) {
|
||||||
$prodtmp = new Product($db);
|
$prodtmp = new Product($db);
|
||||||
$result = $prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
$result = $prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
@ -1033,7 +1034,7 @@ if ($rowid > 0) {
|
|||||||
print '</label><br>';
|
print '</label><br>';
|
||||||
}
|
}
|
||||||
// Add invoice with payments
|
// Add invoice with payments
|
||||||
if (!empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) {
|
if (isModEnabled('banque') && isModEnabled('societe') && isModEnabled('facture')) {
|
||||||
print '<input type="radio" class="moreaction" id="bankviainvoice" name="paymentsave" value="bankviainvoice"'.(!empty($bankviainvoice) ? ' checked' : '');
|
print '<input type="radio" class="moreaction" id="bankviainvoice" name="paymentsave" value="bankviainvoice"'.(!empty($bankviainvoice) ? ' checked' : '');
|
||||||
//if (empty($object->fk_soc)) print ' disabled';
|
//if (empty($object->fk_soc)) print ' disabled';
|
||||||
print '><label for="bankviainvoice"> '.$langs->trans("MoreActionBankViaInvoice");
|
print '><label for="bankviainvoice"> '.$langs->trans("MoreActionBankViaInvoice");
|
||||||
@ -1052,7 +1053,7 @@ if ($rowid > 0) {
|
|||||||
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') {
|
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') {
|
||||||
print '. <span class="opacitymedium">'.$langs->trans("NoVatOnSubscription", 0).'</span>';
|
print '. <span class="opacitymedium">'.$langs->trans("NoVatOnSubscription", 0).'</span>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) {
|
if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (isModEnabled('product')|| isModEnabled('service'))) {
|
||||||
$prodtmp = new Product($db);
|
$prodtmp = new Product($db);
|
||||||
$result = $prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
$result = $prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
@ -1072,7 +1073,7 @@ if ($rowid > 0) {
|
|||||||
|
|
||||||
// Payment mode
|
// Payment mode
|
||||||
print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
|
print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
|
||||||
$form->select_types_paiements(GETPOST('operation'), 'operation', '', 2, 1, 0, 0, 1, 'minwidth200');
|
print $form->select_types_paiements(GETPOST('operation'), 'operation', '', 2, 1, 0, 0, 1, 'minwidth200', 1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Date of payment
|
// Date of payment
|
||||||
|
|||||||
@ -22,12 +22,13 @@
|
|||||||
* \brief Page to add/edit/remove a member subscription
|
* \brief Page to add/edit/remove a member subscription
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
||||||
if (!empty($conf->banque->enabled)) {
|
if (isModEnabled("banque")) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +230,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') {
|
|||||||
print '<input type="text" class="flat" size="60" name="note" value="'.$object->note.'"></td></tr>';
|
print '<input type="text" class="flat" size="60" name="note" value="'.$object->note.'"></td></tr>';
|
||||||
|
|
||||||
// Bank line
|
// Bank line
|
||||||
if (!empty($conf->banque->enabled) && ($conf->global->ADHERENT_BANK_USE || $object->fk_bank)) {
|
if (isModEnabled("banque") && (!empty($conf->global->ADHERENT_BANK_USE) || $object->fk_bank)) {
|
||||||
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur" colspan="2">';
|
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur" colspan="2">';
|
||||||
if ($object->fk_bank) {
|
if ($object->fk_bank) {
|
||||||
$bankline = new AccountLine($db);
|
$bankline = new AccountLine($db);
|
||||||
@ -267,10 +268,10 @@ if ($rowid && $action != 'edit') {
|
|||||||
|
|
||||||
// Confirmation to delete subscription
|
// Confirmation to delete subscription
|
||||||
if ($action == 'delete') {
|
if ($action == 'delete') {
|
||||||
//$formquestion=array();
|
$formquestion=array();
|
||||||
//$formquestion['text']='<b>'.$langs->trans("ThisWillAlsoDeleteBankRecord").'</b>';
|
//$formquestion['text']='<b>'.$langs->trans("ThisWillAlsoDeleteBankRecord").'</b>';
|
||||||
$text = $langs->trans("ConfirmDeleteSubscription");
|
$text = $langs->trans("ConfirmDeleteSubscription");
|
||||||
if (!empty($conf->banque->enabled) && !empty($conf->global->ADHERENT_BANK_USE)) {
|
if (isModEnabled("banque") && !empty($conf->global->ADHERENT_BANK_USE)) {
|
||||||
$text .= '<br>'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord");
|
$text .= '<br>'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord");
|
||||||
}
|
}
|
||||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id, $langs->trans("DeleteSubscription"), $text, "confirm_delete", $formquestion, 0, 1);
|
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id, $langs->trans("DeleteSubscription"), $text, "confirm_delete", $formquestion, 0, 1);
|
||||||
@ -325,7 +326,7 @@ if ($rowid && $action != 'edit') {
|
|||||||
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur">'.$object->note.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur">'.$object->note.'</td></tr>';
|
||||||
|
|
||||||
// Bank line
|
// Bank line
|
||||||
if (!empty($conf->banque->enabled) && ($conf->global->ADHERENT_BANK_USE || $object->fk_bank)) {
|
if (isModEnabled("banque") && (!empty($conf->global->ADHERENT_BANK_USE) || $object->fk_bank)) {
|
||||||
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur">';
|
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur">';
|
||||||
if ($object->fk_bank) {
|
if ($object->fk_bank) {
|
||||||
$bankline = new AccountLine($db);
|
$bankline = new AccountLine($db);
|
||||||
@ -350,7 +351,7 @@ if ($rowid && $action != 'edit') {
|
|||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($user->rights->adherent->cotisation->creer) {
|
if ($user->rights->adherent->cotisation->creer) {
|
||||||
if (!$bankline->rappro) {
|
if (!empty($bankline->rappro)) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?rowid=".$object->id.'&action=edit&token='.newToken().'">'.$langs->trans("Modify")."</a></div>";
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?rowid=".$object->id.'&action=edit&token='.newToken().'">'.$langs->trans("Modify")."</a></div>";
|
||||||
} else {
|
} else {
|
||||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" title="'.$langs->trans("BankLineConciliated")."\" href=\"#\">".$langs->trans("Modify")."</a></div>";
|
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" title="'.$langs->trans("BankLineConciliated")."\" href=\"#\">".$langs->trans("Modify")."</a></div>";
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
* \brief Page with information of subscriptions of a member
|
* \brief Page with information of subscriptions of a member
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
* \brief list of subscription
|
* \brief list of subscription
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
@ -89,7 +90,7 @@ $arrayfields = array(
|
|||||||
'd.firstname'=>array('label'=>"Firstname", 'checked'=>1),
|
'd.firstname'=>array('label'=>"Firstname", 'checked'=>1),
|
||||||
'd.login'=>array('label'=>"Login", 'checked'=>1),
|
'd.login'=>array('label'=>"Login", 'checked'=>1),
|
||||||
't.libelle'=>array('label'=>"Label", 'checked'=>1),
|
't.libelle'=>array('label'=>"Label", 'checked'=>1),
|
||||||
'd.bank'=>array('label'=>"BankAccount", 'checked'=>1, 'enabled'=>(!empty($conf->banque->enabled))),
|
'd.bank'=>array('label'=>"BankAccount", 'checked'=>1, 'enabled'=>(isModEnabled('banque'))),
|
||||||
/*'d.note_public'=>array('label'=>"NotePublic", 'checked'=>0),
|
/*'d.note_public'=>array('label'=>"NotePublic", 'checked'=>0),
|
||||||
'd.note_private'=>array('label'=>"NotePrivate", 'checked'=>0),*/
|
'd.note_private'=>array('label'=>"NotePrivate", 'checked'=>0),*/
|
||||||
'c.dateadh'=>array('label'=>"DateSubscription", 'checked'=>1, 'position'=>100),
|
'c.dateadh'=>array('label'=>"DateSubscription", 'checked'=>1, 'position'=>100),
|
||||||
|
|||||||
@ -29,6 +29,7 @@
|
|||||||
* \brief Member's type setup
|
* \brief Member's type setup
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
@ -123,6 +124,7 @@ if ($action == 'add' && $user->rights->adherent->configurer) {
|
|||||||
$object->status = (int) $status;
|
$object->status = (int) $status;
|
||||||
$object->subscription = (int) $subscription;
|
$object->subscription = (int) $subscription;
|
||||||
$object->amount = ($amount == '' ? '' : price2num($amount, 'MT'));
|
$object->amount = ($amount == '' ? '' : price2num($amount, 'MT'));
|
||||||
|
$object->caneditamount = GETPOSTINT("caneditamount");
|
||||||
$object->duration_value = $duration_value;
|
$object->duration_value = $duration_value;
|
||||||
$object->duration_unit = $duration_unit;
|
$object->duration_unit = $duration_unit;
|
||||||
$object->note = trim($comment);
|
$object->note = trim($comment);
|
||||||
@ -170,12 +172,14 @@ if ($action == 'add' && $user->rights->adherent->configurer) {
|
|||||||
if ($action == 'update' && $user->rights->adherent->configurer) {
|
if ($action == 'update' && $user->rights->adherent->configurer) {
|
||||||
$object->fetch($rowid);
|
$object->fetch($rowid);
|
||||||
|
|
||||||
$object->oldcopy = clone $object;
|
$object->oldcopy = dol_clone($object);
|
||||||
|
|
||||||
$object->label= trim($label);
|
$object->label= trim($label);
|
||||||
$object->morphy = trim($morphy);
|
$object->morphy = trim($morphy);
|
||||||
$object->status = (int) $status;
|
$object->status = (int) $status;
|
||||||
$object->subscription = (int) $subscription;
|
$object->subscription = (int) $subscription;
|
||||||
$object->amount = ($amount == '' ? '' : price2num($amount, 'MT'));
|
$object->amount = ($amount == '' ? '' : price2num($amount, 'MT'));
|
||||||
|
$object->caneditamount = $caneditamount;
|
||||||
$object->duration_value = $duration_value;
|
$object->duration_value = $duration_value;
|
||||||
$object->duration_unit = $duration_unit;
|
$object->duration_unit = $duration_unit;
|
||||||
$object->note = trim($comment);
|
$object->note = trim($comment);
|
||||||
@ -231,7 +235,7 @@ llxHeader('', $langs->trans("MembersTypeSetup"), $help_url);
|
|||||||
if (!$rowid && $action != 'create' && $action != 'edit') {
|
if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||||
//print dol_get_fiche_head('');
|
//print dol_get_fiche_head('');
|
||||||
|
|
||||||
$sql = "SELECT d.rowid, d.libelle as label, d.subscription, d.amount, d.vote, d.statut as status, d.morphy";
|
$sql = "SELECT d.rowid, d.libelle as label, d.subscription, d.amount, d.caneditamount, d.vote, d.statut as status, d.morphy";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||||
$sql .= " WHERE d.entity IN (".getEntity('member_type').")";
|
$sql .= " WHERE d.entity IN (".getEntity('member_type').")";
|
||||||
|
|
||||||
@ -278,6 +282,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
|||||||
print '<th class="center">'.$langs->trans("MembersNature").'</th>';
|
print '<th class="center">'.$langs->trans("MembersNature").'</th>';
|
||||||
print '<th class="center">'.$langs->trans("SubscriptionRequired").'</th>';
|
print '<th class="center">'.$langs->trans("SubscriptionRequired").'</th>';
|
||||||
print '<th class="center">'.$langs->trans("Amount").'</th>';
|
print '<th class="center">'.$langs->trans("Amount").'</th>';
|
||||||
|
print '<th class="center">'.$langs->trans("CanEditAmountShort").'</th>';
|
||||||
print '<th class="center">'.$langs->trans("VoteAllowed").'</th>';
|
print '<th class="center">'.$langs->trans("VoteAllowed").'</th>';
|
||||||
print '<th class="center">'.$langs->trans("Status").'</th>';
|
print '<th class="center">'.$langs->trans("Status").'</th>';
|
||||||
print '<th> </th>';
|
print '<th> </th>';
|
||||||
@ -294,6 +299,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
|||||||
$membertype->status = $objp->status;
|
$membertype->status = $objp->status;
|
||||||
$membertype->subscription = $objp->subscription;
|
$membertype->subscription = $objp->subscription;
|
||||||
$membertype->amount = $objp->amount;
|
$membertype->amount = $objp->amount;
|
||||||
|
$membertype->caneditamount = $objp->caneditamount;
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td class="nowraponall">';
|
print '<td class="nowraponall">';
|
||||||
@ -312,6 +318,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="center">'.yn($objp->subscription).'</td>';
|
print '<td class="center">'.yn($objp->subscription).'</td>';
|
||||||
print '<td class="center"><span class="amount">'.(is_null($objp->amount) || $objp->amount === '' ? '' : price($objp->amount)).'</span></td>';
|
print '<td class="center"><span class="amount">'.(is_null($objp->amount) || $objp->amount === '' ? '' : price($objp->amount)).'</span></td>';
|
||||||
|
print '<td class="center">'.yn($objp->caneditamount).'</td>';
|
||||||
print '<td class="center">'.yn($objp->vote).'</td>';
|
print '<td class="center">'.yn($objp->vote).'</td>';
|
||||||
print '<td class="center">'.$membertype->getLibStatut(5).'</td>';
|
print '<td class="center">'.$membertype->getLibStatut(5).'</td>';
|
||||||
if ($user->rights->adherent->configurer) {
|
if ($user->rights->adherent->configurer) {
|
||||||
@ -382,6 +389,10 @@ if ($action == 'create') {
|
|||||||
print '<input name="amount" size="5" value="'.(GETPOSTISSET('amount') ? GETPOST('amount') : price($amount)).'">';
|
print '<input name="amount" size="5" value="'.(GETPOSTISSET('amount') ? GETPOST('amount') : price($amount)).'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '<tr><td>'.$langs->trans("CanEditAmount").'</td><td>';
|
||||||
|
print $form->selectyesno("caneditamount", 0, 1);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||||
print $form->selectyesno("vote", GETPOSTISSET("vote") ? GETPOST('vote', 'aZ09') : 1, 1);
|
print $form->selectyesno("vote", GETPOSTISSET("vote") ? GETPOST('vote', 'aZ09') : 1, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -455,6 +466,10 @@ if ($rowid > 0) {
|
|||||||
print ((is_null($object->amount) || $object->amount === '') ? '' : '<span class="amount">'.price($object->amount).'</span>');
|
print ((is_null($object->amount) || $object->amount === '') ? '' : '<span class="amount">'.price($object->amount).'</span>');
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
print '<tr><td>'.$form->textwithpicto($langs->trans("CanEditAmountShort"), $langs->transnoentities("CanEditAmount")).'</td><td>';
|
||||||
|
print yn($object->caneditamount);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||||
print yn($object->vote);
|
print yn($object->vote);
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -739,7 +754,7 @@ if ($rowid > 0) {
|
|||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if ($user->rights->adherent->creer) {
|
if ($user->hasRight('adherent', 'creer')) {
|
||||||
print '<a class="editfielda marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=edit&token='.newToken().'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.img_edit().'</a>';
|
print '<a class="editfielda marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=edit&token='.newToken().'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.img_edit().'</a>';
|
||||||
}
|
}
|
||||||
if ($user->rights->adherent->supprimer) {
|
if ($user->rights->adherent->supprimer) {
|
||||||
@ -815,6 +830,10 @@ if ($rowid > 0) {
|
|||||||
print '">';
|
print '">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '<tr><td>'.$form->textwithpicto($langs->trans("CanEditAmountShort"), $langs->transnoentities("CanEditAmountDetail")).'</td><td>';
|
||||||
|
print $form->selectyesno("caneditamount", $object->caneditamount);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||||
print $form->selectyesno("vote", $object->vote, 1);
|
print $form->selectyesno("vote", $object->vote, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
* \brief Page fiche LDAP members types
|
* \brief Page fiche LDAP members types
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
* \brief Member translation page
|
* \brief Member translation page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
* \brief Vcard tab of a member
|
* \brief Vcard tab of a member
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
@ -53,10 +54,10 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define variables to determine what the current user can do on the members
|
// Define variables to determine what the current user can do on the members
|
||||||
$canaddmember = $user->rights->adherent->creer;
|
$canaddmember = $user->hasRight('adherent', 'creer');
|
||||||
// Define variables to determine what the current user can do on the properties of a member
|
// Define variables to determine what the current user can do on the properties of a member
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$caneditfieldmember = $user->rights->adherent->creer;
|
$caneditfieldmember = $user->hasRight('adherent', 'creer');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
* \brief Setup page to configure accountant / auditor
|
* \brief Setup page to configure accountant / auditor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
* \brief Setup page to configure accounting module
|
* \brief Setup page to configure accounting module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2011 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
|
* Copyright (C) 2022 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -24,6 +25,7 @@
|
|||||||
* \brief Autocreate actions for agenda module setup page
|
* \brief Autocreate actions for agenda module setup page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
||||||
@ -184,7 +186,7 @@ if (!empty($triggers)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//print 'module='.$module.' code='.$trigger['code'].'<br>';
|
//print 'module='.$module.' code='.$trigger['code'].'<br>';
|
||||||
if (!empty($conf->$module->enabled)) {
|
if (isModEnabled($module)) {
|
||||||
// Discard special case: If option FICHINTER_CLASSIFY_BILLED is not set, we discard both trigger FICHINTER_CLASSIFY_BILLED and FICHINTER_CLASSIFY_UNBILLED
|
// Discard special case: If option FICHINTER_CLASSIFY_BILLED is not set, we discard both trigger FICHINTER_CLASSIFY_BILLED and FICHINTER_CLASSIFY_UNBILLED
|
||||||
if ($trigger['code'] == 'FICHINTER_CLASSIFY_BILLED' && empty($conf->global->FICHINTER_CLASSIFY_BILLED)) {
|
if ($trigger['code'] == 'FICHINTER_CLASSIFY_BILLED' && empty($conf->global->FICHINTER_CLASSIFY_BILLED)) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
* \brief Page to setup extra fields of agenda
|
* \brief Page to setup extra fields of agenda
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
@ -86,15 +87,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
|||||||
print dol_get_fiche_end();
|
print dol_get_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
// Buttons
|
|
||||||
if ($action != 'create' && $action != 'edit') {
|
|
||||||
print '<div class="tabsAction">';
|
|
||||||
print '<a class="butAction reposition" href="'.$_SERVER["PHP_SELF"].'?action=create">'.$langs->trans("NewAttribute").'</a>';
|
|
||||||
print "</div>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Creation of an optional field
|
// Creation of an optional field
|
||||||
if ($action == 'create') {
|
if ($action == 'create') {
|
||||||
print '<br><div id="newattrib"></div>';
|
print '<br><div id="newattrib"></div>';
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
* \brief Page to setup external calendars for agenda module
|
* \brief Page to setup external calendars for agenda module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
* \brief Autocreate actions for agenda module setup page
|
* \brief Autocreate actions for agenda module setup page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
* \brief Page to setup agenda reminder options
|
* \brief Page to setup agenda reminder options
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
||||||
@ -206,7 +207,7 @@ $job->fetch(0, 'ActionComm', 'sendEmailsReminder');
|
|||||||
// AGENDA REMINDER EMAIL
|
// AGENDA REMINDER EMAIL
|
||||||
print '<tr class="oddeven">'."\n";
|
print '<tr class="oddeven">'."\n";
|
||||||
print '<td>'.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name"));
|
print '<td>'.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name"));
|
||||||
if (!empty($conf->cron->enabled)) {
|
if (isModEnabled('cron')) {
|
||||||
if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) {
|
if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) {
|
||||||
if ($job->id > 0) {
|
if ($job->id > 0) {
|
||||||
if ($job->status == $job::STATUS_ENABLED) {
|
if ($job->status == $job::STATUS_ENABLED) {
|
||||||
@ -219,7 +220,7 @@ print '</td>'."\n";
|
|||||||
print '<td class="center"> </td>'."\n";
|
print '<td class="center"> </td>'."\n";
|
||||||
print '<td class="right nowraponall">'."\n";
|
print '<td class="right nowraponall">'."\n";
|
||||||
|
|
||||||
if (empty($conf->cron->enabled)) {
|
if (!isModEnabled('cron')) {
|
||||||
print '<span class="opacitymedium">'.$langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("Module2300Name")).'</span>';
|
print '<span class="opacitymedium">'.$langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("Module2300Name")).'</span>';
|
||||||
} else {
|
} else {
|
||||||
if (empty($conf->global->AGENDA_REMINDER_EMAIL)) {
|
if (empty($conf->global->AGENDA_REMINDER_EMAIL)) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user