Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW_actionlist_desc
This commit is contained in:
commit
1cfd52e7e2
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,3 +25,4 @@ Thumbs.db
|
||||
htdocs/includes/autoload.php
|
||||
htdocs/includes/bin/
|
||||
htdocs/includes/composer/
|
||||
/.pydevproject
|
||||
|
||||
4
.mailmap
4
.mailmap
@ -6,8 +6,8 @@ Laurent Destailleur <eldy@destailleur.fr> eldy <eldy@destailleur.fr>
|
||||
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <ldestailleur@teclib.com>
|
||||
Laurent Destailleur <eldy@destailleur.fr> eldy10 <eldy10@master8.(none)>
|
||||
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <ephpcsdy@destailleur.fr>
|
||||
Regis Houssin <regis.houssin@capnetworks.com> Regis Houssin <regis@dolibarr.fr>
|
||||
Regis Houssin <regis.houssin@capnetworks.com> Régis Houssin <regishoussin@device5.home>
|
||||
Regis Houssin <regis.houssin@inodbox.com> Regis Houssin <regis@dolibarr.fr>
|
||||
Regis Houssin <regis.houssin@inodbox.com> Régis Houssin <regishoussin@device5.home>
|
||||
Juanjo Menent <jmenent@2byte.es> simnandez <jmenent@2byte.es>
|
||||
Juanjo Menent <jmenent@2byte.es> Juanjo Menent <simnandez@gmail.com>
|
||||
Juanjo Menent <jmenent@2byte.es> Simnandez <jmenent@2byte.es>
|
||||
|
||||
302
.travis.yml
302
.travis.yml
@ -2,8 +2,8 @@
|
||||
# from Dolibarr GitHub repository.
|
||||
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
|
||||
|
||||
# We use dist: precise to have php 5.3 available
|
||||
dist: precise
|
||||
# We use dist: trusty to have php 5.4+ available
|
||||
dist: trusty
|
||||
sudo: required
|
||||
|
||||
language: php
|
||||
@ -20,7 +20,7 @@ addons:
|
||||
# To use the last version of pgloader, we add repo of postgresql
|
||||
- postgresql
|
||||
- sourceline: 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main'
|
||||
- key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
|
||||
- key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
|
||||
packages:
|
||||
# We need a webserver to test the webservices
|
||||
# Let's install Apache with.
|
||||
@ -31,7 +31,6 @@ addons:
|
||||
- pgloader
|
||||
|
||||
php:
|
||||
- '5.3'
|
||||
- '5.4'
|
||||
- '5.5'
|
||||
- '5.6'
|
||||
@ -62,8 +61,6 @@ matrix:
|
||||
- php: nightly
|
||||
# We exclude some combinations not usefull to save Travis CPU
|
||||
exclude:
|
||||
- php: '5.4'
|
||||
env: DB=mariadb
|
||||
- php: '5.5'
|
||||
env: DB=mariadb
|
||||
- php: '5.6'
|
||||
@ -72,8 +69,6 @@ matrix:
|
||||
env: DB=mariadb
|
||||
- php: '7.1'
|
||||
env: DB=mariadb
|
||||
- php: '5.4'
|
||||
env: DB=postgresql
|
||||
- php: '5.5'
|
||||
env: DB=postgresql
|
||||
- php: '5.6'
|
||||
@ -110,7 +105,7 @@ before_install:
|
||||
pgloader --version
|
||||
echo
|
||||
fi
|
||||
|
||||
|
||||
install:
|
||||
- |
|
||||
echo "Updating Composer"
|
||||
@ -129,7 +124,7 @@ install:
|
||||
|
||||
- |
|
||||
echo "Installing PHP Unit"
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then
|
||||
composer -n require phpunit/phpunit ^4
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
|
||||
@ -142,144 +137,150 @@ install:
|
||||
|
||||
- |
|
||||
echo "Installing PHP CodeSniffer"
|
||||
composer -n require squizlabs/php_codesniffer ^2
|
||||
composer -n require squizlabs/php_codesniffer ^3
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Adding path of binaries tools installed by composer to the PATH"
|
||||
export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH"
|
||||
echo
|
||||
|
||||
|
||||
|
||||
|
||||
before_script:
|
||||
- |
|
||||
echo Start travis
|
||||
echo Current dir is `pwd`
|
||||
echo Home dir is `echo ~`
|
||||
echo TRAVIS_BUILD_DIR is $TRAVIS_BUILD_DIR
|
||||
- |
|
||||
echo Start travis
|
||||
echo Current dir is `pwd`
|
||||
echo Home dir is `echo ~`
|
||||
echo TRAVIS_BUILD_DIR is $TRAVIS_BUILD_DIR
|
||||
|
||||
- |
|
||||
echo "Re-enabling Xdebug for PHP CodeSniffer and PHP Unit"
|
||||
phpenv config-add /tmp/xdebug.ini
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Setting up PHP"
|
||||
echo
|
||||
echo "Set timezone"
|
||||
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then
|
||||
#echo
|
||||
#echo "Enabling APC for PHP <= 5.4"
|
||||
# Documentation says it should be available for PHP <= 5.6 but it's not for 5.5 and 5.6!
|
||||
#echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
- |
|
||||
echo "Re-enabling Xdebug for PHP CodeSniffer and PHP Unit"
|
||||
phpenv config-add /tmp/xdebug.ini
|
||||
echo
|
||||
echo "Enabling Memcached for PHP <= 5.4"
|
||||
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0, 7.1, 7.2 and nightly!
|
||||
echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
fi
|
||||
phpenv rehash
|
||||
echo
|
||||
|
||||
- |
|
||||
if [ "$DEBUG" = true ]; then
|
||||
echo "Debugging informations"
|
||||
- |
|
||||
echo "Setting up PHP"
|
||||
echo
|
||||
echo "Set timezone"
|
||||
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then
|
||||
#echo
|
||||
#echo "Enabling APC for PHP <= 5.4"
|
||||
# Documentation says it should be available for PHP <= 5.6 but it's not for 5.5 and 5.6!
|
||||
#echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
echo
|
||||
echo "Enabling Memcached for PHP <= 5.4"
|
||||
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0, 7.1, 7.2 and nightly!
|
||||
echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
fi
|
||||
phpenv rehash
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Versions information"
|
||||
# Check PHP
|
||||
php -i
|
||||
echo "PHP version"
|
||||
php -i | head -
|
||||
# Check PHP CodeSniffer installation
|
||||
echo "PHPCS version"
|
||||
which phpcs
|
||||
phpcs --version
|
||||
phpcs -i
|
||||
phpcs --version | head -
|
||||
phpcs -i | head -
|
||||
# Check PHPUnit installation
|
||||
echo "PHPUnit version"
|
||||
which phpunit
|
||||
phpunit --version
|
||||
# Check MySQL
|
||||
mysql --version
|
||||
mysql -e "SELECT VERSION();"
|
||||
phpunit --version | head -
|
||||
# Check Apache version
|
||||
echo "Apache version"
|
||||
apache2 -v | head -
|
||||
# Check MariaDb
|
||||
echo "MariaDb version"
|
||||
mysql --version | head -
|
||||
mysql -e "SELECT VERSION();" | head -
|
||||
echo
|
||||
fi
|
||||
|
||||
- |
|
||||
echo "Setting up database"
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
|
||||
echo "MySQL"
|
||||
mysql -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
|
||||
mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql -e 'FLUSH PRIVILEGES;'
|
||||
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
#pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
#pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr
|
||||
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
|
||||
fi
|
||||
# TODO: SQLite
|
||||
echo
|
||||
|
||||
- |
|
||||
export CONF_FILE=htdocs/conf/conf.php
|
||||
echo "Setting up Dolibarr $CONF_FILE"
|
||||
echo '<?php ' > $CONF_FILE
|
||||
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
|
||||
fi
|
||||
# TODO: SQLite
|
||||
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
|
||||
cat $CONF_FILE
|
||||
echo
|
||||
- |
|
||||
echo "Setting up database"
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
|
||||
echo "MySQL"
|
||||
mysql -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
|
||||
mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql -e 'FLUSH PRIVILEGES;'
|
||||
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
#pgloader mysql://root:pass@127.0.0.1/dolibarr_35 postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dev
|
||||
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
|
||||
fi
|
||||
# TODO: SQLite
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Create documents directory and set permissions"
|
||||
# and admin/temp subdirectory needed for unit tests
|
||||
mkdir -p documents/admin/temp
|
||||
echo "first line" > documents/dolibarr.log
|
||||
echo
|
||||
- |
|
||||
export CONF_FILE=htdocs/conf/conf.php
|
||||
echo "Setting up Dolibarr $CONF_FILE"
|
||||
echo '<?php' > $CONF_FILE
|
||||
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
|
||||
fi
|
||||
# TODO: SQLite
|
||||
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
|
||||
cat $CONF_FILE
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Setting up Apache + FPM"
|
||||
- |
|
||||
echo "Create documents directory and set permissions"
|
||||
# and admin/temp subdirectory needed for unit tests
|
||||
mkdir -p $TRAVIS_BUILD_DIR/documents/admin/temp
|
||||
sudo chmod -R a+rwx $TRAVIS_BUILD_DIR/documents
|
||||
echo "***** First line of dolibarr.log" > $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
echo
|
||||
|
||||
|
||||
- echo "Setting up Apache + FPM"
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install apache2 libapache2-mod-fastcgi
|
||||
# enable php-fpm
|
||||
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
# Copy the included pool
|
||||
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf
|
||||
fi
|
||||
if [ "$DEBUG" = true ]; then
|
||||
cat ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf
|
||||
fi
|
||||
sudo a2enmod rewrite actions fastcgi alias
|
||||
echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
if [ "$DEBUG" = true ]; then
|
||||
cat ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
fi
|
||||
~/.phpenv/versions/$PHP_VERSION_NAME/sbin/php-fpm
|
||||
# configure apache virtual hosts
|
||||
sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/default
|
||||
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$TRAVIS_BUILD_DIR?g" --in-place /etc/apache2/sites-available/default
|
||||
if [ "$DEBUG" = true ]; then
|
||||
sudo cat /etc/apache2/sites-available/default
|
||||
fi
|
||||
sudo service apache2 restart
|
||||
echo
|
||||
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- |
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
# Copy the included pool
|
||||
sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
|
||||
fi
|
||||
- sudo a2enmod rewrite actions fastcgi alias
|
||||
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
|
||||
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
|
||||
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
|
||||
# configure apache virtual hosts for precise
|
||||
#- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
|
||||
#- sudo cat /etc/apache2/sites-available/default
|
||||
# configure apache virtual hosts for trusty
|
||||
- sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf
|
||||
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||
- sudo cat /etc/apache2/sites-available/000-default.conf
|
||||
- sudo service apache2 restart
|
||||
|
||||
|
||||
|
||||
script:
|
||||
- |
|
||||
echo "Checking webserver availability"
|
||||
echo "Checking webserver availability by a wget -O - http://127.0.0.1"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
wget http://127.0.0.1
|
||||
if [ "$DEBUG" = true ]; then
|
||||
cat index.html
|
||||
fi
|
||||
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
|
||||
wget -O - http://127.0.0.1 > test.html
|
||||
head test.html
|
||||
set +e
|
||||
echo
|
||||
|
||||
@ -287,7 +288,8 @@ script:
|
||||
echo "Checking PHP syntax errors"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
parallel-lint --exclude htdocs/includes --blame .
|
||||
#parallel-lint --exclude htdocs/includes --blame .
|
||||
parallel-lint --exclude htdocs/includes/sabre --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
|
||||
set +e
|
||||
echo
|
||||
|
||||
@ -296,7 +298,8 @@ script:
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 .
|
||||
#phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 .
|
||||
phpcs -s -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .
|
||||
set +e
|
||||
echo
|
||||
|
||||
@ -333,33 +336,34 @@ script:
|
||||
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log
|
||||
php upgrade2.php 6.0.0 7.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade600700-2.log
|
||||
php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log
|
||||
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log
|
||||
php upgrade2.php 7.0.0 8.0.0 MAIN_MODULE_TICKETSUP > $TRAVIS_BUILD_DIR/upgrade700800-2.log
|
||||
php step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log
|
||||
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log
|
||||
php upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log
|
||||
php step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log
|
||||
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log
|
||||
php upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log
|
||||
php step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log
|
||||
cd -
|
||||
set +e
|
||||
echo
|
||||
#cat $TRAVIS_BUILD_DIR/upgrade400500-2.log
|
||||
#cat $TRAVIS_BUILD_DIR/upgrade500600.log
|
||||
#cat $TRAVIS_BUILD_DIR/upgrade500600-2.log
|
||||
#cat $TRAVIS_BUILD_DIR/upgrade500600-3.log
|
||||
#cat /tmp/dolibarr_install.log
|
||||
|
||||
|
||||
- |
|
||||
echo "Unit testing"
|
||||
phpunit --version
|
||||
# Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file.
|
||||
set -e
|
||||
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||
phpunitresult=$?
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
set +e
|
||||
|
||||
- |
|
||||
#echo "Output dolibarr.log"
|
||||
#cat documents/dolibarr.log
|
||||
|
||||
after_script:
|
||||
- |
|
||||
# Dolibarr log file
|
||||
#echo "After script"
|
||||
#cat documents/dolibarr.log
|
||||
|
||||
echo "After script - Output 50 latest lines of dolibarr.log"
|
||||
ls $TRAVIS_BUILD_DIR/documents
|
||||
tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
|
||||
after_success:
|
||||
- |
|
||||
@ -367,20 +371,24 @@ after_success:
|
||||
|
||||
after_failure:
|
||||
- |
|
||||
echo Failure
|
||||
# This part of code seems to be never executed, error or not ???
|
||||
echo "Debugging informations"
|
||||
echo Failure detected, so we show samples of log to help diagnose
|
||||
# This part of code is executed only if previous commande that fails are enclosed with set +e
|
||||
# Upgrade log files
|
||||
cat *.log
|
||||
echo "Debugging informations"
|
||||
for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`
|
||||
do
|
||||
echo "Debugging informations for file $ficlog"
|
||||
#cat $ficlog
|
||||
done
|
||||
# Apache log file
|
||||
echo "Debugging informations for file apache error.log"
|
||||
sudo cat /var/log/apache2/error.log
|
||||
# Dolibarr log file
|
||||
cat documents/dolibarr.log
|
||||
if [ "$DEBUG" = true ]; then
|
||||
# Dolibarr log file
|
||||
echo "Debugging informations for file dolibarr.log (latest 50 lines)"
|
||||
tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
# MariaDB log file
|
||||
sudo cat /var/log/mysql/error.log
|
||||
echo "Debugging informations for file mysql error.log"
|
||||
sudo tail -n 50 /var/log/mysql/error.log
|
||||
# TODO: PostgreSQL log file
|
||||
echo
|
||||
fi
|
||||
|
||||
|
||||
25
.tx/config
25
.tx/config
@ -20,6 +20,12 @@ source_file = htdocs/langs/en_US/agenda.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.assets]
|
||||
file_filter = htdocs/langs/<lang>/assets.lang
|
||||
source_file = htdocs/langs/en_US/assets.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.banks]
|
||||
file_filter = htdocs/langs/<lang>/banks.lang
|
||||
source_file = htdocs/langs/en_US/banks.lang
|
||||
@ -32,6 +38,12 @@ source_file = htdocs/langs/en_US/bills.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.blockedlog]
|
||||
file_filter = htdocs/langs/<lang>/blockedlog.lang
|
||||
source_file = htdocs/langs/en_US/blockedlog.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.bookmarks]
|
||||
file_filter = htdocs/langs/<lang>/bookmarks.lang
|
||||
source_file = htdocs/langs/en_US/bookmarks.lang
|
||||
@ -152,12 +164,6 @@ source_file = htdocs/langs/en_US/hrm.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.incoterm]
|
||||
file_filter = htdocs/langs/<lang>/incoterm.lang
|
||||
source_file = htdocs/langs/en_US/incoterm.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.install]
|
||||
file_filter = htdocs/langs/<lang>/install.lang
|
||||
source_file = htdocs/langs/en_US/install.lang
|
||||
@ -356,6 +362,12 @@ source_file = htdocs/langs/en_US/supplier_proposal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.ticket]
|
||||
file_filter = htdocs/langs/<lang>/ticket.lang
|
||||
source_file = htdocs/langs/en_US/ticket.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.trips]
|
||||
file_filter = htdocs/langs/<lang>/trips.lang
|
||||
source_file = htdocs/langs/en_US/trips.lang
|
||||
@ -385,3 +397,4 @@ file_filter = htdocs/langs/<lang>/workflow.lang
|
||||
source_file = htdocs/langs/en_US/workflow.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
|
||||
84
CODE_OF_CONDUCT.md
Normal file
84
CODE_OF_CONDUCT.md
Normal file
@ -0,0 +1,84 @@
|
||||
# Code of Conduct
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
A primary goal of Dolibarr is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).
|
||||
|
||||
This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.
|
||||
|
||||
We invite all those who participate in Dolibarr to help us create safe and positive experiences for everyone.
|
||||
|
||||
## 2. Open Source Citizenship
|
||||
|
||||
A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.
|
||||
|
||||
Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.
|
||||
|
||||
If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.
|
||||
|
||||
## 3. Expected Behavior
|
||||
|
||||
The following behaviors are expected and requested of all community members:
|
||||
|
||||
* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
|
||||
* Exercise consideration and respect in your speech and actions.
|
||||
* Attempt collaboration before conflict.
|
||||
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
|
||||
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
|
||||
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
|
||||
|
||||
## 4. Unacceptable Behavior
|
||||
|
||||
The following behaviors are considered harassment and are unacceptable within our community:
|
||||
|
||||
* Violence, threats of violence or violent language directed against another person.
|
||||
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
|
||||
* Posting or displaying sexually explicit or violent material.
|
||||
* Posting or threatening to post other people’s personally identifying information ("doxing").
|
||||
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
|
||||
* Inappropriate photography or recording.
|
||||
* Inappropriate physical contact. You should have someone’s consent before touching them.
|
||||
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
|
||||
* Deliberate intimidation, stalking or following (online or in person).
|
||||
* Advocating for, or encouraging, any of the above behavior.
|
||||
* Sustained disruption of community events, including talks and presentations.
|
||||
|
||||
## 5. Consequences of Unacceptable Behavior
|
||||
|
||||
Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.
|
||||
|
||||
Anyone asked to stop unacceptable behavior is expected to comply immediately.
|
||||
|
||||
If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).
|
||||
|
||||
## 6. Reporting Guidelines
|
||||
|
||||
If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. contact@dolibarr.org.
|
||||
|
||||
|
||||
|
||||
Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.
|
||||
|
||||
## 7. Addressing Grievances
|
||||
|
||||
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Dolibarr with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
|
||||
|
||||
|
||||
|
||||
## 8. Scope
|
||||
|
||||
We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues–online and in-person–as well as in all one-on-one communications pertaining to community business.
|
||||
|
||||
This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.
|
||||
|
||||
## 9. Contact info
|
||||
|
||||
contact@dolibarr.org
|
||||
|
||||
## 10. License and attribution
|
||||
|
||||
This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
|
||||
|
||||
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
|
||||
|
||||
Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/)
|
||||
@ -53,6 +53,10 @@ JsTimezoneDetect 1.0.6 MIT License Yes
|
||||
SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer
|
||||
Ace 1.2.8 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
|
||||
Image libraries
|
||||
Octicons 8.1 MIT Yes
|
||||
|
||||
|
||||
For licenses compatibility informations:
|
||||
http://www.gnu.org/licenses/licenses.en.html
|
||||
|
||||
|
||||
534
ChangeLog
534
ChangeLog
@ -2,6 +2,538 @@
|
||||
English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
***** ChangeLog for 10.0.0 compared to 9.0.0 *****
|
||||
For Users:
|
||||
|
||||
For Developers:
|
||||
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* GetUrlTrackingStatus were renamed into getUrlTrackingStatus
|
||||
|
||||
|
||||
***** ChangeLog for 9.0.0 compared to 8.0.0 *****
|
||||
For Users:
|
||||
NEW: Stable module: DAV (WebDAV only for the moment)
|
||||
NEW: Stable module "Skype" has been replaced with module "Social Networks" to support more services.
|
||||
NEW: Stable module "Module Builder"
|
||||
NEW: Stable module: Website
|
||||
NEW: Experimental module "TakePos"
|
||||
NEW: Experimental module "Ticket"
|
||||
NEW: Experimental module "Data Privacy"
|
||||
NEW: Experimental module "Email Collector"
|
||||
NEW: Dolibarr can provide information in page title when multicompany is enabled of not, making
|
||||
Android application like DoliDroid able to provide native features for multicompany module.
|
||||
NEW: Compatibility with PHP 7.3 =>
|
||||
NEW: Add admin page for modulebuilder
|
||||
NEW: Add civility in list of members. Close #9251
|
||||
NEW: Add configuration to disable "customer/prospect" thirdparty type
|
||||
NEW: Add CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY and CONTRACT_HIDE_UNSELECTABLES by SELECT_HIDE_UNSELECTABLES
|
||||
NEW: Add __DAY_TEXT__ and __MONTH_TEXT__ substitutions vars
|
||||
NEW: Add due date column in payment lists
|
||||
NEW: Add email in event history, for reminder email of expired subsription
|
||||
NEW: Add event tab on resource record
|
||||
NEW: Add FEC Export in accountancy
|
||||
NEW: Add filter on staff range in list of thirdparties
|
||||
NEW: Add a first complete template of website
|
||||
NEW: Add format code into exported filename of ledger
|
||||
NEW: Add hidden option EXPENSEREPORT_DEFAULT_VALIDATOR_UNCHANGEABLE
|
||||
NEW: Add hidden option MAIN_DOCUMENTS_DESCRIPTION_FIRST
|
||||
NEW: Add link to inventory code
|
||||
NEW: Add more common social networks fields for business
|
||||
NEW: Add option PDF_DISABLE_MYCOMPANY_LOGO to disable logo on PDF
|
||||
NEW: add option PROPOSAL_AUTO_ADD_AUTHOR_AS_CONTACT
|
||||
NEW: Add option to display thirdparty adress in combolist
|
||||
NEW: Add option to swap sender/recipient address on PDF
|
||||
NEW: Add option to display thirdparty adress in combolist
|
||||
NEW: Add project on pament of salaries
|
||||
NEW: Add SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME and
|
||||
NEW: Add somes hooks in bank planned entries
|
||||
NEW: Add supplier ref in item reception page
|
||||
NEW: Advanced permission to ignore price min
|
||||
NEW: Allow to enter a timespent with a numeric value
|
||||
NEW: Automatic position of scroll when creating an extrafield
|
||||
NEW: Can add autorefresh=X in any URLs to refresh page after X seconds
|
||||
NEW: can add project's task to agenda on create event form
|
||||
NEW: Can delete a website in experimental website module
|
||||
NEW: Can disable meteo on smartphone only
|
||||
NEW: Can export/import a website template
|
||||
NEW: Can filter on EEC, not EEC, etc... in binding step of accountancy
|
||||
NEW: Can mix offset before and after with rules for due date of invoices
|
||||
NEW: Can record the supplier product description
|
||||
NEW: Can select several prospect level in thirdparty filter.
|
||||
NEW: Can set 2 url in url field of thirdparty
|
||||
NEW: Can set if a field is mandatory on form level.
|
||||
NEW: Can set the default focus of each page.
|
||||
NEW: Add category filter on user list
|
||||
NEW: Change forgotten password link in general parameters
|
||||
NEW: Child label of variants change if parent label changes
|
||||
NEW: Compatibility with new Paybox HMAC requirement
|
||||
NEW: Each user can set its prefered default calendar page
|
||||
NEW: Enhancement in process to make manual bank conciliation
|
||||
NEW: Enhancement in the generic file manager
|
||||
NEW: Extrafield totalizable
|
||||
NEW: Hidden conf INVOICE_USE_DEFAULT_DOCUMENT
|
||||
NEW: hidden conf to search product by supplier ref
|
||||
NEW: hidden constant to be able to use a thirdparty for donation
|
||||
NEW: hidden option to define an invoice template for each invoice type
|
||||
NEW: Highlight lines on lists when they are checked
|
||||
NEW: Notification module support expense report+holiday validation and approval
|
||||
NEW: On customer/supplier card, add simple tooltip to amount boxes
|
||||
NEW: Page to check if the operations/items created between two dates have attached item(s) and possibility to download all attachements
|
||||
NEW: possibility to add all rights of all modules in one time
|
||||
NEW: redirect if only one result on global search on card
|
||||
NEW: Permission to ignore price min
|
||||
NEW: Can build an archive of full documents directory from backup page
|
||||
NEW: tag odt line_product_ref_fourn for supplier doc lines
|
||||
NEW: The binding step in accountancy has a country filter with autocompletion
|
||||
NEW: Top menu is always on screen with MD theme.
|
||||
NEW: Withdraw request massaction can include already partially paid invoices
|
||||
NEW: Option "Simplify interface for blind persons"
|
||||
|
||||
For developers:
|
||||
NEW: Add lib for multiselect with checkboxes
|
||||
NEW: Add function isValidMXRecord
|
||||
NEW: Add hook changeRoundingMode in update_price
|
||||
NEW: Add hook formconfirm to contractcard
|
||||
NEW: Add hook for virtual stock
|
||||
NEW: ADD url to see the last version of a external module
|
||||
NEW: Can enable a module, even external module, from command line
|
||||
NEW: Can set a tooltip help text on extrafields
|
||||
NEW: Add product search from barcode via REST api
|
||||
NEW: can add documents on agenda events using API REST
|
||||
NEW: Can set the datestart and dateend of cron job into module descriptor
|
||||
NEW: Close #9296 Add field ref_ext into llx_categorie
|
||||
NEW: move ticket dictionary in API /setup
|
||||
NEW: PHPUnitTest on Loan class #3163
|
||||
NEW: Code changes to be more compatible with PSR2
|
||||
NEW: Removed trigger USER_LOGOUT, USER_LOGIN, USER_LOGIN_FAILED (Some hooks are already dedicated for that)
|
||||
NEW: Add agenda documents in API REST
|
||||
NEW: Add "checked" field for new list engine compatibility
|
||||
NEW: REST API improvements
|
||||
NEW: Save external payment IDs into table of payment
|
||||
NEW: triggers add commercial and del commercial
|
||||
NEW: #9236 Allow to import shipment lines via API
|
||||
NEW: ADD civility list in API
|
||||
NEW: support selllist in the module builder
|
||||
NEW: optional param to show a specific extrafield
|
||||
NEW: hook formConfirm always called if hooked
|
||||
NEW: hook on dispatch order fourn
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* If you use some links like viewimages.php?modulepart=mycompany&file=... in your external modules, you must
|
||||
replace them with links like viewimages.php?modulepart=mycompany&file=logos/... (note that link change only for
|
||||
modulepart=mycompany that now works like others).
|
||||
* Hidden option MAIN_PDF_SHIPPING_DISPLAY_AMOUNT_HT has been renamed into SHIPPING_PDF_DISPLAY_AMOUNT_HT
|
||||
* Remove the no more used and deprecated dol_print_graph function
|
||||
|
||||
|
||||
***** ChangeLog for 8.0.4 compared to 8.0.3 *****
|
||||
FIX: #10030 better german chart
|
||||
FIX: #10036
|
||||
FIX: #10080 Supplier translations are in english
|
||||
FIX: #10183 using backport of fix done in 9.0
|
||||
FIX: #10218 Bad redirection after deleting a user or group
|
||||
FIX: #3234
|
||||
FIX: #6580
|
||||
FIX: #8741
|
||||
FIX: #9629 #9625
|
||||
FIX: #9971
|
||||
FIX: avoid Class 'AdherentType' not found
|
||||
FIX: Can relaunch install on v8
|
||||
FIX: Can't create a thirdparty from member if customer code is mandatory.
|
||||
FIX: Can't delete a line of minimal stock per warehouse
|
||||
FIX: check if "entity" is already defined in "$param"
|
||||
FIX: contact/address tab issue when changing company
|
||||
FIX: contact/adress tab: when changing company ajax combo, the first contact change is not taken into account
|
||||
FIX: CVE-2018-19799
|
||||
FIX: CVE-2018-19992
|
||||
FIX: CVE-2018-19993
|
||||
FIX: CVE-2018-19994
|
||||
FIX: CVE-2018-19995 and CVE-2018-19998
|
||||
FIX: Error reported when creation of thirdparty from member fails
|
||||
FIX: export only prices of the current entity !
|
||||
FIX: Extrafields on shipment module
|
||||
FIX: filter on product category doesn't work
|
||||
FIX: form actions: select_type_actions could be too small + bad $db init
|
||||
FIX: form actions: select_type_actions could be too small + bad init
|
||||
FIX: fourn payment modes musn't be available on customer docs
|
||||
FIX: Function updatePrice with wrong parameters
|
||||
FIX: hidden extrafield
|
||||
FIX: if qty is 0
|
||||
FIX: If we change customer/supplier rule we can't edit old thirdparty.
|
||||
FIX: lang not loaded
|
||||
FIX: Lines are not inserted correctly if VAT have code
|
||||
FIX: marge sign
|
||||
FIX: Method setValid not found
|
||||
FIX: Migration do not create not used table
|
||||
FIX: missing action "edit" for the hook
|
||||
FIX: missing field "visible"
|
||||
FIX: Missing last month on vat report per month
|
||||
FIX: mode is only customer in stats fichinter
|
||||
FIX: OppStatusShort doesn't exists
|
||||
FIX: Remote ip detection was wrong with proxy (example: cloudflare)
|
||||
FIX: Removed not use table
|
||||
FIX: Replenishment with option STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE
|
||||
FIX: responsive
|
||||
FIX: Same on customer card
|
||||
FIX: same on lines
|
||||
FIX: screen size fall
|
||||
FIX: Select first mail model by default
|
||||
FIX: slow SQL query on creating a new supplier invoice
|
||||
FIX: sql query performance on list_qualified_avoir_supplier_invoices.
|
||||
FIX: supplier order list keep socid
|
||||
FIX: Same on customer card
|
||||
FIX: same on lines
|
||||
FIX: screen size fall
|
||||
FIX: Select first mail model by default
|
||||
FIX: slow SQL query on creating a new supplier invoice
|
||||
FIX: sql query performance on list_qualified_avoir_supplier_invoices.
|
||||
FIX: supplier order list keep socid
|
||||
FIX: Vendor translations are in english
|
||||
FIX: Warning: count()
|
||||
FIX: We want to be able to send PDF of paid invoices
|
||||
|
||||
***** ChangeLog for 8.0.3 compared to 8.0.2 *****
|
||||
FIX: #9161
|
||||
FIX: #9432
|
||||
FIX: #9432 Assign yourself as a commercial when you don't have permission to see all thirds
|
||||
FIX: #9510
|
||||
FIX: #9567
|
||||
FIX: According to french law, if seller is in France and buyer isn't in UE and isn't a company, TVA used = TVA product
|
||||
FIX: Amount when using mutlicurrency on PDF
|
||||
FIX: Backup of database without mysqladmin available from cron.
|
||||
FIX: Bad label on delete button
|
||||
FIX: bad link in notification
|
||||
FIX: Bad position of hook formattachOptions call
|
||||
FIX: Can't create shipping if have shipping line's extrafields
|
||||
FIX: check !empty exclude select element
|
||||
FIX: content lost when editing a label with "
|
||||
FIX: correct migration of old postgresql unique key
|
||||
FIX: credit note progression
|
||||
FIX: default accounting accounts on loan creation #9643
|
||||
FIX: Delete of draft invoice
|
||||
FIX: deletion on draft is allowed if we are allwoed to create
|
||||
FIX: Do not show check box if not applicable
|
||||
FIX: exclude element of the select
|
||||
FIX: extrafields of taks not visible in creation
|
||||
FIX: filter on employee
|
||||
FIX: invoice stats: situation invoices were not counted
|
||||
FIX: keep external module element when adding resource
|
||||
FIX: langs fr
|
||||
FIX: Link template invoice to contract
|
||||
FIX: Look and feel v8. Missing button "Create category"
|
||||
FIX: Menu to show/edit Users categories was missing
|
||||
FIX: missing name alias field in societe import/export #9091
|
||||
FIX: missing symbol for indian rupies
|
||||
FIX: Missing transaction around action
|
||||
FIX: modify parenting before task deletion
|
||||
FIX: nb of session in title
|
||||
FIX: need to filter on current entity on replenish
|
||||
FIX: number mailing for a contact with multicompany
|
||||
FIX: Option for prof id mandatory not working with custom type of company
|
||||
FIX: Option MAIN_DISABLE_NOTES_TAB #9611
|
||||
FIX: Pagination stats
|
||||
FIX: pdf typhon: order reference duplicate
|
||||
FIX: position 0 for emails templates
|
||||
FIX: previous situation invoice selection
|
||||
FIX: Product marge tabs on product card
|
||||
FIX: Product margin tab and credit note
|
||||
FIX: propal pdf: missing parenthesis for customs code
|
||||
FIX: properties on proposal must not be modified if error
|
||||
FIX: qty not visible for a lot when making shipment on a dedicated stock
|
||||
FIX: Quick hack to solve pb of bad definition of public holidays
|
||||
FIX: remain to pay for credit note was wrong on invoice list
|
||||
FIX: replenish wasn't caring about supplier price min quantity #9561
|
||||
FIX: Required extrafield value numeric should accept '0'
|
||||
FIX: ressource list with extrafields
|
||||
FIX: restore last seach criteria
|
||||
FIX: Selection of addmaindocfile is lost on error
|
||||
FIX: Sending of reminder for expired subscriptions
|
||||
FIX: shared link ko on proposals
|
||||
FIX: showOptionals: column mismatches
|
||||
FIX: situation invoice total with credit note
|
||||
FIX: situation invoice prev percent
|
||||
FIX: special code on create supplier invoice from supplier order
|
||||
FIX: Symbol of currency in substitution variables
|
||||
FIX: The max size for upload file was not corectly shown
|
||||
FIX: the member e-mail on resign and validation.
|
||||
FIX: thirdparty property of object not loaded when only one record
|
||||
FIX: title
|
||||
FIX: Title problem on admin RSS module
|
||||
FIX: Tooltip on invoice widget
|
||||
FIX: Total of timespent
|
||||
FIX: trackid into email sent from member module.
|
||||
FIX: translation in select unit form
|
||||
FIX: use discount with multicurrency
|
||||
FIX: Variable name
|
||||
FIX: When we delete a product, llx_product_association rows are not deleted
|
||||
FIX: when we're just admin and not super admin, if we create new user with transverse mode, we don't see it then we can't add him in usergroup
|
||||
FIX: wrong function name
|
||||
FIX: wrong occurence number of contract on contact card, we must only count externals
|
||||
FIX: wrong value for module part and return access denied
|
||||
FIX: Wrong variable name
|
||||
FIX: XSS vulnerability reported by Mary Princy E
|
||||
|
||||
***** ChangeLog for 8.0.2 compared to 8.0.1 *****
|
||||
FIX: #8452
|
||||
FIX: #9043
|
||||
FIX: #9316 Error when listing invoices
|
||||
FIX: #9317
|
||||
FIX: #9353 Bug: html error - div inside span on graphs
|
||||
FIX: #9355
|
||||
FIX: #9393 inconsistency behaviour. option FACTURE_ENABLE_NEGATIVE_LINES
|
||||
FIX: #9394
|
||||
FIX: #9396
|
||||
FIX: #9403
|
||||
FIX: #9412
|
||||
FIX: #9497
|
||||
FIX: Add paypal error message in alert email when online payment fails.
|
||||
FIX: better compatibility with multicompany
|
||||
FIX: capital must be empty and not 0 if undefined
|
||||
FIX: character making error on bill list
|
||||
FIX: Entering negative price on order.
|
||||
FIX: Expedition not showing extrafields on creation.
|
||||
FIX: Homepage links were using wrong topmenus
|
||||
FIX: inconsistency behaviour on option FACTURE_ENABLE_NEGATIVE_LINES
|
||||
FIX: invert mime type and name.
|
||||
FIX: invoice popup hide localtax2 and 3 if not defined.
|
||||
FIX: Lose filter on payment type or category after a sort on invoice list.
|
||||
FIX: Maxi debug to allow to load chart of account with multicompany.
|
||||
FIX: Missing translation in predefined email to membership renewal.
|
||||
FIX: Mixing tickets of different thirdparties.
|
||||
FIX: "Other ..." link so the "Back to" link works.
|
||||
FIX: PDF address: handle when contact thirdparty is different from thirdparty of document
|
||||
FIX: Problems with permissions of module to record payment of salaries
|
||||
FIX: remove debug
|
||||
FIX: Several fixes on the management of minimal amount for orders
|
||||
FIX: wrong var name
|
||||
|
||||
***** ChangeLog for 8.0.1 compared to 8.0.0 *****
|
||||
FIX: #9258
|
||||
FIX: #9328
|
||||
FIX: #9337
|
||||
FIX: adding GROUP BY for PostgreSQL
|
||||
FIX: API template for list pages in module builder
|
||||
FIX: API template for record page to delete a record
|
||||
FIX: a removed option was still in setup
|
||||
FIX: badge on time spent on project and tasks
|
||||
FIX: Delete file on smartphone
|
||||
FIX: Fetch function will fetch comments
|
||||
FIX: Fetch task will now fetch comments
|
||||
FIX: $fk_account is always empty, must be $soc->fk_account
|
||||
FIX: Force stripe api version to avoid trouble if we update stripe api
|
||||
FIX: get_product_vat_for_country functions.lib.php
|
||||
FIX: Get templates in a forced language
|
||||
FIX: hook on dispatch order fourn
|
||||
FIX: Language selection lost if error during creation of email template
|
||||
FIX: Look and feel v8
|
||||
FIX: propal.class.php
|
||||
FIX: Add calls to fetchComments function
|
||||
FIX: Remove fetchComments from project and task fetch function
|
||||
FIX: remove internal property isextrafieldmanaged from API returns
|
||||
FIX: sql error
|
||||
FIX: table llx_chargessociales doesn't exists
|
||||
FIX: trans on null object
|
||||
FIX: vat rate code not returned by get_product_vat_for_country
|
||||
FIX: warning for late template invoices to remove when suspended
|
||||
FIX: Add hidden option MAIN_xxx_IN_SOURCE_ADDRESS to solve legal issues on PDF
|
||||
FIX: Table llx_facture_rec_extrafields missing after migration
|
||||
|
||||
|
||||
***** ChangeLog for 8.0.0 compared to 7.0.0 *****
|
||||
For Users:
|
||||
NEW: Experimental module: Ticket
|
||||
NEW: Experimental module: WebDAV
|
||||
NEW: Accept anonymous events (no user assigned)
|
||||
NEW: Accountancy - Add import on general ledger
|
||||
NEW: Accountancy - Show journal name on journal page and hide button draft export (Add an option in admin)
|
||||
NEW: Can create event from record card of a company and/or member
|
||||
NEW: Add a button to create Stripe customer from the customer Payment mode tab
|
||||
NEW: Add accounting account number on product tooltip
|
||||
NEW: Add any predefined mail content
|
||||
NEW: Add arrows to navigate into containers in experimental website module
|
||||
NEW: Add a tab to specify accountant/auditor of the company
|
||||
NEW: Add Date delivery and Availability on Propals List
|
||||
NEW: Add date in goods reception supplier order table
|
||||
NEW: Add delivery_time_days of suppliers in export profile
|
||||
NEW: Add Documents'tab to expedition module
|
||||
NEW: Use dol_print_phone in thirdparty list page to format phone
|
||||
NEW: Add entry for the GDPR contact
|
||||
NEW: Add extrafield type "html"
|
||||
NEW: Add file number in accountant card and update export filename
|
||||
NEW: Add files management on products lot
|
||||
NEW: add filter on project task list
|
||||
NEW: Add hidden option COMPANY_AQUARIUM_CLEAN_REGEX to clean generated
|
||||
NEW: add internal stripe payment page for invoice
|
||||
NEW: Add key __USER_REMOTE_IP__ into available substitution variables
|
||||
NEW: Add link between credit note invoice and origin
|
||||
NEW: Add linked file tab to vat
|
||||
NEW: add link to stripe's info in bank menu
|
||||
NEW: Add margin filters
|
||||
NEW: Add mass action enable/disable on cron job list
|
||||
NEW: Add mass action on project's list to close projects
|
||||
NEW: Add method to register distributed payments on invoices
|
||||
NEW: Add multicurrency support for product buy price for supplier propales, orders and invoices
|
||||
NEW: Add name of day in the timesheet input page per day.
|
||||
NEW: add new parameters for tcpf encryption
|
||||
NEW: add optional esign field in pdf propal
|
||||
NEW: Add option BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD
|
||||
NEW: Add option CONTRACT_SYNC_PLANNED_DATE_OF_SERVICES
|
||||
NEW: Add param $dolibarr_main_restrict_ip in config file to limit ips
|
||||
NEW: add pdf function to check if pdf file is protected/encrypted
|
||||
NEW: Add pdf template for stock/warehouse module
|
||||
NEW: Add phone format for a lot of countries
|
||||
NEW: Add product and product categories filters on customer margins
|
||||
NEW: Add product categories filter on product margin
|
||||
NEW: Add romanian chart of accounts
|
||||
NEW: Add stats in salaries module
|
||||
NEW: add stripe transaction
|
||||
NEW: Add tab contact on supplier proposals
|
||||
NEW: Add total of time spent in timespent page at top of page too.
|
||||
NEW: Add trigger CONTRACT_MODIFY
|
||||
NEW: Add triggers on ECM object and add fill src_object_type/id fields
|
||||
NEW: Add type of website container/page into dictionary
|
||||
NEW: advance target filtering can be used everywhere with tpl and fk_element
|
||||
NEW: Allow negative quantity for dispatch (supplier order)
|
||||
NEW: bank reconcile: checkbox to select all bank operations
|
||||
NEW: Better performance with openldap
|
||||
NEW: Can add filter actiontype and notactiontype on event ical export
|
||||
NEW: Can add product in supplier order/invoice even w/o predefined price
|
||||
NEW: cancel orders on massaction
|
||||
NEW: Can crop image files attached in "document" tabs of a member
|
||||
NEW: Can delete dir content in media and ECM module recursively
|
||||
NEW: Can dispatch if more than ordered (if hidden option set)
|
||||
NEW: Can edit the text color for title line of tables
|
||||
NEW: Can enter time spent from the list of time spent of project
|
||||
NEW: Can export leave requests
|
||||
NEW: Can filter on account range in general ledger grouped by account
|
||||
NEW: Can filter on country and taxid into the binding page
|
||||
NEW: Can filter on progression in timesheet
|
||||
NEW: Can fix the bank account of a payment if payment not conciliated
|
||||
NEW: Can force usage of shared link for photo of products
|
||||
NEW: Can get template of email from its label
|
||||
NEW: Can see Unit Purchase Value of product in stock movement
|
||||
NEW: Can select from the user list into send form email (For field to and CC)
|
||||
NEW: Can select sample to use when creating a new page
|
||||
NEW: can send mail from project card
|
||||
NEW: Can set position of images in module tickets
|
||||
NEW: Can set the reply-to into email sent
|
||||
NEW: Can set the start/end date of service line in invoice templates
|
||||
NEW: Can share any file from the "Document" tab.
|
||||
NEW: Can sort on priority in task scheduler list
|
||||
NEW: Can sort order of files in attach tab for leave and expensereport
|
||||
NEW: Can use setValueFrom without user modification field
|
||||
NEW: Cat set the encryption algorithm for extrafields of type password
|
||||
NEW: check idprof1 for country pt
|
||||
NEW: default add action: new param $backurlforcard to redirect to card
|
||||
NEW: default warehouse field for products + prefill warehouses when dispatching supplier orders
|
||||
NEW: Display price HT on all commercial area boards
|
||||
NEW: display total on contract service list
|
||||
NEW: display weight volume in proposal
|
||||
NEW: Edit of extrafields position page on the edit form
|
||||
NEW: Experimental DAV module provides a public and private directory
|
||||
NEW: export filter models can be share or not by user
|
||||
NEW: Externalsite module can accept iframe content.
|
||||
NEW: Filter export model is now by user
|
||||
NEW: Finish implementation of option PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES
|
||||
NEW: generalize use of button to create new element from list
|
||||
NEW: hidden conf AGENDA_NB_WEEKS_IN_VIEW_PER_USER to set nb weeks to show into per user view
|
||||
NEW: hidden conf to assign category to thirparty that are neither customer nor prospect or supplier
|
||||
NEW: hidden conf to set nb weeks to show into user view
|
||||
NEW: hidden option MAIN_DISABLE_FREE_LINES
|
||||
NEW: improve way of adding users/sales representative to thirdparty
|
||||
NEW: Introduce option THIRDPARTY_QUICKSEARCH_ON_FIELDS to personalize fields use to search on quick search.
|
||||
NEW: Introduce permission "approve" for "leave request" like for "expense report"
|
||||
NEW: Load product data optional fields to the line -> enables to use "line_options_{extrafield}"
|
||||
NEW: Look and feel v8 - Show Picto "+" on all links "Add record"
|
||||
NEW: Look and feel v8: Use a different picto for delete and unlink
|
||||
NEW: mail templates for projects
|
||||
NEW: Module variant supported on services
|
||||
NEW: monthly VAT report show "Claimed for the period" + "Paid during this
|
||||
NEW: Mutualize code for action="update_extras"
|
||||
NEW: On invoice card, show accounting account linked
|
||||
NEW: Online payment of invoice and subscription record the payment
|
||||
NEW: OnSearchAndListGoOnCustomerOrSupplierCard conf
|
||||
NEW: Optimize load of hooks classes (save 1-5Kb of memory)
|
||||
NEW: Option MAIN_SHOW_REGION_IN_STATE renamed into MAIN_SHOW_REGION_IN_STATE_SELECT are more complete
|
||||
NEW: Option to force all emails recipient
|
||||
NEW: Hidden option to send to salaries into emails forms
|
||||
NEW: order minimum amount
|
||||
NEW: add price in burger menu on mouvement list
|
||||
NEW: Report a list of leave requests for a month
|
||||
NEW: Section of files generated by mass action not visible if empty
|
||||
NEW: send mails from project card
|
||||
NEW: Show also size in bytes in tooltip if visible unit is not bytes
|
||||
NEW: Show keyboard shortcut of nav arrow into tooltip
|
||||
NEW: Show last result code of cron jobs in error in red
|
||||
NEW: Show region in company info & Global option to show state code MAIN_SHOW_STATE_CODE
|
||||
NEW: Show total number of records by category
|
||||
NEW: Show total of time consumed in week in time spent entry page
|
||||
NEW: Stripe online payments reuse the same stripe customer account
|
||||
NEW: Suggest link to pay online for customer orders
|
||||
NEW: supplier credit notes is now supported like for customer credit notes
|
||||
NEW: supplier order/order lines export: add supplier product ref
|
||||
NEW: supplier relative discounts
|
||||
NEW: Support alternative aliases of page name in website
|
||||
NEW: syslog file autoclean
|
||||
NEW: thirdparty categ filter on lists
|
||||
NEW: Use a css style for weekend in time spent
|
||||
NEW: Use common substitution rule for language to get translation in ODT
|
||||
NEW: Variable __ONLINE_PAYMENT_URL__ available in email templates
|
||||
|
||||
For developers:
|
||||
NEW: class reposition can also work on POST (not only GET)
|
||||
NEW: add a hook in dol_print_phone
|
||||
NEW: The field "visible" on extrafield can accept expression as condition
|
||||
NEW: Upgrade of Stripe lib to 6.4.1
|
||||
NEW: work on CommonObject 'array' field typeNew common object array
|
||||
NEW: method Form::selectArrayFilter() + use in left menu search
|
||||
NEW: [REST API] Add the possibility to remove a category from a thirdparty
|
||||
NEW: doActions on categorycard
|
||||
NEW: add "moreHtmlRef" hook
|
||||
NEW: add hook for more permissions control
|
||||
NEW: add hook moreHtmlStatus to complete to status on banners
|
||||
NEW: Add hook printEmail
|
||||
NEW: Add hook setContentSecurityPolicy
|
||||
NEW: Add password_hash as a hash algorithm
|
||||
NEW: Add dol_is_link function
|
||||
NEW: Adds a contact to an invoice with REST API
|
||||
NEW: Adds a payment for the list of invoices given as parameter
|
||||
NEW: adds billing contacts ids to REST API returns
|
||||
NEW: Add showempty parameter in country selection
|
||||
NEW: add printUserListWhere hook
|
||||
NEW: add "printUserPasswordField" hooks
|
||||
NEW: Call to trigger on payment social contribution creation
|
||||
NEW: Call to trigger on social contribution creation
|
||||
NEW: hook getnomurltooltip is replaced with hook getNomUrl more powerfull
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* Remove old deprecated hook 'insertExtraFields'. Triggers must be used for action on CRUD events.
|
||||
* Hook 'maildao' was renamed into 'mail' into the method sendfile that send emails, and method was renamed from
|
||||
'doaction' into 'sendMail'.
|
||||
* Rename trigger CONTRACT_SERVICE_ACTIVATE into LINECONTRACT_ACTIVATE and
|
||||
CONTRACT_SERVICE_CLOSE into LINECONTRACT_CLOSE
|
||||
* Remove triggers *_CLONE. The trigger CREATE with context 'createfromclone' is already called so this is
|
||||
a duplicated feature. Cloning is not a business event, the business event is CREATE, so no trigger required.
|
||||
* PHP 5.3 is no more supported. Minimum PHP is now 5.4+
|
||||
* Remove the old deprecated code of doActions and getInstanceDao in canvas. The doActions of standard hooks are
|
||||
already available and are better.
|
||||
* Removed method fetch_prods() and get_each_prod() not used, keep only get_arbo_each_prod() that is better.
|
||||
* The hook contaxt commcard has been renamed thirdpartycomm
|
||||
* The hook contaxt thirdpartycard has been renamed thirdpartycontact
|
||||
* Remove method Categorie:get_nb_categories() that was not used.
|
||||
* Hook getnomurltooltip provide a duplicate feature compared to hook getNomUrl so all hooks getnomurltooltip
|
||||
are now replaced with hook getNomUrl.
|
||||
* The substitution key __CONTACTCIVNAME__ is no longer present, it has been replaced by __CONTACT_NAME_{TYPE}__
|
||||
where {TYPE} is contact type code (BILLING, SHIPPING, CUSTOMER, ... see contact type dictionnary).
|
||||
|
||||
|
||||
***** ChangeLog for 7.0.5 compared to 7.0.4 *****
|
||||
FIX: #3234
|
||||
@ -292,7 +824,7 @@ FIX: Use of undefined constant _ROWS_2
|
||||
FIX: warning when adding ECM files using old photo path
|
||||
|
||||
|
||||
***** ChangeLog for 7.0.0 compared to 6.0.5 *****
|
||||
***** ChangeLog for 7.0.0 compared to 6.0.7 *****
|
||||
For users:
|
||||
NEW: Add a preview icon after files that can be previewed (pdf + images)
|
||||
NEW: When payment is registered, PDF of invoices are also regenerated so payments
|
||||
|
||||
55
README-FR.md
55
README-FR.md
@ -16,8 +16,8 @@ Dolibarr est distribué sous les termes de la licence GNU General Public License
|
||||
## INSTALLER DOLIBARR
|
||||
|
||||
Si vous n'avez pas de connaissances techniques, et que vous recherchez
|
||||
un programme d'installation qui install Dolibarr ERP/CRM en quelques clics,
|
||||
vous devez vous réorienter vers DoliWamp (la version tout-en-un
|
||||
un programme d'installation qui installe Dolibarr ERP/CRM en quelques clics,
|
||||
vous devez vous ré-orienter vers DoliWamp (la version tout-en-un
|
||||
de Dolibarr pour Windows), DoliDeb (la version tout-en-un pour Debian ou
|
||||
Ubuntu) ou DoliRpm (la version tout-en-un de Dolibarr pour Fedora, Redhat,
|
||||
OpenSuse, Mandriva ou Mageia).
|
||||
@ -25,39 +25,39 @@ OpenSuse, Mandriva ou Mageia).
|
||||
Vous pouvez les télécharger depuis la rubrique *download* du portail officiel:
|
||||
https://www.dolibarr.org/
|
||||
|
||||
Si vous avez déjà installé un serveur Web avec PHP et une base de donnée (MariaDb/MySql/PostgreSql),
|
||||
Si vous avez déjà installé un serveur Web avec PHP et une base de données (MariaDb/MySql/PostgreSql),
|
||||
vous pouvez installer Dolibarr avec cette version de la manière suivante:
|
||||
|
||||
- Copier le répertoire "dolibarr" et son contenu dans la racine de votre serveur
|
||||
web, ou bien copier le répertoire sur le serveur et configurer ce serveur pour
|
||||
- Copiez le répertoire "dolibarr" et son contenu dans la racine de votre serveur
|
||||
web, ou bien copiez le répertoire sur le serveur et configurez ce serveur pour
|
||||
utiliser "dolibarr/htdocs" comme racine d'un nouveau virtual host (ce second
|
||||
choix requiert des compétences et habilitations en administration du serveur
|
||||
web).
|
||||
|
||||
- Créer un fichier vide "htdocs/conf/conf.php" et attribuer les permissions
|
||||
- Créez un fichier vide "htdocs/conf/conf.php" et attribuez les permissions
|
||||
en lecture et écriture pour le user du serveur web (les permissions en
|
||||
écriture seront supprimées une fois l'installation terminée).
|
||||
|
||||
- Depuis votre navigateur, appeler la page "install/" de dolibarr. L'url dépend
|
||||
du choix fait à la première etape:
|
||||
- Depuis votre navigateur, appelez la page "install/" de dolibarr. L'url dépend
|
||||
du choix fait à la première étape:
|
||||
http://localhost/dolibarr/htdocs/install/
|
||||
ou
|
||||
http://yourdolibarrvirtualhost/install/
|
||||
|
||||
- Suivez les instructions fournies par l'installeur...
|
||||
- Suivez les instructions fournies par l'installateur...
|
||||
|
||||
|
||||
|
||||
## METTRE A JOUR DOLIBARR
|
||||
|
||||
Pour mettre a jour Dolibarr depuis une vieille version vers celle ci:
|
||||
- Ecraser les vieux fichiers dans le vieux repertoire 'dolibarr' par les fichiers
|
||||
Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
|
||||
- Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers
|
||||
fournis dans ce nouveau package.
|
||||
|
||||
- Au prochain accès, Dolibarr proposera la page de "mise a jour" des données (si necessaire).
|
||||
Si un fichier install.lock existe pour vérouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transféré sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents")
|
||||
|
||||
*Note: Le processus de migration peut etre lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/*
|
||||
- Au prochain accès, Dolibarr proposera la page de "mise à jour" des données (si nécessaire).
|
||||
Si un fichier install.lock existe pour verrouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transférés sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents")
|
||||
|
||||
*Note: Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/*
|
||||
|
||||
|
||||
## CE QUI EST NOUVEAU
|
||||
@ -94,14 +94,15 @@ Voir fichier ChangeLog.
|
||||
|
||||
- Gestion de marque-pages
|
||||
- Gestion des promesses de dons
|
||||
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
|
||||
- Rapports
|
||||
- Imports/Exports des données
|
||||
- Support des codes barres
|
||||
- Calcul des marges
|
||||
- Connectivité LDAP
|
||||
- Intégratn de ClickToDial
|
||||
- Intégration RSS
|
||||
- Intégation Skype
|
||||
- Intégration de système de paiements (Paypal, Strip, Paybox...)
|
||||
- Intégration de système de paiements (Paypal, Stripe, Paybox...)
|
||||
- …
|
||||
|
||||
### Divers:
|
||||
@ -114,9 +115,18 @@ Voir fichier ChangeLog.
|
||||
- Application simple à utiliser.
|
||||
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur https://wiki.dolibarr.org/index.php/Prérequis).
|
||||
- Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP.
|
||||
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
|
||||
- APIs.
|
||||
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
|
||||
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
|
||||
- Support natif de nombreuses fonctions spécifiques aux pays comme:
|
||||
- La tax espagnole TE et ISPF
|
||||
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
|
||||
- La loi française Finance 2016 et logiciels de caisse
|
||||
- La double taxe canadienne
|
||||
- Le timbre fiscal tunisien
|
||||
- Numérotation de facture de l'argentines (avec type A,B,C...)
|
||||
- Compatible avec vos processus RGPD
|
||||
- ...
|
||||
- …
|
||||
|
||||
### Extension
|
||||
@ -126,7 +136,7 @@ Dolibarr peut aussi être étendu à volonté avec l'ajout de module/application
|
||||
|
||||
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
|
||||
|
||||
Voici un liste de fonctionnalites pas encore gérées par Dolibarr:
|
||||
Voici un liste de fonctionnalités pas encore gérées par Dolibarr:
|
||||
- Dolibarr ne contient pas de module de Gestion de la paie.
|
||||
- Les tâches du module de gestion de projets n'ont pas de dépendances entre elle.
|
||||
- Dolibarr n'embarque pas de Webmail intégré nativement.
|
||||
@ -135,12 +145,13 @@ Voici un liste de fonctionnalites pas encore gérées par Dolibarr:
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
Les documentations utilisateur, développeur et traducteur sont disponible sous forme de ressources de la communautés via la site [Wiki](https://wiki.dolibarr.org).
|
||||
La documentation utilisateur, développeur et traducteur est disponible sous forme de ressources de la communauté via le site [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
|
||||
## CONTRIBUTING
|
||||
## CONTRIBUER
|
||||
|
||||
Voir le fichier [CONTRIBUTING](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)
|
||||
Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)].
|
||||
<a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
|
||||
## CREDITS
|
||||
|
||||
22
README.md
22
README.md
@ -1,6 +1,11 @@
|
||||
# DOLIBARR ERP & CRM
|
||||
|
||||
 
|
||||

|
||||
[](https://houndci.com)
|
||||
|
||||
|6|7|8|9|develop|
|
||||
|----------|----------|----------|----------|----------|
|
||||
||||||
|
||||
|
||||
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
||||
|
||||
@ -125,7 +130,6 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Donations management
|
||||
- Reporting
|
||||
- Data export/import
|
||||
- Thirdparties and/or products categories
|
||||
- Barcodes support
|
||||
- Margin calculations
|
||||
- LDAP connectivity
|
||||
@ -147,13 +151,15 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
|
||||
- APIs.
|
||||
- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
|
||||
- Support for country specific features:
|
||||
- Support a lot of country specific features:
|
||||
- Spanish Tax RE and ISPF
|
||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||
- Tunisian tax stamp
|
||||
- Argentina invoice numbering using A,B,C...
|
||||
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- Compatible with European GDPR rules
|
||||
- ...
|
||||
- PDF or ODT generation for invoice, proposals, orders...
|
||||
- …
|
||||
|
||||
@ -162,7 +168,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
|
||||
|
||||
|
||||
## FUTURE
|
||||
## WHAT DOLIBARR CAN'T DO YET
|
||||
|
||||
These are features that Dolibarr does **not** yet fully support:
|
||||
|
||||
@ -179,7 +185,8 @@ Administrator, user, developer and translator's documentations are available alo
|
||||
|
||||
## CONTRIBUTING
|
||||
|
||||
See [CONTRIBUTING](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md) file
|
||||
This project exists thanks to all the people who contribute. [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)].
|
||||
<a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
|
||||
## CREDITS
|
||||
@ -199,3 +206,8 @@ Follow Dolibarr project on:
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||
|
||||
|
||||
### Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here. 🙏 [[Become a sponsor/backer](https://opencollective.com/dolibarr#backer)]
|
||||
|
||||
@ -1,123 +0,0 @@
|
||||
<!-- Application namespaces and APS version (step 9) -->
|
||||
<application xmlns="http://apstandard.com/ns/1" version="1.1">
|
||||
<!-- Application common properties (step 9) -->
|
||||
<name>Dolibarr ERP-CRM</name>
|
||||
<version>__VERSION__</version>
|
||||
<release>__RELEASE__</release>
|
||||
<homepage>http://www.dolibarr.org/</homepage>
|
||||
<vendor>
|
||||
<name>Dolibarr</name>
|
||||
<homepage>http://www.dolibarr.org/</homepage>
|
||||
<icon path="images/appicon_64.png" />
|
||||
</vendor>
|
||||
<packager>
|
||||
<name>Laurent Destailleur</name>
|
||||
<homepage>http://www.nltechno.com</homepage>
|
||||
<uri>uuid:e743ee30-9fe8-11e0-a32e-0025115d642c</uri>
|
||||
</packager>
|
||||
<presentation>
|
||||
<summary>Dolibarr ERP-CRM, the easy to use software to manage small or medium companies, freelancers or foundations</summary>
|
||||
<description>
|
||||
Dolibarr is a free modular software (you see only
|
||||
features you need) to manage small and medium companies, freelancers
|
||||
or foundations.
|
||||
This OpenSource software is designed to provide all features you need to
|
||||
manage information on many aspects of your business
|
||||
into an intuitive and user-friendly graphical interface
|
||||
It's an OpenSource software you can install on a web server or as a
|
||||
standalone software. Dolibarr is designed to provide simplicity to end-user.
|
||||
</description>
|
||||
<icon path="images/appicon_64.png" />
|
||||
<screenshot path="images/dolibarr_screenshot1_640x480.png">
|
||||
<description>Screenshot 1</description>
|
||||
</screenshot>
|
||||
<changelog>
|
||||
<version version="3.1.0" release="0">
|
||||
<entry>See http://www.dolibarr.org/files/ChangeLog</entry>
|
||||
</version>
|
||||
</changelog>
|
||||
<categories>
|
||||
<category>Back office/Billing</category>
|
||||
<category>Back office/Accounting and Financial</category>
|
||||
<category>Back office/Customer Relationship Management</category>
|
||||
<category>Back office/Enterprise Resource Planning</category>
|
||||
</categories>
|
||||
<languages>
|
||||
<language>en</language>
|
||||
<language>fr</language>
|
||||
<language>es</language>
|
||||
<language>de</language>
|
||||
<language>pt</language>
|
||||
</languages>
|
||||
</presentation>
|
||||
<upgrade match="/application/version = '3.0'" />
|
||||
<!-- Application service (step 4) -->
|
||||
<service id="dolibarr">
|
||||
<!-- Service presentation properties (step 7) -->
|
||||
<license must-accept="false">
|
||||
<text>
|
||||
<name>GPL-3.0+</name>
|
||||
<file>COPYING</file>
|
||||
</text>
|
||||
</license>
|
||||
<presentation>
|
||||
<name>Dolibarr instance</name>
|
||||
<summary>Dolibarr services</summary>
|
||||
<entry-points>
|
||||
<entry class="frontpage" dst="/">
|
||||
<label>Application entry point</label>
|
||||
</entry>
|
||||
</entry-points>
|
||||
</presentation>
|
||||
<!-- Service settings (step 7) -->
|
||||
<settings>
|
||||
<!--
|
||||
<group>
|
||||
<name>Administrator's preferences</name>
|
||||
<setting id="admin_name" type="string" default-value="admin"
|
||||
min-length="1" max-length="32" regex="^[a-zA-Z][0-9a-zA-Z_\-]*">
|
||||
<name>Administrator's login</name>
|
||||
<error-message>
|
||||
Please make sure the text you entered starts with a letter and continues with either numbers, letters, underscores or hyphens.
|
||||
</error-message>
|
||||
</setting>
|
||||
<setting id="admin_password" type="password" min-length="1">
|
||||
<name>Password</name>
|
||||
</setting>
|
||||
</group>
|
||||
-->
|
||||
</settings>
|
||||
<!-- Service used technologies (step 6) -->
|
||||
<requirements xmlns:php="http://apstandard.com/ns/1/php"
|
||||
xmlns:db="http://apstandard.com/ns/1/db">
|
||||
<php:version min="4.2.0" />
|
||||
<php:extension>mysql</php:extension>
|
||||
<php:extension>mbstring</php:extension>
|
||||
<php:safe-mode>false</php:safe-mode>
|
||||
<db:db>
|
||||
<db:id>main</db:id>
|
||||
<db:default-name>dolibarr</db:default-name>
|
||||
<db:can-use-tables-prefix>false</db:can-use-tables-prefix>
|
||||
<db:server-type>mysql</db:server-type>
|
||||
<db:server-min-version>4.3.1</db:server-min-version>
|
||||
</db:db>
|
||||
</requirements>
|
||||
<!-- Content delivery settings (step 8) -->
|
||||
<provision>
|
||||
<url-mapping>
|
||||
<default-prefix>dolibarr</default-prefix>
|
||||
<installed-size>35000000</installed-size>
|
||||
<mapping url="/" path="htdocs" xmlns:php="http://apstandard.com/ns/1/php">
|
||||
<php:handler>
|
||||
<php:extension>php</php:extension>
|
||||
</php:handler>
|
||||
</mapping>
|
||||
</url-mapping>
|
||||
<!-- Service configuration script declaration (step 10) -->
|
||||
<configuration-script name="configure.php">
|
||||
<configuration-script-language>php</configuration-script-language>
|
||||
<status-control/>
|
||||
</configuration-script>
|
||||
</provision>
|
||||
</service>
|
||||
</application>
|
||||
@ -1,121 +0,0 @@
|
||||
<!-- Application namespaces and APS version (step 9) -->
|
||||
<application xmlns="http://apstandard.com/ns/1" version="1.2">
|
||||
<!-- Application common properties (step 9) -->
|
||||
<id>dolibarr</id>
|
||||
<name>Dolibarr</name>
|
||||
<version>__VERSION__</version>
|
||||
<release>__RELEASE__</release>
|
||||
<homepage>http://www.dolibarr.org/</homepage>
|
||||
<vendor>
|
||||
<name>Dolibarr</name>
|
||||
<homepage>http://www.dolibarr.org/</homepage>
|
||||
<icon path="images/appicon_64.png" />
|
||||
</vendor>
|
||||
<packager>
|
||||
<name>Laurent Destailleur</name>
|
||||
<homepage>http://www.nltechno.com</homepage>
|
||||
<uri>uuid:e743ee30-9fe8-11e0-a32e-0025115d642c</uri>
|
||||
</packager>
|
||||
<presentation>
|
||||
<summary>Dolibarr ERP - CRM, the easy to use software to manage small or medium companies, freelancers or foundations</summary>
|
||||
<description>
|
||||
Dolibarr is a free modular software (you see only
|
||||
features you need) to manage small and medium companies, freelancers
|
||||
or foundations.
|
||||
This OpenSource software is designed to provide all features you need to
|
||||
manage information on many aspects of your business
|
||||
into an intuitive and user-friendly graphical interface
|
||||
It's an OpenSource software you can install on a web server or as a
|
||||
standalone software. Dolibarr is designed to provide simplicity to end-user.
|
||||
</description>
|
||||
<icon path="images/appicon_64.png" />
|
||||
<screenshot path="images/dolibarr_screenshot1_640x480.png">
|
||||
<description>Screenshot 1</description>
|
||||
</screenshot>
|
||||
<changelog>
|
||||
<version version="3.1.0" release="0">
|
||||
<entry>See http://www.dolibarr.org/files/ChangeLog</entry>
|
||||
</version>
|
||||
</changelog>
|
||||
<categories>
|
||||
<category>Back office/Billing</category>
|
||||
<category>Back office/Accounting and Financial</category>
|
||||
<category>Back office/Customer Relationship Management</category>
|
||||
<category>Back office/Enterprise Resource Planning</category>
|
||||
</categories>
|
||||
<languages>
|
||||
<language>en</language>
|
||||
<language>fr</language>
|
||||
<language>es</language>
|
||||
<language>de</language>
|
||||
<language>pt</language>
|
||||
</languages>
|
||||
</presentation>
|
||||
<upgrade match="/application/version = '3.0'" />
|
||||
<!-- Application service (step 4) -->
|
||||
<service id="dolibarr">
|
||||
<!-- Service presentation properties (step 7) -->
|
||||
<license must-accept="false">
|
||||
<text xml:lang="">
|
||||
<name>GPL-3.0+</name>
|
||||
<file>COPYING</file>
|
||||
</text>
|
||||
</license>
|
||||
<presentation>
|
||||
<name>Dolibarr instance</name>
|
||||
<entry-points>
|
||||
<entry class="frontpage" dst="/">
|
||||
<label>Application entry point</label>
|
||||
</entry>
|
||||
</entry-points>
|
||||
</presentation>
|
||||
<!-- Service settings (step 7) -->
|
||||
<settings>
|
||||
<group>
|
||||
<name>Administrator's preferences</name>
|
||||
<setting id="admin_name" type="string" default-value="admin"
|
||||
min-length="1" max-length="32" regex="^[a-zA-Z][0-9a-zA-Z_\-]*">
|
||||
<name>Administrator's login</name>
|
||||
<error-message>
|
||||
Please make sure the text you entered starts with a letter and continues with either numbers, letters, underscores or hyphens.
|
||||
</error-message>
|
||||
</setting>
|
||||
<setting id="admin_password" type="password" min-length="1">
|
||||
<name>Password</name>
|
||||
</setting>
|
||||
</group>
|
||||
</settings>
|
||||
<!-- Service used technologies (step 6) -->
|
||||
<requirements xmlns:php="http://apstandard.com/ns/1/php"
|
||||
xmlns:db="http://apstandard.com/ns/1/db">
|
||||
<php:version min="4.2.0" />
|
||||
<php:extension>mysql</php:extension>
|
||||
<php:extension>mbstring</php:extension>
|
||||
<php:safe-mode>false</php:safe-mode>
|
||||
<db:db>
|
||||
<db:id>main</db:id>
|
||||
<db:default-name>dolibarr</db:default-name>
|
||||
<db:can-use-tables-prefix>false</db:can-use-tables-prefix>
|
||||
<db:server-type>mysql</db:server-type>
|
||||
<db:server-min-version>4.3.1</db:server-min-version>
|
||||
</db:db>
|
||||
</requirements>
|
||||
<!-- Content delivery settings (step 8) -->
|
||||
<provision>
|
||||
<url-mapping>
|
||||
<default-prefix>dolibarr</default-prefix>
|
||||
<installed-size>35000000</installed-size>
|
||||
<mapping url="/" path="htdocs" xmlns:php="http://apstandard.com/ns/1/php">
|
||||
<php:handler>
|
||||
<php:extension>php</php:extension>
|
||||
</php:handler>
|
||||
</mapping>
|
||||
</url-mapping>
|
||||
<!-- Service configuration script declaration (step 10) -->
|
||||
<configuration-script name="configure.php">
|
||||
<script-language>php</script-language>
|
||||
<status-control/>
|
||||
</configuration-script>
|
||||
</provision>
|
||||
</service>
|
||||
</application>
|
||||
@ -1,89 +0,0 @@
|
||||
<html><head>
|
||||
<title> Limitations of APS Support in the Panel </title>
|
||||
<meta name="Keywords" content="">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="Limitations%20of%20APS%20Support%20in%20the%20Panel_fichiers/stylesheet.css">
|
||||
<link href="Limitations%20of%20APS%20Support%20in%20the%20Panel_fichiers/prettify.css" type="text/css" rel="stylesheet">
|
||||
<script type="text/javascript" src="Limitations%20of%20APS%20Support%20in%20the%20Panel_fichiers/prettify.js"></script>
|
||||
<script src="Limitations%20of%20APS%20Support%20in%20the%20Panel_fichiers/highlight.js"></script></head>
|
||||
|
||||
<body onload="prettyPrint()" link="#0000A0" text="#000000" vlink="#FF0000" alink="#008000" bgcolor="#FFFFFF">
|
||||
<h1 class="heading1">Limitations of APS Support in the Panel</h1>
|
||||
<h2 class="heading2">About This Document</h2>
|
||||
<p class="bodytext">This document is addressed to independent software
|
||||
vendors who plan to distribute web applications among the Panel users.
|
||||
The aim of the document is to help vendors find out whether they can
|
||||
package their applications to APS to make them available through the
|
||||
Panel.</p>
|
||||
<p class="bodytext">The document does not contain information about
|
||||
Application Packaging Standard itself or give application packaging
|
||||
instructions. It focuses on how the Panel implements APS and what APS
|
||||
packages are not supported by this implementation.</p>
|
||||
<p class="bodytext"></p>
|
||||
<h2 class="heading2">APS Support in the Panel</h2>
|
||||
<p class="bodytext"><em class="emphasis"><em class="emphasis">Application Packaging Standard</em></em> (<em class="emphasis">APS</em>)
|
||||
is a set of rules that defines a web application packaging format. This
|
||||
standard is designed to ease the integration of applications in a
|
||||
service provider's infrastructure. It covers provisioning, management,
|
||||
and integration of cloud-based services and applications.</p>
|
||||
<p class="bodytext">The Panel uses APS to offer third-party applications to hosting customers. These applications are presented in <em class="emphasis">APS catalog</em>, where the customers can buy or download them.</p>
|
||||
<p class="bodytext">Currently, the Panel does not support all aspects of
|
||||
APS. Therefore, customers may have problems trying to install certain
|
||||
applications. To find out whether your application is compatible with
|
||||
the Panel, see section <strong class="specialbold"><strong class="specialbold">Plesk Panel Restrictions.</strong></strong></p>
|
||||
<p class="bodytext">You can find more information about APS at http://www.apsstandard.org/.</p>
|
||||
<p class="bodytext">APS specification and supporting documents are available at http://www.apsstandard.org/isv/documentation/.</p>
|
||||
<p class="bodytext"></p>
|
||||
<h2 class="heading2">Restrictions on Packages Processing</h2>
|
||||
<p class="bodytext">The current Panel version has restrictions on APS
|
||||
applications processing. If an application requires performing
|
||||
restricted actions, the Panel will not install it. Particularly, these
|
||||
actions are the following:</p>
|
||||
<ul class="listbullet"><li class="listbullet">Sending e-mails or processing incoming mail.<p class="listcontinue">See <strong class="specialbold">Mail aspect</strong> of APS in <strong class="specialbold">APS Format Specification v1.2</strong>, section <strong class="specialbold">8.8. Mail </strong>at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.aspects.mail</p>
|
||||
</li><li class="listbullet">Changing the DNS resource records of an environment where the application works.<p class="listcontinue">See <strong class="specialbold">DNS aspect</strong> in <strong class="specialbold">APS Format Specification v1.2</strong>, section <strong class="specialbold">8.10. DNS Zone </strong>at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.aspects.dns</p>
|
||||
</li><li class="listbullet">Installing third-party dynamic libraries (*.dll, *.so).<p class="listcontinue">See<strong class="specialbold"> DLL aspect</strong> in <strong class="specialbold">APS Format Specification v1.2</strong>, section <strong class="specialbold">8.11. DLL Content Processing Method </strong>at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.aspects.dll</p>
|
||||
</li><li class="listbullet">Updating older version of application with
|
||||
complex changes in application settings or deployment logic. According
|
||||
to APS, such updates are called <em class="emphasis">upgrades. </em>For more information on the application updates, see the <strong class="specialbold">APS Format Specification v1.2</strong>, section <strong class="specialbold">5.1.15 Updates </strong>at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.metadata.common.update</li></ul><p class="bodytext">If
|
||||
you need you application to perform these actions, consider other ways
|
||||
of integration with the Panel: API RPC, modules or Panel Notifications.</p>
|
||||
<p class="bodytext">Also, the Panel does not support the following actions defined in the application package: </p>
|
||||
<ul class="listbullet"><li class="listbullet">Checking application settings for consistency via <strong class="specialbold">verification script. </strong>For more information on verification scripts, see the <strong class="specialbold">APS Format Specification v1.2</strong>, section <strong class="specialbold">5.3.3 Verification Script </strong>at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.metadata.provision.verification-script</li><li class="listbullet">Processing application resource usage reports defined by <strong class="specialbold">resource counters</strong> and passed by <strong class="specialbold">resource script</strong> . For more information on resource counters and resource scripts, see the <strong class="specialbold">APS Format Specification v1.2</strong>, section <strong class="specialbold">5.2.6. Resources</strong> at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.metadata.service.resources and <strong class="specialbold">5.3.3 Resources Script </strong>at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.metadata.provision.resource-script</li>
|
||||
|
||||
<h1 class="heading1">Copyright Notice</h1>
|
||||
<p class="copyright">Parallels Holdings, Ltd.</p>
|
||||
<p class="copyright">c/o Parallels International GmbH</p>
|
||||
<p class="copyright">Vordergasse 59</p>
|
||||
<p class="copyright">CH-Schaffhausen</p>
|
||||
<p class="copyright">Switzerland</p>
|
||||
<p class="copyright">Phone: +41-526320-411</p>
|
||||
<p class="copyright">Fax: +41-52672-2010</p>
|
||||
<p class="copyright"> </p>
|
||||
<p class="copyright">Copyright © 1999-2011 Parallels Holdings, Ltd. and its affiliates. All rights reserved. </p>
|
||||
<p class="copyright"> </p>
|
||||
<p class="copyright">This product is protected by United States and
|
||||
international copyright laws. The product's underlying technology,
|
||||
patents, and trademarks are listed at
|
||||
http://www.parallels.com/trademarks. </p>
|
||||
<p class="copyright"> </p>
|
||||
<p class="copyright">Microsoft, Windows, Windows Server, Windows NT, Windows Vista, and MS-DOS are registered trademarks of Microsoft Corporation.</p>
|
||||
<p class="copyright">Linux is a registered trademark of Linus Torvalds.</p>
|
||||
<p class="copyright">Mac is a registered trademark of Apple, Inc.</p>
|
||||
<p class="copyright">All other marks and names mentioned herein may be trademarks of their respective owners.</p>
|
||||
|
||||
|
||||
|
||||
<p class="bodytext">
|
||||
<a target="_blank" title="Send feedback through a web form" href="http://www.parallels.com/en/support/usersdoc/?problemSubject=Feedback+on+Help+Page+" onclick="var u = parent.BODY.location.href;
|
||||
u = u.replace(/.+\/([^/]+).htm$/,'$1');
|
||||
u+= '+of+the+'+parent.document.title.replace(/ /g,'+');
|
||||
|
||||
this.href+=u;
|
||||
|
||||
window.location.reload(false);">Please send us your feedback on this help page.</a></p>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul></body></html>
|
||||
<!-- Edited by post-publisher -->
|
||||
@ -1,64 +0,0 @@
|
||||
function last(href)
|
||||
{
|
||||
var ret = href.split("/");
|
||||
return ret[ret.length-1];
|
||||
}
|
||||
|
||||
function StopProcess()
|
||||
{
|
||||
LeftFrame = parent.TOC.document.location.href;
|
||||
LeftFrame = last(LeftFrame);
|
||||
if (LeftFrame == "dhtml_search.htm") return 1
|
||||
else return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function highlightTOC(str) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (StopProcess()) return;
|
||||
try {
|
||||
|
||||
str = str || parent.BODY.document.location.href;
|
||||
uri = last(str);
|
||||
list = parent.TOC.document.getElementsByTagName("a");
|
||||
for(i=0; i<list.length; i++)
|
||||
{
|
||||
if (last(list[i].href) == uri)
|
||||
{
|
||||
list[i].style.backgroundColor = "#6697cc";
|
||||
list[i].style.padding = "2px";
|
||||
list[i].style.color = "#ffffff";
|
||||
|
||||
} else {
|
||||
list[i].style.backgroundColor = "#ffffff";
|
||||
list[i].style.color = "#003380";
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
function FindCorrectTOCPage()
|
||||
{
|
||||
if (StopProcess()) return;
|
||||
//Updated on 30.04.2008
|
||||
list = parent.BODY.document.getElementsByTagName("a") || document.getElementsByTagName("a");
|
||||
for(i=0; i<list.length; i++)
|
||||
{
|
||||
if (list[i].target == "TOC")
|
||||
{
|
||||
|
||||
if (last(list[i].href) != last(parent.TOC.document.location.href))
|
||||
{
|
||||
parent.TOC.document.location.href = list[i].href;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,60 +0,0 @@
|
||||
/* Pretty printing styles. Used with prettify.js. */
|
||||
|
||||
.str { color: #FF0000; }
|
||||
.vr { color: #0000FF; }
|
||||
.kwd { color: #000080; font-weight: bold}
|
||||
.com { color: #EA8110; }
|
||||
.typ { color: #606; }
|
||||
.lit { color: #066; }
|
||||
.pun { color: #660; }
|
||||
.pln { color: #000; }
|
||||
.tag { color: #008; }
|
||||
.atn { color: #606; }
|
||||
.atv { color: #080; }
|
||||
.dec { color: #606; }
|
||||
pre.preformatted {
|
||||
|
||||
display: block;
|
||||
font-family: "Courier New", verdana, arial, helvetica, sans-serif;
|
||||
font-style: normal;
|
||||
font-variant: normal;
|
||||
font-weight: normal;
|
||||
font-size: 10pt;
|
||||
color: #000000;
|
||||
background-color: #f4f4f4;
|
||||
word-spacing: normal;
|
||||
letter-spacing: normal;
|
||||
vertical-align: baseline;
|
||||
text-decoration: none;
|
||||
text-transform: none;
|
||||
line-height: normal;
|
||||
margin-top: 0pt;
|
||||
margin-bottom: 0pt;
|
||||
margin-left: 0pt;
|
||||
margin-right: 6pt;
|
||||
padding-top: 1pt;
|
||||
padding-bottom: 1pt;
|
||||
padding-left: 5pt;
|
||||
padding-right: 5pt;
|
||||
float: none;
|
||||
clear: none;
|
||||
text-align: left;
|
||||
text-indent: 0cm;
|
||||
width: auto;
|
||||
height: auto;
|
||||
|
||||
}
|
||||
|
||||
@media print {
|
||||
.vr { color: #f0f; }
|
||||
.str { color: #060; }
|
||||
.kwd { color: #006; font-weight: bold; }
|
||||
.com { color: #600; font-style: italic; }
|
||||
.typ { color: #404; font-weight: bold; }
|
||||
.lit { color: #044; }
|
||||
.pun { color: #440; }
|
||||
.pln { color: #000; }
|
||||
.tag { color: #006; font-weight: bold; }
|
||||
.atn { color: #404; }
|
||||
.atv { color: #060; }
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,20 +0,0 @@
|
||||
README (English)
|
||||
##################################################
|
||||
This directory is dedicated to APS package building
|
||||
##################################################
|
||||
|
||||
Docs for APS format 1.1:
|
||||
http://www.apsstandard.org/r/doc/aps-format-1.1-packaging-guide/index.htm
|
||||
|
||||
Docs for APS format 1.2 (need APP-LIST.xml):
|
||||
http://www.apsstandard.org/r/doc/aps-format-1.2-packaging-guide/index.htm
|
||||
|
||||
|
||||
To check an APS package on Debian:
|
||||
* Install libgdiplus with
|
||||
apt-get install libgdiplus
|
||||
* Install apslint.exe (http://www.apsstandard.org/r/doc/aps-format-1.2-packaging-guide/57414.htm)
|
||||
tar -xvf xxxx.tgz
|
||||
* Go into directory of apslint and run command
|
||||
mono ./apslint.exe '/media/DATA/Mes Developpements/dolibarr/build/dolibarr-3.1.0-dev.app.zip'
|
||||
|
||||
@ -1,151 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/*-----------------------------------------------------
|
||||
*
|
||||
*----------------------------------------------------- */
|
||||
|
||||
// This is list of predefined variables when script is ran
|
||||
// We have to set them manually to run script outside context.
|
||||
/*putenv('SETTINGS_admin_name=admin');
|
||||
putenv('SETTINGS_admin_password=admin-ad');
|
||||
putenv('BASE_URL_SCHEME=http');
|
||||
putenv('BASE_URL_HOST=localhost');
|
||||
putenv('BASE_URL_PORT=0');
|
||||
putenv('BASE_URL_PATH=/');
|
||||
//putenv('WEB___DIR=/var/wwww/dolibarr/htdocs'); // WEB___DIR is dir to htdocs
|
||||
putenv('WEB___DIR=../htdocs'); // WEB___DIR is dir to htdocs
|
||||
putenv('DB_main_NAME=dolibarr');
|
||||
putenv('DB_main_HOST=localhost');
|
||||
putenv('DB_main_PORT=3306');
|
||||
putenv('DB_main_LOGIN=root');
|
||||
putenv('DB_main_PASSWORD=root');
|
||||
*/
|
||||
|
||||
// Check parameters
|
||||
if(count($_SERVER['argv']) < 2)
|
||||
{
|
||||
print "Usage: configure.php (install | upgrade <version> | configure | remove)\n";
|
||||
exit(1);
|
||||
}
|
||||
$command = $_SERVER['argv'][1]; //$command stores the argument with which the script was invoked.
|
||||
|
||||
|
||||
if($command == "install")
|
||||
{
|
||||
$db_id = 'main';
|
||||
|
||||
$rootdir = getenv("WEB___DIR");
|
||||
if ($rootdir != '/') $rootdir = preg_replace('/\/$/','',$rootdir); // Remove last /
|
||||
$datadir = $rootdir.'/dolibarr_documents';
|
||||
|
||||
//List of database-related variables that are passed to the configuration
|
||||
//script. See the 6.3.1.1.1. Environment variables section of the
|
||||
//Specification for details.
|
||||
$db_address = getenv("DB_${db_id}_HOST");
|
||||
$db_port = getenv("DB_${db_id}_PORT");
|
||||
$dblogin = getenv("DB_${db_id}_LOGIN");
|
||||
$dbpassword = getenv("DB_${db_id}_PASSWORD");
|
||||
$dbname = getenv("DB_${db_id}_NAME");
|
||||
|
||||
|
||||
//PHP functions for connecting to the mysql server and
|
||||
//executing SQL queries.
|
||||
//mysql_connect($dbaddress, $dblogin, $dbpassword);
|
||||
//mysql_select_db($dbname);
|
||||
/*
|
||||
$sql_queries = file($query_file);
|
||||
foreach ($sql_queries as $query) mysql_query($query);
|
||||
*/
|
||||
|
||||
|
||||
//Other code to be executed on invoking configure with
|
||||
//the install argument.
|
||||
|
||||
// Create empty config file
|
||||
$file=$rootdir.'/conf/conf.php';
|
||||
print "Create conf file ".$file."\n";
|
||||
$fp = fopen($file, 'wb');
|
||||
if ($fp)
|
||||
{
|
||||
fclose($fp);
|
||||
chmod($file,0775);
|
||||
}
|
||||
else
|
||||
{
|
||||
print "configure.php install: Unable to write file $file.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Create empty directory that will be used by software to store uploaded documents
|
||||
print "Create directory ".$datadir."\n";
|
||||
@mkdir($datadir);
|
||||
chmod($datadir,0775);
|
||||
|
||||
// Create install.forced.php into htdocs/install directory with value.
|
||||
// This will set parameters of install for web installer wizard.
|
||||
$file_source=$rootdir.'/../build/aps/install.forced.php.install';
|
||||
$file=$rootdir.'/install/install.forced.php';
|
||||
print "Create file ".$file.' from '.$file_source."\n";
|
||||
|
||||
$modify_hash=array(
|
||||
'WEB___DIR'=>$rootdir,
|
||||
'DB_'.$db_id.'_HOST'=>$db_address,
|
||||
'DB_'.$db_id.'_PORT'=>$db_port,
|
||||
'DB_'.$db_id.'_LOGIN'=>$dblogin,
|
||||
'DB_'.$db_id.'_PASSWORD'=>$dbpassword,
|
||||
'DB_'.$db_id.'_NAME'=>$dbname
|
||||
);
|
||||
|
||||
$file_content = fread(fopen($file_source, 'r'), filesize($file_source));
|
||||
foreach($modify_hash as $param => $val){
|
||||
$file_content = str_replace($param, php_quote($val), $file_content);
|
||||
}
|
||||
$fp = fopen($file, 'wb');
|
||||
if ($fp)
|
||||
{
|
||||
fputs($fp, $file_content);
|
||||
fputs($fp, "\n");
|
||||
fclose($fp);
|
||||
chmod($file,0775);
|
||||
}
|
||||
else
|
||||
{
|
||||
print "configure.php install: Unable to write file $file.\n";
|
||||
exit(2);
|
||||
}
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if($command == "remove")
|
||||
{
|
||||
//Code to be executed on invoking configure with the remove argument
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if($command == "upgrade")
|
||||
{
|
||||
//Code to be executed on invoking configure with the upgrade argument
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if($command == "configure")
|
||||
{
|
||||
//Code to be executed on invoking configure with the configure argument
|
||||
exit(0);
|
||||
}
|
||||
|
||||
print "configure.php: Error: unknown command $command.\n";
|
||||
exit(1);
|
||||
|
||||
|
||||
|
||||
// Content of file-util.php we need
|
||||
|
||||
function php_quote($val)
|
||||
{
|
||||
$res_val = str_replace("\\", "\\\\", $val);
|
||||
$res_val = str_replace("'", "\\'", $res_val);
|
||||
return $res_val;
|
||||
}
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
// File to force Dolibarr wizard installer choices.
|
||||
//
|
||||
// This file must be present into htdocs/install directory
|
||||
// during install process to be used.
|
||||
//
|
||||
//
|
||||
$force_install_noedit=1;
|
||||
$force_install_message='KeepDefaultValuesDeb';
|
||||
$force_install_main_data_root='WEB___DIR/dolibarr_documents';
|
||||
$force_install_type='mysqli';
|
||||
$force_install_dbserver='DB_main_HOST';
|
||||
$force_install_port='DB_main_PORT';
|
||||
$force_install_database='DB_main_NAME';
|
||||
$force_install_createdatabase='0';
|
||||
$force_install_databaselogin='DB_main_LOGIN';
|
||||
$force_install_databasepass='DB_main_PASSWORD';
|
||||
$force_install_createuser='0';
|
||||
$force_install_databaserootlogin='';
|
||||
$force_install_databaserootpass='';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
@ -8,7 +8,7 @@ Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
2003-2006, Jean-Louis Bergamo <jlb@j1b.org>
|
||||
2003-2013, Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
2003, Xavier Dutoit <doli@sydesy.com>
|
||||
2004-2013, Regis Houssin <regis.houssin@capnetworks.com>
|
||||
2004-2013, Regis Houssin <regis.houssin@inodbox.com>
|
||||
2004, Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
2004, Benoit Mortier <benoit.mortier@opensides.be>
|
||||
2004, Christophe Combelles <ccomb@free.fr>
|
||||
|
||||
1
build/debian/source/include-binaries
Normal file
1
build/debian/source/include-binaries
Normal file
@ -0,0 +1 @@
|
||||
htdocs/install/doctemplates/websites/website_template-corporate.zip
|
||||
@ -3,18 +3,30 @@ FROM php:7.0-apache
|
||||
ENV HOST_USER_ID 33
|
||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||
|
||||
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libldap2-dev \
|
||||
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
||||
&& docker-php-ext-install gd \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install ldap \
|
||||
&& docker-php-ext-install mysqli \
|
||||
&& apt-get purge -y libpng12-dev libjpeg-dev libldap2-dev
|
||||
&& apt-get purge -y libjpeg-dev libldap2-dev
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-run.sh
|
||||
|
||||
RUN pecl install xdebug-2.5.5 && docker-php-ext-enable xdebug
|
||||
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_autostart=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.default_enable=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_host=docker.for.mac.host.internal' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> /usr/local/etc/php/php.ini
|
||||
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT ["docker-run.sh"]
|
||||
|
||||
@ -3,42 +3,27 @@ File added into doxygen generated documentation
|
||||
-->
|
||||
|
||||
|
||||
<!-- Google analytics -->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-9049390-16', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
<!-- End google analytics -->
|
||||
|
||||
|
||||
<hr class="footer" />
|
||||
<address class="footer"><small>Generated on $datetime
|
||||
for <a href="https://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversion </small></address>
|
||||
<address class="footer"><small>Generated on $datetime for <a href="https://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversion </small></address>
|
||||
|
||||
|
||||
<!-- Google AdSense -->
|
||||
<div class="center">
|
||||
<script type="text/javascript"><!--
|
||||
google_ad_client = "pub-1071905880519467";
|
||||
/* PUBBANDEAUDOLIBARR */
|
||||
google_ad_slot = "1421205532";
|
||||
google_ad_width = 468;
|
||||
google_ad_height = 60;
|
||||
//-->
|
||||
</script>
|
||||
<script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
|
||||
</div>
|
||||
<!-- End google adsense -->
|
||||
<br>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-9049390-16"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-9049390-16');
|
||||
</script>
|
||||
|
||||
|
||||
<!-- Twitter ad collector -->
|
||||
<script src="//platform.twitter.com/oct.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">twttr.conversion.trackPid('ntm4n', { tw_sale_amount: 0, tw_order_quantity: 0 });</script>
|
||||
|
||||
@ -13,8 +13,8 @@ AssocingFileExtension=Associating %1 with the %2 file extension...
|
||||
|
||||
YouWillInstallDoliWamp=You will install or upgrade DoliWamp (Apache+Mysql+PHP+Dolibarr) on your computer.
|
||||
ThisAssistantInstallOrUpgrade=This assistant installs or upgrades Dolibarr ERP-CRM and all required third party softwares (Apache, Mysql and PHP) optimized for a Dolibarr usage.
|
||||
IfYouHaveTechnicalKnowledge=If you have technical knowledge and plan to share your Apache, Mysql and PHP with other projects than Dolibarr, you should not use this assistant and make a manual installation of Dolibarr on your existing Apache, Mysql and PHP installation.
|
||||
ButIfYouLook=But if you look for an automatic setup, you''re on the good way...
|
||||
IfYouHaveTechnicalKnowledge=If you are looking for a hosted version in the Cloud, you should look at https://saas.dolibarr.org. If you have technical knowledge and want to manage your Apache, Mysql and PHP yourself, you should not use this assistant and make a manual installation of Dolibarr on your existing Apache, Mysql and PHP installation.
|
||||
ButIfYouLook=But if you look for an automatic setup on your local computer, you''re on the good way...
|
||||
DoYouWantToStart=Do you want to start installation/upgrade process ?
|
||||
|
||||
TechnicalParameters=Technical parameters
|
||||
|
||||
@ -13,8 +13,8 @@ AssocingFileExtension=Associe %1 avec l'extension de fichier %2...
|
||||
|
||||
YouWillInstallDoliWamp=Vous allez installer ou mettre à jour DoliWamp (Apache+Mysql+PHP+Dolibarr) sur votre ordinateur.
|
||||
ThisAssistantInstallOrUpgrade=Cet assistant installe ou met à jour Dolibarr ERP-CRM et tous ses composants prérequis (Apache, Mysql et PHP) optimisés pour une utilisation de Dolibarr.
|
||||
IfYouHaveTechnicalKnowledge=Si vous avez des compétences techniques et envisagez de partager votre Apache, Mysql et PHP avec d'autres applications que Dolibarr, vous ne devriez pas utiliser cet assistant mais faire plutôt une installation manuelle de Dolibarr sur un socle Apache, Mysql et PHP existant.
|
||||
ButIfYouLook=Mais si vous recherchez une installation clé en main automatisée, vous êtes sur la bonne voie...
|
||||
IfYouHaveTechnicalKnowledge=Si vous cherchez un hébergement dans le Cloud, aller voir sur https://saas.dolibarr.org. Si vous avez des compétences techniques et voulez gérer vous même Apache, Mysql et PHP, vous ne devriez pas utiliser cet assistant mais faire plutôt une installation manuelle de Dolibarr sur votre socle Apache, Mysql et PHP existant.
|
||||
ButIfYouLook=Mais si vous recherchez une installation automatisée locale sur votre ordinateur, clé en main, vous êtes sur la bonne voie...
|
||||
DoYouWantToStart=Voulez-vous démarrer le processus d'installation/mise à jour ?
|
||||
|
||||
TechnicalParameters=Paramètres techniques
|
||||
|
||||
@ -28,11 +28,11 @@ OutputBaseFilename=__FILENAMEEXEDOLIWAMP__
|
||||
SourceDir=..\..\..
|
||||
AppId=doliwamp
|
||||
AppPublisher=NLTechno
|
||||
AppPublisherURL=http://www.nltechno.com
|
||||
AppSupportURL=http://www.dolibarr.org
|
||||
AppUpdatesURL=http://www.dolibarr.org
|
||||
AppPublisherURL=https://www.nltechno.com
|
||||
AppSupportURL=https://www.dolibarr.org
|
||||
AppUpdatesURL=https://www.dolibarr.org
|
||||
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
|
||||
AppCopyright=Copyright (C) 2008-2017 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre)
|
||||
AppCopyright=Copyright (C) 2008-2018 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre)
|
||||
DefaultDirName=c:\dolibarr
|
||||
DefaultGroupName=Dolibarr
|
||||
;LicenseFile=COPYING
|
||||
@ -100,9 +100,9 @@ Source: "build\exe\doliwamp\builddemosslfiles.bat.install"; DestDir: "{app}\"; F
|
||||
Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversion;
|
||||
; PhpMyAdmin, Apache, Php, Mysql
|
||||
; Put here path of Wampserver applications
|
||||
; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45
|
||||
; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45
|
||||
; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45
|
||||
; Value ???: apache 2.4.19, php 5.5.12, mysql 5.0.45 instead of 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe)
|
||||
; Value OK: apache 2.4.19, php 5.5.12, mysql 5.0.45 instead of 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe)
|
||||
Source: "C:\Program Files\Wamp\apps\phpmyadmin4.1.14\*.*"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange"
|
||||
Source: "C:\Program Files\Wamp\bin\apache\apache2.4.9\*.*"; DestDir: "{app}\bin\apache\apache2.4.9"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
|
||||
Source: "C:\Program Files\Wamp\bin\php\php5.5.12\*.*"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
|
||||
|
||||
1
build/flatpack/org.flatpak.Dolibarr.json
Normal file
1
build/flatpack/org.flatpak.Dolibarr.json
Normal file
@ -0,0 +1 @@
|
||||
Help wanted...
|
||||
@ -34,8 +34,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once($path."../htdocs/master.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||
require_once $path."../htdocs/master.inc.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
|
||||
|
||||
|
||||
/*
|
||||
@ -47,7 +47,7 @@ $includeconstants=array();
|
||||
|
||||
if (empty($argv[1]))
|
||||
{
|
||||
print "Usage: ".$script_file." release=auto|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
|
||||
exit -1;
|
||||
}
|
||||
@ -70,30 +70,52 @@ while ($i < $argc)
|
||||
$i++;
|
||||
}
|
||||
|
||||
if (empty($release))
|
||||
{
|
||||
print "Error: Missing release paramater\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
|
||||
$savrelease = $release;
|
||||
|
||||
// If release is auto, we take current version
|
||||
$tmpver=explode('-', $release, 2);
|
||||
if ($tmpver[0] == 'auto')
|
||||
if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable')
|
||||
{
|
||||
$release=DOL_VERSION;
|
||||
if ($tmpver[1]) $release.='-'.$tmpver[1];
|
||||
if ($tmpver[1] && $tmpver[0] == 'auto') $release.='-'.$tmpver[1];
|
||||
}
|
||||
|
||||
if (empty($includecustom))
|
||||
{
|
||||
$tmpver=explode('-', $release, 2);
|
||||
if (DOL_VERSION != $tmpver[0])
|
||||
{
|
||||
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpver[0].')'."\n";
|
||||
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
|
||||
exit -1;
|
||||
}
|
||||
$tmpverbis=explode('-', $release, 2);
|
||||
if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable')
|
||||
{
|
||||
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto')
|
||||
{
|
||||
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$tmpverter=explode('-', DOL_VERSION, 2);
|
||||
if ($tmpverter[0] != $tmpverbis[0])
|
||||
{
|
||||
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! preg_match('/'.preg_quote(DOL_VERSION,'/').'-/',$release))
|
||||
{
|
||||
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parmater (ex: '.DOL_VERSION.'-mydistrib).'."\n";
|
||||
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
|
||||
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ $PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
|
||||
$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
|
||||
|
||||
|
||||
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||
%REQUIREMENTPUBLISH=(
|
||||
"SF"=>"git ssh rsync",
|
||||
@ -37,7 +37,7 @@ $PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/dolibarr.org/httpd
|
||||
"RPM_MANDRIVA"=>"rpmbuild",
|
||||
"RPM_OPENSUSE"=>"rpmbuild",
|
||||
"DEB"=>"dpkg",
|
||||
"APS"=>"zip",
|
||||
"FLATPACK"=>"flatpack",
|
||||
"EXEDOLIWAMP"=>"ISCC.exe",
|
||||
"SNAPSHOT"=>"tar"
|
||||
);
|
||||
@ -142,7 +142,6 @@ $FILENAMETGZ = "$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||
$FILENAMEZIP = "$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||
$FILENAMEXZ = "$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||
$FILENAMEDEB = "see later";
|
||||
$FILENAMEAPS = "$PROJECT-$MAJOR.$MINOR.$BUILD.app";
|
||||
$FILENAMEEXEDOLIWAMP = "DoliWamp-$MAJOR.$MINOR.$BUILD";
|
||||
# For RPM
|
||||
$ARCH='noarch';
|
||||
@ -523,12 +522,21 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot12.png`;
|
||||
|
||||
# Security to avoid to package data files
|
||||
print "Remove documents dir\n";
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/document`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/document`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
|
||||
|
||||
print "Remove subdir of custom dir\n";
|
||||
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n";
|
||||
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs but not files
|
||||
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\;\n";
|
||||
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs, even symbolic links, but not files
|
||||
|
||||
# Removed known external modules to avoid any error when packaging from env where external modules are tested
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/abricot*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/accountingexport*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`;
|
||||
@ -543,12 +551,14 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ndf*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nomenclature*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/of/`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/oscim*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/accountingexport*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/workstation*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`;
|
||||
# Removed other test files
|
||||
@ -592,13 +602,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`;
|
||||
|
||||
|
||||
print "Remove subdir of custom dir\n";
|
||||
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n";
|
||||
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs but not files
|
||||
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\;\n";
|
||||
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs, even symbolic links, but not files
|
||||
}
|
||||
|
||||
# Build package for each target
|
||||
@ -692,7 +695,7 @@ if ($nboftargetok) {
|
||||
print "Go to directory $BUILDROOT\n";
|
||||
$olddir=getcwd();
|
||||
chdir("$BUILDROOT");
|
||||
$cmd= "xz -9 -r $BUILDROOT/$FILENAMEAPS.xz \*";
|
||||
$cmd= "xz -9 -r $BUILDROOT/$FILENAMEXZ.xz \*";
|
||||
print $cmd."\n";
|
||||
$ret= `$cmd`;
|
||||
chdir("$olddir");
|
||||
@ -1033,92 +1036,6 @@ if ($nboftargetok) {
|
||||
next;
|
||||
}
|
||||
|
||||
if ($target eq 'APS')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
if ($NEWDESTI =~ /stable/)
|
||||
{
|
||||
mkdir($DESTI.'/package_aps');
|
||||
if (-d $DESTI.'/package_aps') { $NEWDESTI=$DESTI.'/package_aps'; }
|
||||
}
|
||||
|
||||
$newbuild = $BUILD;
|
||||
$newbuild =~ s/(dev|alpha)/0/gi; # dev
|
||||
$newbuild =~ s/beta/1/gi; # beta
|
||||
$newbuild =~ s/rc./2/gi; # rc
|
||||
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
|
||||
# now newbuild is 0-0 or 0-3 for example
|
||||
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
|
||||
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
|
||||
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
|
||||
|
||||
print "Remove target $FILENAMEAPS.zip...\n";
|
||||
unlink "$NEWDESTI/$FILENAMEAPS.zip";
|
||||
|
||||
#rmdir "$BUILDROOT/$PROJECT.tmp";
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp`;
|
||||
print "Create directory $BUILDROOT/$PROJECT.tmp\n";
|
||||
$ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp"`;
|
||||
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$PROJECT.tmp\n";
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$PROJECT.tmp\"";
|
||||
$ret=`$cmd`;
|
||||
|
||||
print "Remove other files\n";
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/deb`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/dmg`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/doap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/exe`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/live`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/patch`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/rpm`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/zip`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/perl`;
|
||||
|
||||
$APSVERSION="1.2";
|
||||
print "Create APS files $BUILDROOT/$PROJECT.tmp/$PROJECT/APP-META.xml\n";
|
||||
open (SPECFROM,"<$BUILDROOT/$PROJECT/build/aps/APP-META-$APSVERSION.xml") || die "Error";
|
||||
open (SPECTO,">$BUILDROOT/$PROJECT.tmp/$PROJECT/APP-META.xml") || die "Error";
|
||||
while (<SPECFROM>) {
|
||||
$newbuild = $BUILD;
|
||||
$newbuild =~ s/(dev|alpha)/0/gi; # dev
|
||||
$newbuild =~ s/beta/1/gi; # beta
|
||||
$newbuild =~ s/rc./2/gi; # rc
|
||||
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
|
||||
# now newbuild is 0-0 or 0-3 for example
|
||||
$_ =~ s/__VERSION__/$MAJOR.$MINOR.$REL1/;
|
||||
$_ =~ s/__RELEASE__/$RPMSUBVERSION/;
|
||||
print SPECTO $_;
|
||||
}
|
||||
close SPECFROM;
|
||||
close SPECTO;
|
||||
print "Version set to $MAJOR.$MINOR.$newbuild\n";
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/configure.php\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/scripts/configure.php\"";
|
||||
$ret=`$cmd`;
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT/doc/images\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/images\"";
|
||||
$ret=`$cmd`;
|
||||
|
||||
print "Remove other files\n";
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/doc`;
|
||||
|
||||
print "Build APP-LIST.xml files\n";
|
||||
|
||||
print "Compress $BUILDROOT/$PROJECT.tmp/$PROJECT into $FILENAMEAPS.zip...\n";
|
||||
|
||||
print "Go to directory $BUILDROOT/$PROJECT.tmp\/$PROJECT\n";
|
||||
$olddir=getcwd();
|
||||
chdir("$BUILDROOT\/$PROJECT.tmp\/$PROJECT");
|
||||
$cmd= "zip -9 -r $BUILDROOT/$FILENAMEAPS.zip \*";
|
||||
print $cmd."\n";
|
||||
$ret= `$cmd`;
|
||||
chdir("$olddir");
|
||||
|
||||
# Move to final dir
|
||||
print "Move $BUILDROOT/$FILENAMEAPS.zip to $NEWDESTI/$FILENAMEAPS.zip\n";
|
||||
$ret=`mv "$BUILDROOT/$FILENAMEAPS.zip" "$NEWDESTI/$FILENAMEAPS.zip"`;
|
||||
next;
|
||||
}
|
||||
|
||||
if ($target eq 'EXEDOLIWAMP')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file dolibarr.pl
|
||||
# \brief Dolibarr script install for Virtualmin Pro
|
||||
# \author (c)2009-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
# \author (c)2009-2018 Regis Houssin <regis.houssin@inodbox.com>
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ return "Regis Houssin";
|
||||
# script_dolibarr_versions()
|
||||
sub script_dolibarr_versions
|
||||
{
|
||||
return ( "5.0.4", "4.0.6", "3.9.4" );
|
||||
return ( "9.0.0", "8.0.3", "7.0.4", "6.0.8", "5.0.7" );
|
||||
}
|
||||
|
||||
sub script_dolibarr_release
|
||||
@ -263,15 +263,16 @@ if ($upgrade) {
|
||||
local @params = ( [ "action", "upgrade" ],
|
||||
[ "versionfrom", $upgrade->{'version'} ],
|
||||
[ "versionto", $ver ],
|
||||
[ "installlock", "444" ],
|
||||
);
|
||||
local $p = $ver >= 3.8 ? "step5" : "etape5";
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Remove the installation directory.
|
||||
local $dinstall = "$opts->{'dir'}/install";
|
||||
$dinstall =~ s/\/$//;
|
||||
$out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall));
|
||||
# Remove the installation directory. (deprecated)
|
||||
# local $dinstall = "$opts->{'dir'}/install";
|
||||
# $dinstall =~ s/\/$//;
|
||||
# $out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall));
|
||||
|
||||
}
|
||||
else {
|
||||
@ -306,15 +307,18 @@ else {
|
||||
[ "login", "admin" ],
|
||||
[ "pass", $dompass ],
|
||||
[ "pass_verif", $dompass ],
|
||||
[ "installlock", "444" ],
|
||||
);
|
||||
local $p = $ver >= 3.8 ? "step5" : "etape5";
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Remove the installation directory and protect config file.
|
||||
local $dinstall = "$opts->{'dir'}/install";
|
||||
$dinstall =~ s/\/$//;
|
||||
$out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall));
|
||||
# Remove the installation directory (deprecated)
|
||||
# local $dinstall = "$opts->{'dir'}/install";
|
||||
# $dinstall =~ s/\/$//;
|
||||
# $out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall));
|
||||
|
||||
# Protect config file
|
||||
&set_permissions_as_domain_user($d, 0644, $cfile);
|
||||
&set_permissions_as_domain_user($d, 0755, $cfiledir);
|
||||
}
|
||||
@ -386,14 +390,18 @@ sub script_dolibarr_check_latest
|
||||
{
|
||||
local ($ver) = @_;
|
||||
local @vers = &osdn_package_versions("dolibarr",
|
||||
$ver >= 5.0 ? "dolibarr\\-(5\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 4.0 ? "dolibarr\\-(4\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.9 ? "dolibarr\\-(3\\.9\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.8 ? "dolibarr\\-(3\\.8\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.7 ? "dolibarr\\-(3\\.7\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.6 ? "dolibarr\\-(3\\.6\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.5 ? "dolibarr\\-(3\\.5\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 2.9 ? "dolibarr\\-(2\\.9\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 9.0 ? "dolibarr\\-(9\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 8.0 ? "dolibarr\\-(8\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 7.0 ? "dolibarr\\-(7\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 6.0 ? "dolibarr\\-(6\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 5.0 ? "dolibarr\\-(5\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 4.0 ? "dolibarr\\-(4\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.9 ? "dolibarr\\-(3\\.9\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.8 ? "dolibarr\\-(3\\.8\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.7 ? "dolibarr\\-(3\\.7\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.6 ? "dolibarr\\-(3\\.6\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.5 ? "dolibarr\\-(3\\.5\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 2.9 ? "dolibarr\\-(2\\.9\\.[0-9\\.]+)\\.tgz" :
|
||||
"dolibarr\\-(2\\.8\\.[0-9\\.]+)\\.tgz");
|
||||
return "Failed to find versions" if (!@vers);
|
||||
return $ver eq $vers[0] ? undef : $vers[0];
|
||||
|
||||
@ -160,6 +160,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asset
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
@ -176,8 +177,11 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
@ -210,6 +214,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/supplier_proposal
|
||||
%_datadir/dolibarr/htdocs/support
|
||||
%_datadir/dolibarr/htdocs/theme
|
||||
%_datadir/dolibarr/htdocs/takepos
|
||||
%_datadir/dolibarr/htdocs/ticket
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
|
||||
@ -54,7 +54,7 @@ BuildRequires: desktop-file-utils
|
||||
Group: Applications/Productivity
|
||||
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
|
||||
Requires: mysql, mysql-client
|
||||
%else
|
||||
%else%_datadir/dolibarr/htdocs/datapolicy
|
||||
%if 0%{?suse_version}
|
||||
# Voir http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros
|
||||
Group: Productivity/Office/Management
|
||||
@ -124,7 +124,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
|
||||
%if 0%{?sles_version}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
%{__mkdir} $RPM_BUILD_ROOT
|
||||
%{__mkdir} $RPM_BUILD_ROOT%_datadir/dolibarr/htdocs/datapolicy
|
||||
%{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
%{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
|
||||
%else
|
||||
@ -240,6 +240,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asset
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
@ -256,8 +257,11 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
@ -290,6 +294,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/supplier_proposal
|
||||
%_datadir/dolibarr/htdocs/support
|
||||
%_datadir/dolibarr/htdocs/theme
|
||||
%_datadir/dolibarr/htdocs/takepos
|
||||
%_datadir/dolibarr/htdocs/ticket
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
|
||||
@ -157,6 +157,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asset
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
@ -173,8 +174,11 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
@ -207,6 +211,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/supplier_proposal
|
||||
%_datadir/dolibarr/htdocs/support
|
||||
%_datadir/dolibarr/htdocs/theme
|
||||
%_datadir/dolibarr/htdocs/takepos
|
||||
%_datadir/dolibarr/htdocs/ticket
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
|
||||
@ -168,6 +168,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asset
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
@ -184,8 +185,11 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
@ -218,6 +222,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/supplier_proposal
|
||||
%_datadir/dolibarr/htdocs/support
|
||||
%_datadir/dolibarr/htdocs/theme
|
||||
%_datadir/dolibarr/htdocs/takepos
|
||||
%_datadir/dolibarr/htdocs/ticket
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
<VirtualHost *:80>
|
||||
DocumentRoot %TRAVIS_BUILD_DIR%/htdocs
|
||||
|
||||
<Directory "%TRAVIS_BUILD_DIR%/htdocs">
|
||||
<Directory "%TRAVIS_BUILD_DIR%/htdocs/">
|
||||
Options FollowSymLinks MultiViews ExecCGI
|
||||
AllowOverride All
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
# Wire up Apache to use Travis CI's php-fpm.
|
||||
@ -14,5 +13,9 @@
|
||||
Action php5-fcgi /php5-fcgi
|
||||
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
||||
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
|
||||
|
||||
<Directory /usr/lib/cgi-bin>
|
||||
Require all granted
|
||||
</Directory>
|
||||
</IfModule>
|
||||
</VirtualHost>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
|
||||
This file describe changes made on external library after beeing included
|
||||
This file describes changes made on external libraries after being included
|
||||
in Dolibarr root.
|
||||
|
||||
|
||||
@ -48,6 +48,23 @@ into
|
||||
// initialize subsetchars
|
||||
$subsetchars = array_fill(0, 256, true);
|
||||
|
||||
* Replace the continue into switch with a break:
|
||||
|
||||
case 're': {
|
||||
// justify block
|
||||
if (!TCPDF_STATIC::empty_string($this->lispacer)) {
|
||||
$this->lispacer = '';
|
||||
continue;
|
||||
}
|
||||
|
||||
into
|
||||
case 're': {
|
||||
// justify block
|
||||
if (!TCPDF_STATIC::empty_string($this->lispacer)) {
|
||||
$this->lispacer = '';
|
||||
break;
|
||||
}
|
||||
|
||||
* Optionnaly, removed all fonts except
|
||||
dejavusans* (used by greek, arab, persan, romanian, turkish),
|
||||
freemono* (russian),
|
||||
@ -61,17 +78,24 @@ In htdocs/includes/tcpdf/tcpdf.php
|
||||
+ protected $default_monospaced_font = 'freemono';
|
||||
|
||||
|
||||
|
||||
|
||||
TCPDI:
|
||||
------
|
||||
Add fpdf_tpl.php 1.2
|
||||
Add tcpdi.php
|
||||
|
||||
Add tcpdi_parser.php and replace:
|
||||
require_once(dirname(__FILE__).'/include/tcpdf_filters.php');
|
||||
with:
|
||||
require_once(dirname(__FILE__).'/../tecnickcom/tcpdf/include/tcpdf_filters.php');
|
||||
|
||||
|
||||
* Fix by replacing
|
||||
} elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1] >= 2))) {
|
||||
with
|
||||
} elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1]) >= 2)) {
|
||||
|
||||
|
||||
|
||||
JSGANTT:
|
||||
@ -90,6 +114,14 @@ var vTmpNode=this.newNode(vTmpCell, 'div', null, '');
|
||||
vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']);
|
||||
vTmpNode.setAttribute('href',vTaskList[i].getLink());
|
||||
|
||||
* Replace '% Comp.' to have a smaller text column header
|
||||
'comp':'% Comp.'
|
||||
with
|
||||
'comp':'%'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JCROP:
|
||||
------
|
||||
|
||||
@ -40,7 +40,7 @@ $error=0;
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once($path."../../htdocs/master.inc.php");
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
@ -58,7 +58,7 @@ print "***** ".$script_file." (".$version.") *****\n";
|
||||
// Start of transaction
|
||||
$db->begin();
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
||||
require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php";
|
||||
|
||||
// Create invoice object
|
||||
$obj = new Facture($db);
|
||||
|
||||
@ -40,7 +40,7 @@ $error=0;
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once($path."../../htdocs/master.inc.php");
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
@ -59,7 +59,7 @@ print "***** ".$script_file." (".$version.") *****\n";
|
||||
// Start of transaction
|
||||
$db->begin();
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
|
||||
require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
|
||||
|
||||
// Create order object
|
||||
$com = new Commande($db);
|
||||
|
||||
@ -40,7 +40,7 @@ $error=0;
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once($path."../../htdocs/master.inc.php");
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
@ -59,7 +59,7 @@ print "***** ".$script_file." (".$version.") *****\n";
|
||||
// Start of transaction
|
||||
$db->begin();
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
require_once DOL_DOCUMENT_ROOT."/product/class/product.class.php";
|
||||
|
||||
// Create instance of object
|
||||
$myproduct=new Product($db);
|
||||
|
||||
@ -40,7 +40,7 @@ $error=0;
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once($path."../../htdocs/master.inc.php");
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
@ -58,7 +58,7 @@ print "***** ".$script_file." (".$version.") *****\n";
|
||||
// Start of transaction
|
||||
$db->begin();
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/user/class/user.class.php");
|
||||
require_once DOL_DOCUMENT_ROOT."/user/class/user.class.php";
|
||||
|
||||
// Create user object
|
||||
$obj = new User($db);
|
||||
|
||||
@ -40,7 +40,7 @@ $error=0;
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once($path."../../htdocs/master.inc.php");
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
@ -65,7 +65,7 @@ print 'Argument id_thirdparty='.$argv[1]."\n";
|
||||
// Start of transaction
|
||||
$db->begin();
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php");
|
||||
require_once DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php";
|
||||
|
||||
// Create contract object
|
||||
$obj = new Contrat($db);
|
||||
|
||||
@ -4,4 +4,4 @@ X-Mailer: Dolibarr version 2.7.0-beta (using php mail)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
<html><head><title></title></head><body>Testé<br />fdsfsdf<br />fsdf<strong>sfd</strong>s<br />fssdfsd<br /></body></html>
|
||||
<html><head><title></title></head><body>Testé<br>fdsfsdf<br>fsdf<strong>sfd</strong>s<br>fssdfsd<br></body></html>
|
||||
|
||||
@ -32,9 +32,9 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
||||
// Recupere root dolibarr
|
||||
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
||||
require __DIR__. '/../../htdocs/master.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
|
||||
|
||||
|
||||
/*
|
||||
@ -185,7 +185,4 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0)
|
||||
{
|
||||
dol_print_error($db,$object->error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -33,14 +33,14 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
||||
// Recupere root dolibarr
|
||||
//$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||
require __DIR__. '/../../htdocs/master.inc.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
|
||||
require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -33,7 +33,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
||||
// Recupere root dolibarr
|
||||
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||
require __DIR__. '/../../htdocs/master.inc.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
@ -33,11 +33,11 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
||||
// Recupere root dolibarr
|
||||
//$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
||||
require __DIR__. '/../../htdocs/master.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
|
||||
|
||||
/*
|
||||
* Parameters
|
||||
@ -157,7 +157,7 @@ $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"))
|
||||
{
|
||||
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";
|
||||
}
|
||||
|
||||
$i=0;
|
||||
@ -218,6 +218,4 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
|
||||
{
|
||||
dol_print_error($db,$object->error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
||||
// Recupere root dolibarr
|
||||
//$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||
require __DIR__. '/../../htdocs/master.inc.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file dev/initdata/import-product.php
|
||||
* \brief Script example to insert products from a csv file.
|
||||
* \brief Script example to insert products from a csv file.
|
||||
* To purge data, you can have a look at purge-data.php
|
||||
*/
|
||||
|
||||
@ -36,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/import-products.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
require $path."../../htdocs/master.inc.php";
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
||||
@ -118,22 +118,22 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
{
|
||||
$i++;
|
||||
$errorrecord=0;
|
||||
|
||||
|
||||
if ($startlinenb && $i < $startlinenb) continue;
|
||||
if ($endlinenb && $i > $endlinenb) continue;
|
||||
|
||||
|
||||
$nboflines++;
|
||||
|
||||
|
||||
$produit = new Product($db);
|
||||
$produit->type = 0;
|
||||
$produit->status = 1;
|
||||
$produit->ref = trim($fields[0]);
|
||||
|
||||
|
||||
print "Process line nb ".$i.", ref ".$produit->ref;
|
||||
$produit->label = trim($fields[2]);
|
||||
$produit->description = trim($fields[4]."\n".($fields[5] ? $fields[5].' x '.$fields[6].' x '.$fields[7] : ''));
|
||||
$produit->volume = price2num($fields[8]);
|
||||
$produit->volume_unit = 0;
|
||||
$produit->volume_unit = 0;
|
||||
$produit->weight = price2num($fields[9]);
|
||||
$produit->weight_units = 0; // -3 = g
|
||||
|
||||
@ -142,9 +142,9 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
|
||||
$produit->status = 1;
|
||||
$produit->status_buy = 1;
|
||||
|
||||
|
||||
$produit->finished = 1;
|
||||
|
||||
|
||||
$produit->price_min = null;
|
||||
$produit->price_min_ttc = null;
|
||||
$produit->price = price2num($fields[11]);
|
||||
@ -152,25 +152,25 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
$produit->price_base_type = 'TTC';
|
||||
$produit->tva_tx = price2num($fields[13]);
|
||||
$produit->tva_npr = 0;
|
||||
|
||||
|
||||
$produit->cost_price = price2num($fields[16]);
|
||||
|
||||
|
||||
// Extrafields
|
||||
$produit->array_options['options_ecotaxdeee']=price2num($fields[17]);
|
||||
|
||||
|
||||
$ret=$produit->create($user);
|
||||
if ($ret < 0)
|
||||
{
|
||||
print " - Error in create result code = ".$ret." - ".$produit->errorsToString();
|
||||
$errorrecord++;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
print " - Creation OK with ref ".$produit->ref." - id = ".$ret;
|
||||
}
|
||||
|
||||
dol_syslog("Add prices");
|
||||
|
||||
|
||||
// If we use price level, insert price for each level
|
||||
if (! $errorrecord && 1)
|
||||
{
|
||||
@ -181,14 +181,14 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
print " - Error in updatePrice result code = ".$ret1." ".$ret2." - ".$produit->errorsToString();
|
||||
$errorrecord++;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
print " - updatePrice OK";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dol_syslog("Add multilangs");
|
||||
|
||||
|
||||
// Add alternative languages
|
||||
if (! $errorrecord && 1)
|
||||
{
|
||||
@ -201,15 +201,15 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
print " - Error in setMultiLangs result code = ".$ret." - ".$produit->errorsToString();
|
||||
$errorrecord++;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
print " - setMultiLangs OK";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print "\n";
|
||||
|
||||
if ($errorrecord)
|
||||
|
||||
if ($errorrecord)
|
||||
{
|
||||
fwrite($fhandleerr, 'Error on record nb '.$i." - ".$produit->errorsToString()."\n");
|
||||
$error++; // $errorrecord will be reset
|
||||
|
||||
@ -36,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/import-thirdparties.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
require $path."../../htdocs/master.inc.php";
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file dev/initdata/import-thirdparties.php
|
||||
* \brief Script example to insert thirdparties from a csv file.
|
||||
* \brief Script example to insert thirdparties from a csv file.
|
||||
* To purge data, you can have a look at purge-data.php
|
||||
*/
|
||||
|
||||
@ -36,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/import-users.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
require $path."../../htdocs/master.inc.php";
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
||||
@ -118,15 +118,15 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
{
|
||||
$i++;
|
||||
$errorrecord=0;
|
||||
|
||||
|
||||
if ($startlinenb && $i < $startlinenb) continue;
|
||||
if ($endlinenb && $i > $endlinenb) continue;
|
||||
|
||||
|
||||
$nboflines++;
|
||||
|
||||
|
||||
$object = new User($db);
|
||||
$object->statut = 1;
|
||||
|
||||
|
||||
$tmp=explode(' ',$fields[3],2);
|
||||
$object->firstname = trim($tmp[0]);
|
||||
$object->lastname = trim($tmp[1]);
|
||||
@ -134,23 +134,23 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
else $object->login=strtolower($object->firstname);
|
||||
$object->login=preg_replace('/ /','',$object->login);
|
||||
$object->password = 'init';
|
||||
|
||||
|
||||
print "Process line nb ".$i.", login ".$object->login;
|
||||
|
||||
|
||||
$ret=$object->create($user);
|
||||
if ($ret < 0)
|
||||
{
|
||||
print " - Error in create result code = ".$ret." - ".$object->errorsToString();
|
||||
$errorrecord++;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
print " - Creation OK with login ".$object->login." - id = ".$ret;
|
||||
}
|
||||
|
||||
print "\n";
|
||||
|
||||
if ($errorrecord)
|
||||
|
||||
if ($errorrecord)
|
||||
{
|
||||
fwrite($fhandleerr, 'Error on record nb '.$i." - ".$object->errorsToString()."\n");
|
||||
$error++; // $errorrecord will be reset
|
||||
|
||||
@ -36,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/purge-data.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
require $path."../../htdocs/master.inc.php";
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
@ -44,8 +44,7 @@ include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("errors");
|
||||
$langs->loadLangs(array("main", "errors"));
|
||||
|
||||
// Global variables
|
||||
$version=DOL_VERSION;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
# WARNING: This script erase all data of database
|
||||
# with data into dump file
|
||||
#
|
||||
# Regis Houssin - regis.houssin@capnetworks.com
|
||||
# Regis Houssin - regis.houssin@inodbox.com
|
||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||
#------------------------------------------------------
|
||||
# Usage: initdemo.sh
|
||||
|
||||
14172
dev/initdemo/mysqldump_dolibarr_8.0.0.sql
Normal file
14172
dev/initdemo/mysqldump_dolibarr_8.0.0.sql
Normal file
File diff suppressed because one or more lines are too long
13954
dev/initdemo/mysqldump_dolibarr_9.0.0.sql
Normal file
13954
dev/initdemo/mysqldump_dolibarr_9.0.0.sql
Normal file
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@
|
||||
# Script to remove setup of a Dolibarr installation.
|
||||
# Note: "dialog" tool need to be available.
|
||||
#
|
||||
# Regis Houssin - regis.houssin@capnetworks.com
|
||||
# Regis Houssin - regis.houssin@inodbox.com
|
||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||
#------------------------------------------------------
|
||||
# WARNING: This script erase setup of instance,
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# Script to extrac a database with demo values.
|
||||
# Note: "dialog" tool need to be available if no parameter provided.
|
||||
#
|
||||
# Regis Houssin - regis.houssin@capnetworks.com
|
||||
# Regis Houssin - regis.houssin@inodbox.com
|
||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||
#------------------------------------------------------
|
||||
# Usage: savedemo.sh
|
||||
@ -171,6 +171,8 @@ export list="
|
||||
--ignore-table=$base.llx_abonne_extrafields
|
||||
--ignore-table=$base.llx_abonne_type
|
||||
--ignore-table=$base.llx_abonnement
|
||||
--ignore-table=$base.llx_accountingaccount
|
||||
--ignore-table=$base.llx_accountingsystem
|
||||
--ignore-table=$base.llx_advanced_extrafields
|
||||
--ignore-table=$base.llx_advanced_extrafields_options
|
||||
--ignore-table=$base.llx_advanced_extrafields_values
|
||||
@ -189,6 +191,9 @@ export list="
|
||||
--ignore-table=$base.llx_c_dolicloud_plans
|
||||
--ignore-table=$base.llx_c_pays
|
||||
--ignore-table=$base.llx_c_source
|
||||
--ignore-table=$base.llx_c_ticketsup_category
|
||||
--ignore-table=$base.llx_c_ticketsup_severity
|
||||
--ignore-table=$base.llx_c_ticketsup_type
|
||||
--ignore-table=$base.llx_cabinetmed_c_banques
|
||||
--ignore-table=$base.llx_cabinetmed_c_ccam
|
||||
--ignore-table=$base.llx_cabinetmed_c_examconclusion
|
||||
@ -246,6 +251,8 @@ export list="
|
||||
--ignore-table=$base.llx_residence
|
||||
--ignore-table=$base.llx_residence_building
|
||||
--ignore-table=$base.llx_residence_building_links
|
||||
--ignore-table=$base.llx_societe_rib2
|
||||
--ignore-table=$base.llx_ticketsup
|
||||
--ignore-table=$base.llx_ultimatepdf
|
||||
--ignore-table=$base.llx_update_modules
|
||||
--ignore-table=$base.llx_ventilation_achat
|
||||
|
||||
@ -41,15 +41,15 @@ $passwordbase=isset($argv[6])?$argv[6]:'';
|
||||
|
||||
// Include Dolibarr environment
|
||||
$res=0;
|
||||
if (! $res && file_exists($path."../../master.inc.php")) $res=@include($path."../../master.inc.php");
|
||||
if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include($path."../../htdocs/master.inc.php");
|
||||
if (! $res && file_exists("../master.inc.php")) $res=@include("../master.inc.php");
|
||||
if (! $res && file_exists("../../master.inc.php")) $res=@include("../../master.inc.php");
|
||||
if (! $res && file_exists("../../../master.inc.php")) $res=@include("../../../master.inc.php");
|
||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include($path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
|
||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include("../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
|
||||
if (! $res && file_exists($path."../../master.inc.php")) $res=@include $path."../../master.inc.php";
|
||||
if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include $path."../../htdocs/master.inc.php";
|
||||
if (! $res && file_exists("../master.inc.php")) $res=@include "../master.inc.php";
|
||||
if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.inc.php";
|
||||
if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php";
|
||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||
if (! $res) die ("Failed to include master.inc.php file\n");
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* or see http://www.gnu.org/
|
||||
*
|
||||
*
|
||||
* Get a distant dump file and load it into a mysql database
|
||||
*/
|
||||
|
||||
@ -36,15 +36,15 @@ $confirm=isset($argv[1])?$argv[1]:'';
|
||||
|
||||
// Include Dolibarr environment
|
||||
$res=0;
|
||||
if (! $res && file_exists($path."../../master.inc.php")) $res=@include($path."../../master.inc.php");
|
||||
if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include($path."../../htdocs/master.inc.php");
|
||||
if (! $res && file_exists("../master.inc.php")) $res=@include("../master.inc.php");
|
||||
if (! $res && file_exists("../../master.inc.php")) $res=@include("../../master.inc.php");
|
||||
if (! $res && file_exists("../../../master.inc.php")) $res=@include("../../../master.inc.php");
|
||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include($path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
|
||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include("../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
|
||||
if (! $res && file_exists($path."../../master.inc.php")) $res=@include $path."../../master.inc.php";
|
||||
if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include $path."../../htdocs/master.inc.php";
|
||||
if (! $res && file_exists("../master.inc.php")) $res=@include "../master.inc.php";
|
||||
if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.inc.php";
|
||||
if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php";
|
||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||
if (! $res) die ("Failed to include master.inc.php file\n");
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
|
||||
/*
|
||||
@ -74,7 +74,7 @@ $tables=array(
|
||||
|
||||
$year=2010;
|
||||
$currentyear=$tmp['year'];
|
||||
while ($year <= $currentyear)
|
||||
while ($year <= $currentyear)
|
||||
{
|
||||
//$year=2021;
|
||||
$delta=($currentyear - $year);
|
||||
@ -84,7 +84,7 @@ while ($year <= $currentyear)
|
||||
{
|
||||
foreach($tables as $tablekey => $tableval)
|
||||
{
|
||||
print "\nCorrect ".$tablekey." for year ".$year." and move them to current year ".$currentyear." ";
|
||||
print "\nCorrect ".$tablekey." for year ".$year." and move them to current year ".$currentyear." ";
|
||||
$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)";
|
||||
//$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." > NOW()";
|
||||
$resql = $db->query($sql);
|
||||
@ -110,14 +110,14 @@ while ($year <= $currentyear)
|
||||
//print $sql2."\n";
|
||||
$resql2 = $db->query($sql2);
|
||||
if (! $resql2) dol_print_error($db);
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$year++;
|
||||
}
|
||||
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<uml:Model xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xmi:id="_qb8akM37EdqwVrslYOdUDA">
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_w8IxIM37EdqwVrslYOdUDA" name="dolibarr">
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_T5aZ4FK9Ed60vaZbVikprw" name="OrdersModule"/>
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_ZhuGMlK9Ed60vaZbVikprw" name="InvoiceModule"/>
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_cf3SUlK9Ed60vaZbVikprw" name="UserModule"/>
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_maM0glK9Ed60vaZbVikprw" name="FoundationModule"/>
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_oqTO4lK9Ed60vaZbVikprw" name="ContractsModule"/>
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_rEq_klK9Ed60vaZbVikprw" name="ProposalsModule"/>
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_vxYmUlK9Ed60vaZbVikprw" name="EMailingManagement"/>
|
||||
</packagedElement>
|
||||
</uml:Model>
|
||||
@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<diagrams:Diagrams xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.topcased.org/DI/1.0" xmlns:diagrams="http://www.topcased.org/Diagrams/1.0" xmi:id="_SI6FkFK9Ed60vaZbVikprw" activeDiagram="_SI6FkVK9Ed60vaZbVikprw">
|
||||
<model href="dolibarr.uml#_w8IxIM37EdqwVrslYOdUDA"/>
|
||||
<diagrams xmi:id="_SI6FkVK9Ed60vaZbVikprw" position="0,0" size="100,100" name="dolibarr" viewport="0,0">
|
||||
<property xmi:id="_SJ9OcFK9Ed60vaZbVikprw" key="pageFormatName" value="A4"/>
|
||||
<property xmi:id="_SJ9OcVK9Ed60vaZbVikprw" key="diagramWidth" value="840"/>
|
||||
<property xmi:id="_SJ9OclK9Ed60vaZbVikprw" key="diagramHeight" value="1188"/>
|
||||
<property xmi:id="_SJ9Oc1K9Ed60vaZbVikprw" key="pageMarginName" value="Small Margin"/>
|
||||
<property xmi:id="_SJ9OdFK9Ed60vaZbVikprw" key="diagramTopMargin" value="20"/>
|
||||
<property xmi:id="_SJ9OdVK9Ed60vaZbVikprw" key="diagramBottomMargin" value="20"/>
|
||||
<property xmi:id="_SJ9OdlK9Ed60vaZbVikprw" key="diagramLeftMargin" value="20"/>
|
||||
<property xmi:id="_SJ9Od1K9Ed60vaZbVikprw" key="diagramRightMargin" value="20"/>
|
||||
<property xmi:id="_SJ9OeFK9Ed60vaZbVikprw" key="orientation" value="portrait"/>
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_SI6FklK9Ed60vaZbVikprw" presentation="org.topcased.modeler.uml.classdiagram">
|
||||
<element href="dolibarr.uml#_w8IxIM37EdqwVrslYOdUDA"/>
|
||||
</semanticModel>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_T2b-YFK9Ed60vaZbVikprw" position="15,190" size="176,81">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_T2b-YVK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_T5aZ4FK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_ZhuGMFK9Ed60vaZbVikprw" position="15,118" size="177,68">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_ZhuGMVK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_ZhuGMlK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_cf3SUFK9Ed60vaZbVikprw" position="15,10" size="174,81">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_cf3SUVK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_cf3SUlK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_maM0gFK9Ed60vaZbVikprw" position="291,118" size="145,73">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_maM0gVK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_maM0glK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_oqTO4FK9Ed60vaZbVikprw" position="15,274" size="179,80">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_oqTO4VK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_oqTO4lK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_rEq_kFK9Ed60vaZbVikprw" position="15,358" size="181,73">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_rEq_kVK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_rEq_klK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_vxYmUFK9Ed60vaZbVikprw" position="15,490" size="181,80">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_vxYmUVK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_vxYmUlK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
</diagrams>
|
||||
</diagrams:Diagrams>
|
||||
Binary file not shown.
@ -4,49 +4,37 @@
|
||||
<description>Dolibarr coding standard.</description>
|
||||
|
||||
<exclude-pattern type="relative">build/html</exclude-pattern>
|
||||
<exclude-pattern type="relative">build/aps</exclude-pattern>
|
||||
<exclude-pattern type="relative">documents</exclude-pattern>
|
||||
<exclude-pattern type="relative">htdocs/custom</exclude-pattern>
|
||||
<exclude-pattern type="relative">htdocs/includes</exclude-pattern>
|
||||
<exclude-pattern type="relative">htdocs/conf.php</exclude-pattern>
|
||||
<exclude-pattern type="relative">*/nltechno*</exclude-pattern>
|
||||
<exclude-pattern type="relative">*/htdocs/includes</exclude-pattern>
|
||||
<exclude-pattern type="relative">*.min.css</exclude-pattern>
|
||||
<exclude-pattern type="relative">*.js</exclude-pattern>
|
||||
|
||||
<!-- List of all tests -->
|
||||
|
||||
|
||||
|
||||
<!-- Rules from Internal Standard -->
|
||||
|
||||
|
||||
<rule ref="Internal.NoCodeFound">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<!-- Rules from Generic Standard -->
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement" />
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedCatch">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedForeach">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedIf">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedElse">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedElseif">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowed">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowedWarning">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- Rules from Generic Standard -->
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement">
|
||||
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIf"/>
|
||||
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedElse"/>
|
||||
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedElseif"/>
|
||||
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
|
||||
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedForeach"/>
|
||||
<exclude name="Generic.CodeAnalysis.EmptyStatement.NotAllowed"/>
|
||||
<exclude name="Generic.CodeAnalysis.EmptyStatement.NotAllowedWarning"/>
|
||||
</rule>
|
||||
|
||||
<!-- <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> -->
|
||||
|
||||
@ -82,7 +70,7 @@
|
||||
<!-- Lines can be 85 chars long, but never show errors -->
|
||||
<rule ref="Generic.Files.LineLength">
|
||||
<properties>
|
||||
<property name="lineLimit" value="1000" />
|
||||
<property name="lineLimit" value="500" />
|
||||
<property name="absoluteLineLimit" value="0" />
|
||||
</properties>
|
||||
</rule>
|
||||
@ -138,9 +126,7 @@
|
||||
|
||||
<rule ref="Generic.NamingConventions.ConstructorName" />
|
||||
<!-- Check if we use PHP4 constructor instead of __construct() -->
|
||||
<rule ref="Generic.NamingConventions.ConstructorName.OldStyle">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.NamingConventions.ConstructorName.OldStyle" />
|
||||
|
||||
<rule ref="Generic.NamingConventions.UpperCaseConstantName" />
|
||||
|
||||
@ -148,7 +134,7 @@
|
||||
<rule ref="Generic.PHP.DeprecatedFunctions.Deprecated">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule ref="Generic.PHP.DisallowShortOpenTag" />
|
||||
|
||||
<rule ref="Generic.PHP.ForbiddenFunctions" />
|
||||
@ -156,15 +142,15 @@
|
||||
<!-- Warning when using @ before functions -->
|
||||
<!-- <rule ref="Generic.PHP.NoSilencedErrors" /> -->
|
||||
|
||||
<!-- Say if null, true, false must be uppercase -->
|
||||
<!-- <rule ref="Generic.PHP.UpperCaseConstant" /> -->
|
||||
<!-- Say if null, true, false must be uppercase (Rule 2.5 of PSR2 https://www.php-fig.org/psr/psr-2/) -->
|
||||
<rule ref="Generic.PHP.LowerCaseConstant" />
|
||||
|
||||
<rule ref="Generic.Strings.UnnecessaryStringConcat" />
|
||||
|
||||
<rule ref="Generic.Strings.UnnecessaryStringConcat.Found">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<!-- Disallow usage of tab -->
|
||||
<!-- <rule ref="Generic.WhiteSpace.DisallowTabIndent" /> -->
|
||||
|
||||
@ -172,7 +158,24 @@
|
||||
<!-- Disabled as this does not support tab -->
|
||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
||||
|
||||
<!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
|
||||
<properties>
|
||||
<property name="ignoreBlankLines" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
|
||||
|
||||
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
|
||||
|
||||
<!-- Rules from PEAR Standard -->
|
||||
|
||||
@ -187,7 +190,7 @@
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule ref="PEAR.Commenting.ClassComment.MissingTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
@ -207,14 +210,14 @@
|
||||
<rule ref="PEAR.Commenting.ClassComment.MissingLinkTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule ref="PEAR.Commenting.ClassComment.MissingPackageTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
|
||||
<!--
|
||||
<rule ref="PEAR.Commenting.FileComment" />
|
||||
<rule ref="PEAR.Commenting.FileComment.WrongStyle">
|
||||
<severity>0</severity>
|
||||
@ -226,20 +229,20 @@
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
-->
|
||||
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment" />
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.Empty">
|
||||
<severity>5</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||
|
||||
<!--<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||
</rule>-->
|
||||
<!--<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
</rule>-->
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType" />
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName">
|
||||
@ -255,11 +258,11 @@
|
||||
<rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.WrongStyle">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingBeforeParamType">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
@ -286,7 +289,20 @@
|
||||
<!-- <rule ref="PEAR.ControlStructures.MultiLineCondition" /> -->
|
||||
|
||||
<!-- Test if () are removed for includes -->
|
||||
<!-- <rule ref="PEAR.Files.IncludingFile"/> -->
|
||||
<rule ref="PEAR.Files.IncludingFile" />
|
||||
<!-- Disable some error messages that we do not want. -->
|
||||
<rule ref="PEAR.Files.IncludingFile.UseInclude">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Files.IncludingFile.UseIncludeOnce">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Files.IncludingFile.UseRequire">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Files.IncludingFile.UseRequireOnce">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Formatting.MultiLineAssignment" />
|
||||
|
||||
@ -316,14 +332,14 @@
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule ref="PEAR.Functions.ValidDefaultValue" />
|
||||
|
||||
<rule ref="PEAR.NamingConventions.ValidClassName" />
|
||||
<rule ref="PEAR.NamingConventions.ValidClassName.Invalid">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule ref="PEAR.NamingConventions.ValidClassName.StartWithCapital">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
@ -331,7 +347,7 @@
|
||||
<rule ref="PEAR.NamingConventions.ValidClassName.StartWithCaptial">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName" />
|
||||
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore">
|
||||
@ -348,31 +364,37 @@
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
|
||||
<!--<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
</rule>-->
|
||||
<!--<rule ref="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps">
|
||||
<severity>0</severity>
|
||||
</rule>-->
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.NamingConventions.ValidVariableName" />
|
||||
|
||||
<rule ref="PSR2.Classes.ClassDeclaration" />
|
||||
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
||||
|
||||
<!-- This is not in PSR2 -->
|
||||
<rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule ref="PEAR.WhiteSpace.ObjectOperatorIndent" />
|
||||
|
||||
<!-- Need to be commented to be disabled
|
||||
<rule ref="PEAR.WhiteSpace.ScopeClosingBrace">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule ref="PEAR.WhiteSpace.ScopeClosingBrace.Line">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Already found as a Generic rule -->
|
||||
<!-- <rule ref="PEAR.WhiteSpace.ScopeIndent" /> -->
|
||||
|
||||
|
||||
@ -17,14 +17,14 @@ fi
|
||||
# To detec
|
||||
if [ "x$1" = "xlist" ]
|
||||
then
|
||||
find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep CRLF
|
||||
# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v 'htdocs\/includes' | grep CRLF
|
||||
find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'documents\/website' | grep CRLF
|
||||
# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v 'documents\/website' | grep -v 'htdocs\/includes' | grep CRLF
|
||||
fi
|
||||
|
||||
# To convert
|
||||
if [ "x$1" = "xfix" ]
|
||||
then
|
||||
for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep CRLF | awk -F':' '{ print $1 }' `
|
||||
for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'documents\/website' | grep CRLF | awk -F':' '{ print $1 }' `
|
||||
do
|
||||
echo "Fix file $fic"
|
||||
dos2unix "$fic"
|
||||
|
||||
@ -1,7 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
FROM=2016-01-01
|
||||
TO=2016-12-31
|
||||
if [ "x$1" = "x" ]; then
|
||||
echo "Usage: $0 YEAR"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
FROM=$1-01-01
|
||||
TO=$1-12-31
|
||||
|
||||
echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l"
|
||||
git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
#/bin/bash
|
||||
Releases=("3.8" "3.9" "4.0" "5.0", "develop")
|
||||
Dates=("2010-01-01", "2011-01-01", "2012-01-01", "2013-01-01", "2014-01-01", "2015-01-01", "2016-07-01")
|
||||
Releases=("3.8" "3.9" "4.0" "5.0" "6.0" " 7.0" "develop")
|
||||
Dates=("2013-01-01", "2014-01-01", "2015-01-01", "2016-07-01", "2017-02-01", "2017-07-01", "2018-02-01", "2050-01-01")
|
||||
let "counter = 1"
|
||||
|
||||
for i in "${Releases[@]}"
|
||||
do
|
||||
echo "=== $counter git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]}"
|
||||
git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]}
|
||||
echo -n "Total $i: "
|
||||
git log --pretty=oneline --after=${Dates[counter-1]} --before=${Dates[counter]} | wc -l
|
||||
|
||||
130
dev/tools/snakeCaseToCamelCase.sh
Executable file
130
dev/tools/snakeCaseToCamelCase.sh
Executable file
@ -0,0 +1,130 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Need "rpl" package
|
||||
RPL_INSTALLED=$(dpkg -s rpl)
|
||||
if [[ -z ${RPL_INSTALLED} ]]; then
|
||||
echo "This bash need rpl command, you can install it with: sudo apt install rpl"
|
||||
fi
|
||||
|
||||
DIR_HTDOCS=$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../htdocs" >/dev/null && pwd )
|
||||
|
||||
PATTERN=""
|
||||
if [[ -f $1 ]]; then
|
||||
TFile=("$1") # specific file
|
||||
elif [[ -n $1 ]]; then
|
||||
PATTERN=$1 # name of a particular file or pattern (ex: societe.class.php)
|
||||
else
|
||||
PATTERN="*.class.php" # *.lib.php
|
||||
fi
|
||||
|
||||
if [[ -n ${PATTERN} ]]; then
|
||||
TCLASSFILE=$(find "${DIR_HTDOCS}" -name "${PATTERN}" | grep -v "/custom/" | grep -v "/includes/" | grep -v -F -f "${DIR_HTDOCS}/../.gitignore")
|
||||
TFile=()
|
||||
I=0
|
||||
for f in ${TCLASSFILE}; do
|
||||
TFile[${I}]="${f}"
|
||||
((I++))
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
REGEX_FNC_W='^([[:blank:]]*)(public|private|protected)?[ \t]*(static)?[ \t]*[^\$\(]function[ \t]*([a-zA-Z0-9\-\_]*)[\(](.*)[\)][ \t]*([\{]?)$'
|
||||
INDENT=" "
|
||||
|
||||
for f in ${TFile[@]}; do
|
||||
# echo ${f}
|
||||
|
||||
IFS=$'\n'
|
||||
TLine=($(cat "${f}" | grep -E "${REGEX_FNC_W}"))
|
||||
|
||||
for LINE in ${TLine[@]}; do
|
||||
|
||||
if [[ ${LINE} =~ ^${REGEX_FNC_W}$ ]]; then
|
||||
FIRST_INDENT=${BASH_REMATCH[1]} # seem not work
|
||||
FNC_TYPE=${BASH_REMATCH[2]}
|
||||
STATIC=${BASH_REMATCH[3]}
|
||||
FNC_NAME=${BASH_REMATCH[4]}
|
||||
PARAMETERS_ORIGIN=${BASH_REMATCH[5]}
|
||||
BRACKET_END=${BASH_REMATCH[6]}
|
||||
|
||||
if [[ ${LINE} =~ ^([[:blank:]]*) ]]; then # but this seems work to get indentation
|
||||
FIRST_INDENT=${BASH_REMATCH[1]}
|
||||
fi
|
||||
|
||||
[[ ${FNC_NAME} =~ ^__ ]] && continue # skip magic function
|
||||
|
||||
CAMEL_CASE=$(echo "${FNC_NAME}" | sed -r 's/(_)([a-zA-Z0-9])/\U\2/g')
|
||||
[[ ${CAMEL_CASE} = ${FNC_NAME} ]] && continue # skip if no difference
|
||||
|
||||
#echo A: ${#FIRST_INDENT}
|
||||
#printf "${FIRST_INDENT}TEST INDENT\n"
|
||||
#echo B: ${FNC_TYPE}
|
||||
#echo C: ${STATIC}
|
||||
#echo D: ${FNC_NAME}
|
||||
#echo D: ${CAMEL_CASE}
|
||||
#echo E: ${PARAMETERS_ORIGIN}
|
||||
#echo F: ${BRACKET_END}
|
||||
#exit
|
||||
|
||||
[[ -n $(cat "${f}" | grep -i "function[[:blank:]]*${CAMEL_CASE}") ]] && continue # skip if already exists
|
||||
|
||||
TCommentLine=()
|
||||
J=1
|
||||
while :; do
|
||||
COMMENT=$(cat ${f} | grep -B ${J} ${LINE/\$/\\$} | head -n1 | grep -P '^[\t\ ]*(/\*\*|\*[^/]?|\*/)')
|
||||
if [[ -n ${COMMENT} ]]; then
|
||||
TCommentLine[${J}]="${COMMENT}"
|
||||
((J++))
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
COMMENT_ORIGIN=""
|
||||
COMMENT_ORIGIN_WITH_DEPRECATED=""
|
||||
COMMENT_DUPLICATE=""
|
||||
if [[ ${#TCommentLine[@]} -gt 0 ]]; then
|
||||
for (( idx=${#TCommentLine[@]} ; idx>0 ; idx-- )) ; do
|
||||
COMMENT_ORIGIN="${COMMENT_ORIGIN}\n${TCommentLine[idx]}"
|
||||
done
|
||||
|
||||
COMMENT_DUPLICATE=${COMMENT_ORIGIN}
|
||||
|
||||
COMMENT_ORIGIN_WITH_DEPRECATED=$(echo "${COMMENT_ORIGIN%?} @deprecated\n${FIRST_INDENT} * @see ${CAMEL_CASE}\n${FIRST_INDENT} */")
|
||||
fi
|
||||
|
||||
PARAMETERS=${PARAMETERS_ORIGIN}
|
||||
TParam=()
|
||||
I=0
|
||||
while [[ ${PARAMETERS} =~ (\$[a-zA-Z0-9\_\-]+) ]]; do
|
||||
TParam[${I}]=${BASH_REMATCH[1]}
|
||||
PARAMETERS=${PARAMETERS#*"${BASH_REMATCH[1]}"}
|
||||
((I++))
|
||||
done
|
||||
|
||||
PARAMS_STR=$(printf ", %s" "${TParam[@]}")
|
||||
PARAMS_STR=${PARAMS_STR:2}
|
||||
|
||||
REPLACE=${LINE}
|
||||
[[ -z ${BRACKET_END} ]] && REPLACE="${LINE}\n${FIRST_INDENT}{\n${FIRST_INDENT}${INDENT}" || REPLACE="${LINE}\n${FIRST_INDENT}${INDENT}"
|
||||
[[ -n ${STATIC} ]] && REPLACE="${REPLACE}return self::" || REPLACE="${REPLACE}return \$this->"
|
||||
REPLACE="${REPLACE}${CAMEL_CASE}(${PARAMS_STR});\n${FIRST_INDENT}}\n\n"
|
||||
REPLACE="${REPLACE}${FIRST_INDENT}${COMMENT_ORIGIN}\n${FIRST_INDENT}"
|
||||
[[ -n ${STATIC} ]] && REPLACE="${REPLACE}${STATIC} "
|
||||
[[ -n ${FNC_TYPE} ]] && REPLACE="${REPLACE}${FNC_TYPE} "
|
||||
REPLACE="${REPLACE}function ${CAMEL_CASE}(${PARAMETERS_ORIGIN})"
|
||||
[[ -n ${BRACKET_END} ]] && REPLACE="${REPLACE}\n${FIRST_INDENT}{"
|
||||
|
||||
echo " ${FNC_NAME} -> ${CAMEL_CASE}"
|
||||
|
||||
if [[ -n ${COMMENT_ORIGIN_WITH_DEPRECATED} ]]; then
|
||||
rpl -e --quiet "${COMMENT_ORIGIN}" ${COMMENT_ORIGIN_WITH_DEPRECATED} "${f}"
|
||||
fi
|
||||
rpl -e --quiet "${LINE}" ${REPLACE} "${f}"
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
@ -27,8 +27,8 @@
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php');
|
||||
require_once('../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php');
|
||||
require_once '../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php';
|
||||
require_once '../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php';
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
@ -101,7 +101,7 @@ $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
$pdf->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
@ -47,8 +47,8 @@ print 'Files has been created. Check its name from your explorer'."\n";
|
||||
* @since 2008-09-15
|
||||
*/
|
||||
|
||||
require_once('../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php');
|
||||
require_once('../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php');
|
||||
require_once '../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php';
|
||||
require_once '../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php';
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
@ -76,7 +76,7 @@ $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
$pdf->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
//$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
@ -64,8 +64,7 @@ class autoTranslator
|
||||
// Translate
|
||||
//ini_set('default_charset','UTF-8');
|
||||
ini_set('default_charset',$this->_outputpagecode);
|
||||
$this->parse_refLangTranslationFiles();
|
||||
|
||||
$this->parseRefLangTranslationFiles();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -73,7 +72,7 @@ class autoTranslator
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function parse_refLangTranslationFiles()
|
||||
private function parseRefLangTranslationFiles()
|
||||
{
|
||||
|
||||
$files = $this->getTranslationFilesArray($this->_refLang);
|
||||
@ -346,5 +345,4 @@ class autoTranslator
|
||||
|
||||
return $rep;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -37,8 +37,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Include Dolibarr environment
|
||||
require_once($path.'../../htdocs/master.inc.php');
|
||||
require_once($path.'../../htdocs/core/lib/files.lib.php');
|
||||
require_once $path.'../../htdocs/master.inc.php';
|
||||
require_once $path.'../../htdocs/core/lib/files.lib.php';
|
||||
// After this $db is an opened handler to database. We close it at end of file.
|
||||
|
||||
// Load main language strings
|
||||
@ -88,7 +88,7 @@ if ($argv[2] != 'all')
|
||||
}
|
||||
}
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/../dev/translation/autotranslator.class.php");
|
||||
require_once DOL_DOCUMENT_ROOT."/../dev/translation/autotranslator.class.php";
|
||||
|
||||
$langParser = new autoTranslator($argv[2],$argv[1],$dir,$file,$argv[3]);
|
||||
|
||||
|
||||
@ -295,6 +295,10 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
||||
if (preg_match('/^DescADHERENT_/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^SubmitTranslation/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^ModuleCompanyCode/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/InDolibarr$/', $value)) $qualifiedforclean=0;
|
||||
// admin.lang
|
||||
if (preg_match('/^DAV_ALLOW_PUBLIC_DIR/i', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^DAV_ALLOW_ECM_DIR/i', $value)) $qualifiedforclean=0;
|
||||
// boxes.lang
|
||||
if (preg_match('/^BoxTitleLast/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^BoxTitleLatest/', $value)) $qualifiedforclean=0;
|
||||
|
||||
@ -15,7 +15,7 @@ then
|
||||
echo "This push local files to transifex for project $project."
|
||||
echo "Note: If you push a language file (not source), file will be skipped if transifex file is newer."
|
||||
echo " Using -f will overwrite translation but not memory."
|
||||
echo "Usage: ./dev/translation/txpush.sh (source|xx_XX|all) [-r ".$project.".file] [-f] [--no-interactive]"
|
||||
echo "Usage: ./dev/translation/txpush.sh (source|xx_XX|all) [-r $project.file] [-f] [--no-interactive]"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 268 KiB |
@ -11,15 +11,15 @@ informations on Dolibarr.<br>
|
||||
But if you are looking for other resources (downloads, documentation, addons, ...), you can find this
|
||||
on Internet on web following sites:<br>
|
||||
<br>
|
||||
* <a href="http://wiki.dolibarr.org">Dolibarr wiki (documentation)</a><br>
|
||||
* <a href="https://wiki.dolibarr.org">Dolibarr wiki (documentation)</a><br>
|
||||
<br>
|
||||
* <a href="http://www.dolibarr.org">Dolibarr portal (official website)</a><br>
|
||||
* <a href="https://www.dolibarr.org">Dolibarr portal (official website)</a><br>
|
||||
<br>
|
||||
* <a href="http://demo.dolibarr.org">Dolibarr demo (online)</a><br>
|
||||
* <a href="https://demo.dolibarr.org">Dolibarr demo (online)</a><br>
|
||||
<br>
|
||||
* <a href="http://www.nltechno.com/pages/dolibarrwinbin.php">DoliWamp, the Dolibarr for Windows</a><br>
|
||||
* <a href="https://www.nltechno.com/pages/dolibarrwinbin.php">DoliWamp, the Dolibarr for Windows</a><br>
|
||||
<br>
|
||||
* <a href="http://www.dolistore.com">DoliStore (official addons/plugins market place)</a><br>
|
||||
* <a href="https://www.dolistore.com">DoliStore (official addons/plugins market place)</a><br>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -7,12 +7,12 @@ Download
|
||||
--------------------------------
|
||||
|
||||
* Dolibarr ERP/CRM can be downloaded at sourceforge:
|
||||
http://sourceforge.net/projects/dolibarr/files
|
||||
or from Dolibarr official web site:
|
||||
http://www.dolibarr.org
|
||||
https://sourceforge.net/projects/dolibarr/files
|
||||
or from Dolibarr official web site:
|
||||
https://www.dolibarr.org
|
||||
|
||||
* Most external modules are only available on DoliStore:
|
||||
http://www.dolistore.org
|
||||
https://www.dolistore.com
|
||||
|
||||
|
||||
--------------------------------
|
||||
@ -22,4 +22,4 @@ Install
|
||||
* For a Quick guide, take a look at README file into root directory.
|
||||
|
||||
* More complete documentations are also available on line on the Dolibarr Wiki:
|
||||
http://wiki.dolibarr.org
|
||||
https://wiki.dolibarr.org
|
||||
|
||||
33
doc/install/README-DE
Normal file
33
doc/install/README-DE
Normal file
@ -0,0 +1,33 @@
|
||||
README (deutsch / german / allemand)
|
||||
--------------------------------
|
||||
|
||||
|
||||
--------------------------------
|
||||
Download / Herunterladen
|
||||
--------------------------------
|
||||
|
||||
* Dolibarr ERP/CRM kann man über die offizielle Dolibarr Website
|
||||
https://www.dolibarr.org/downloads
|
||||
oder direkt von Sourceforge
|
||||
https://sourceforge.net/projects/dolibarr/files/
|
||||
herunterladen.
|
||||
|
||||
|
||||
|
||||
* Die meisten externen Module/Themens sind über den DoliStore verfügbar:
|
||||
https://www.dolistore.com/de/
|
||||
|
||||
|
||||
--------------------------------
|
||||
Installation
|
||||
--------------------------------
|
||||
|
||||
* Für eine kurze Einleitung, schau auf die README Datei im Hauptverzeichnis.
|
||||
|
||||
* Umfangreiche Dokumentationen sind im Dolibarr Wiki zu finden:
|
||||
https://wiki.dolibarr.org/index.php/Hauptseite
|
||||
|
||||
* eine Deutsche Community bietet der Dolibarr e.V. unter
|
||||
https://www.dolibarr.de/
|
||||
|
||||
|
||||
@ -9,19 +9,19 @@ Téléchargement
|
||||
* Dolibarr ERP/CRM can be downloaded at sourceforge:
|
||||
http://sourceforge.net/projects/dolibarr/files
|
||||
or from Dolibarr official web site:
|
||||
http://www.dolibarr.org
|
||||
https://www.dolibarr.org
|
||||
|
||||
* Most external modules are only available on DoliStore:
|
||||
http://www.dolistore.org
|
||||
https://www.dolistore.org
|
||||
|
||||
|
||||
--------------------------------
|
||||
Documentation utilisateur
|
||||
--------------------------------
|
||||
|
||||
* Pour une prise en main et installation rapide, consulter le fichier
|
||||
* Pour une prise en main et installation rapide, consultez le fichier
|
||||
README-FR à la racine.
|
||||
|
||||
* Une documentation utilisateur francophone plus consistente est disponible en
|
||||
* Une documentation utilisateur francophone plus consistante est disponible en
|
||||
ligne sur le wiki de Dolibarr à l'adresse:
|
||||
http://wiki.dolibarr.org
|
||||
https://wiki.dolibarr.org
|
||||
|
||||
@ -4,4 +4,4 @@ User guide
|
||||
--------------------------------
|
||||
|
||||
* All Dolibarr guides are available, on line, on the Dolibarr Web site:
|
||||
http://www.dolibarr.org
|
||||
https://www.dolibarr.org
|
||||
|
||||
@ -3,9 +3,9 @@ README (french)
|
||||
Documentation utilisateur
|
||||
--------------------------------
|
||||
|
||||
* Pour une prise en main et installation rapide, consulter le fichier
|
||||
* Pour une prise en main et installation rapide, consultez le fichier
|
||||
README-FR à la racine.
|
||||
|
||||
* Une documentation utilisateur francophone plus consistente est disponible en
|
||||
* Une documentation utilisateur francophone plus consistante est disponible en
|
||||
ligne sur le site Web de Dolibarr à l'adresse:
|
||||
http://www.dolibarr.fr
|
||||
https://www.dolibarr.fr
|
||||
|
||||
6
htdocs/.gitignore
vendored
6
htdocs/.gitignore
vendored
@ -23,4 +23,8 @@
|
||||
/cabinetmed*
|
||||
/webmail*
|
||||
/conf/conf.php
|
||||
/subtotal/
|
||||
/subtotal*
|
||||
/abricot*
|
||||
/nomenclature*
|
||||
/of/
|
||||
/workstation/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -28,24 +28,21 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("admin");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("salaries");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("compta","bills","admin","accountancy","salaries"));
|
||||
|
||||
$mesg = '';
|
||||
$action = GETPOST('action','aZ09');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
$id = GETPOST('id', 'int');
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'accountingaccountlist'; // To manage different context of search
|
||||
|
||||
$search_account = GETPOST("search_account");
|
||||
$search_label = GETPOST("search_label");
|
||||
$search_accountparent = GETPOST("search_accountparent");
|
||||
$search_pcgtype = GETPOST("search_pcgtype");
|
||||
$search_pcgsubtype = GETPOST("search_pcgsubtype");
|
||||
$search_account = GETPOST('search_account','alpha');
|
||||
$search_label = GETPOST('search_label','alpha');
|
||||
$search_accountparent = GETPOST('search_accountparent','alpha');
|
||||
$search_pcgtype = GETPOST('search_pcgtype','alpha');
|
||||
$search_pcgsubtype = GETPOST('search_pcgsubtype','alpha');
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
@ -66,16 +63,14 @@ if (! $sortorder) $sortorder = "ASC";
|
||||
$arrayfields=array(
|
||||
'aa.account_number'=>array('label'=>$langs->trans("AccountNumber"), 'checked'=>1),
|
||||
'aa.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
|
||||
'aa.account_parent'=>array('label'=>$langs->trans("Accountparent"), 'checked'=>0),
|
||||
'aa.account_parent'=>array('label'=>$langs->trans("Accountparent"), 'checked'=>1),
|
||||
'aa.pcg_type'=>array('label'=>$langs->trans("Pcgtype"), 'checked'=>1, 'help'=>'PcgtypeDesc'),
|
||||
'aa.pcg_subtype'=>array('label'=>$langs->trans("Pcgsubtype"), 'checked'=>1, 'help'=>'PcgtypeDesc'),
|
||||
'aa.pcg_subtype'=>array('label'=>$langs->trans("Pcgsubtype"), 'checked'=>0, 'help'=>'PcgtypeDesc'),
|
||||
'aa.active'=>array('label'=>$langs->trans("Activated"), 'checked'=>1)
|
||||
);
|
||||
|
||||
$accounting = new AccountingAccount($db);
|
||||
|
||||
// Initialize technical object to manage context to save list fields
|
||||
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'accountingaccountlist';
|
||||
|
||||
|
||||
/*
|
||||
@ -126,14 +121,35 @@ if (empty($reshook))
|
||||
if ($country_code)
|
||||
{
|
||||
$sqlfile = DOL_DOCUMENT_ROOT.'/install/mysql/data/llx_accounting_account_'.strtolower($country_code).'.sql';
|
||||
$result = run_sql($sqlfile, 1, 0, 1);
|
||||
|
||||
$offsetforchartofaccount = 0;
|
||||
// Get the comment line '-- ADD CCCNNNNN to rowid...' to find CCCNNNNN (CCC is country num, NNNNN is id of accounting account)
|
||||
// and pass CCCNNNNN + (num of company * 100 000 000) as offset to the run_sql as a new parameter to say to update sql on the fly to add offset to rowid and account_parent value.
|
||||
// This is to be sure there is no conflict for each chart of account, whatever is country, whatever is company when multicompany is used.
|
||||
$tmp = file_get_contents($sqlfile);
|
||||
if (preg_match('/-- ADD (\d+) to rowid/ims', $tmp, $reg))
|
||||
{
|
||||
$offsetforchartofaccount += $reg[1];
|
||||
}
|
||||
$offsetforchartofaccount+=($conf->entity * 100000000);
|
||||
|
||||
$result = run_sql($sqlfile, 1, $conf->entity, 1, '', 'default', 32768, 0, $offsetforchartofaccount);
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
setEventMessages($langs->trans("ChartLoaded"), null);
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($langs->trans("ErrorDuringChartLoad"), null, 'warnings');
|
||||
}
|
||||
}
|
||||
|
||||
if (! dolibarr_set_const($db, 'CHARTOFACCOUNTS', $chartofaccounts, 'chaine', 0, '', $conf->entity)) {
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
$error ++;
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,11 +193,10 @@ $sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.pcg_subtype, aa.acco
|
||||
$sql .= " a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version AND aa.entity = " . $conf->entity;
|
||||
// Dirty hack wainting that foreign key account_parent is an integer to be compared correctly with rowid
|
||||
if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = CAST(aa.account_parent AS INTEGER) AND a2.entity = " . $conf->entity;
|
||||
else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = CAST(aa.account_parent AS UNSIGNED) AND a2.entity = " . $conf->entity;
|
||||
if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = " . $conf->entity;
|
||||
else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = " . $conf->entity;
|
||||
$sql .= " WHERE asy.rowid = " . $pcgver;
|
||||
|
||||
//print $sql;
|
||||
if (strlen(trim($search_account))) $sql .= natural_search("aa.account_number", $search_account);
|
||||
if (strlen(trim($search_label))) $sql .= natural_search("aa.label", $search_label);
|
||||
if (strlen(trim($search_accountparent))) $sql .= natural_search("aa.account_parent", $search_accountparent);
|
||||
@ -195,6 +210,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
$resql = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($resql);
|
||||
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||
{
|
||||
$page = 0;
|
||||
$offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$sql .= $db->plimit($limit + 1, $offset);
|
||||
@ -227,9 +247,11 @@ if ($resql)
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$htmlbuttonadd = '<a class="butAction" href="./card.php?action=create">' . $langs->trans("Addanaccount") . '</a>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle">' . $langs->trans("Addanaccount").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
|
||||
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $htmlbuttonadd, '', $limit);
|
||||
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit);
|
||||
|
||||
// Box to select active chart of account
|
||||
print $langs->trans("Selectchartofaccounts") . " : ";
|
||||
@ -257,7 +279,7 @@ if ($resql)
|
||||
else dol_print_error($db);
|
||||
print "</select>";
|
||||
print ajax_combobox("chartofaccounts");
|
||||
print '<input type="submit" class="button" name="change_chart" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
|
||||
print '<input type="submit" class="button" name="change_chart" tabindex="-1" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
|
||||
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
@ -276,7 +298,7 @@ if ($resql)
|
||||
if (! empty($arrayfields['aa.pcg_type']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgtype" value="' . $search_pcgtype . '"></td>';
|
||||
if (! empty($arrayfields['aa.pcg_subtype']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgsubtype" value="' . $search_pcgsubtype . '"></td>';
|
||||
if (! empty($arrayfields['aa.active']['checked'])) print '<td class="liste_titre"> </td>';
|
||||
print '<td align="right" colspan="2" class="liste_titre">';
|
||||
print '<td align="right" class="liste_titre">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -310,7 +332,7 @@ if ($resql)
|
||||
if (! empty($arrayfields['aa.account_number']['checked']))
|
||||
{
|
||||
print "<td>";
|
||||
print $accountstatic->getNomUrl(1);
|
||||
print $accountstatic->getNomUrl(1, 0, 0, '', 0, 1);
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
@ -405,5 +427,6 @@ if ($resql)
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
|
||||
@ -41,9 +41,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("errors","admin","companies","resource","holiday","compta","accountancy","hrm"));
|
||||
|
||||
$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
|
||||
$action=GETPOST('action','aZ09')?GETPOST('action','aZ09'):'view';
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$id=31;
|
||||
$rowid=GETPOST('rowid','alpha');
|
||||
@ -54,8 +55,8 @@ $acts[1] = "disable";
|
||||
$actl[0] = img_picto($langs->trans("Disabled"),'switch_off');
|
||||
$actl[1] = img_picto($langs->trans("Activated"),'switch_on');
|
||||
|
||||
$listoffset=GETPOST('listoffset');
|
||||
$listlimit=GETPOST('listlimit')>0?GETPOST('listlimit'):1000;
|
||||
$listoffset=GETPOST('listoffset','alpha');
|
||||
$listlimit=GETPOST('listlimit','int')>0?GETPOST('listlimit','int'):1000;
|
||||
$active = 1;
|
||||
|
||||
$sortfield = GETPOST("sortfield",'aZ09comma');
|
||||
@ -138,13 +139,13 @@ $sourceList=array();
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('button_removefilter') || GETPOST('button_removefilter.x') || GETPOST('button_removefilter_x'))
|
||||
if (GETPOST('button_removefilter','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter_x','alpha'))
|
||||
{
|
||||
$search_country_id = '';
|
||||
}
|
||||
|
||||
// Actions add or modify an entry into a dictionary
|
||||
if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha'))
|
||||
{
|
||||
$listfield=explode(',', str_replace(' ', '',$tabfield[$id]));
|
||||
$listfieldinsert=explode(',',$tabfieldinsert[$id]);
|
||||
@ -234,7 +235,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null
|
||||
|
||||
// Si verif ok et action add, on ajoute la ligne
|
||||
if ($ok && GETPOST('actionadd'))
|
||||
if ($ok && GETPOST('actionadd','alpha'))
|
||||
{
|
||||
if ($tabrowid[$id])
|
||||
{
|
||||
@ -246,7 +247,6 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$newid=($obj->newid + 1);
|
||||
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
@ -299,7 +299,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
}
|
||||
|
||||
// Si verif ok et action modify, on modifie la ligne
|
||||
if ($ok && GETPOST('actionmodify'))
|
||||
if ($ok && GETPOST('actionmodify','alpha'))
|
||||
{
|
||||
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
|
||||
else { $rowidcol="rowid"; }
|
||||
@ -340,7 +340,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||
}
|
||||
|
||||
if (GETPOST('actioncancel'))
|
||||
if (GETPOST('actioncancel','alpha'))
|
||||
{
|
||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||
}
|
||||
@ -523,62 +523,18 @@ if ($id)
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
$align="left";
|
||||
if ($fieldlist[$field]=='source') { $valuetoshow=$langs->trans("Contact"); }
|
||||
if ($fieldlist[$field]=='price') { $valuetoshow=$langs->trans("PriceUHT"); }
|
||||
if ($fieldlist[$field]=='taux') {
|
||||
if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow=$langs->trans("Rate");
|
||||
else $valuetoshow=$langs->trans("Amount");
|
||||
$align='right';
|
||||
}
|
||||
if ($fieldlist[$field]=='localtax1_type') { $valuetoshow=$langs->trans("UseLocalTax")." 2"; $align="center"; $sortable=0; }
|
||||
if ($fieldlist[$field]=='localtax1') { $valuetoshow=$langs->trans("Rate")." 2";}
|
||||
if ($fieldlist[$field]=='localtax2_type') { $valuetoshow=$langs->trans("UseLocalTax")." 3"; $align="center"; $sortable=0; }
|
||||
if ($fieldlist[$field]=='localtax2') { $valuetoshow=$langs->trans("Rate")." 3";}
|
||||
if ($fieldlist[$field]=='organization') { $valuetoshow=$langs->trans("Organization"); }
|
||||
if ($fieldlist[$field]=='lang') { $valuetoshow=$langs->trans("Language"); }
|
||||
if ($fieldlist[$field]=='type') {
|
||||
if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow=$form->textwithtooltip($langs->trans("Type"),$langs->trans("TypePaymentDesc"),2,1,img_help(1,''));
|
||||
else $valuetoshow=$langs->trans("Type");
|
||||
}
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
|
||||
{
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
if ($id != 25) $valuetoshow.="*";
|
||||
}
|
||||
if ($fieldlist[$field]=='libelle_facture') { $valuetoshow=$langs->trans("LabelOnDocuments")."*"; }
|
||||
if ($fieldlist[$field]=='country') {
|
||||
if (in_array('region_id',$fieldlist)) { print '<td> </td>'; continue; } // For region page, we do not show the country input
|
||||
$valuetoshow=$langs->trans("Country");
|
||||
}
|
||||
if ($fieldlist[$field]=='recuperableonly') { $valuetoshow=$langs->trans("NPR"); $align="center"; }
|
||||
if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); }
|
||||
if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; }
|
||||
if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); }
|
||||
if ($fieldlist[$field]=='width') { $valuetoshow=$langs->trans("Width"); }
|
||||
if ($fieldlist[$field]=='height') { $valuetoshow=$langs->trans("Height"); }
|
||||
if ($fieldlist[$field]=='unit') { $valuetoshow=$langs->trans("MeasuringUnit"); }
|
||||
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $valuetoshow=''; }
|
||||
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
|
||||
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); }
|
||||
if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); }
|
||||
if ($fieldlist[$field]=='country_id') { $valuetoshow=''; }
|
||||
if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
||||
if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountparent"); }
|
||||
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
|
||||
if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); }
|
||||
if ($fieldlist[$field]=='sortorder') { $valuetoshow=$langs->trans("SortOrder"); }
|
||||
if ($fieldlist[$field]=='short_label') { $valuetoshow=$langs->trans("ShortLabel"); }
|
||||
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
|
||||
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); }
|
||||
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Sens"); }
|
||||
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
|
||||
if ($fieldlist[$field]=='formula') { $valuetoshow=$langs->trans("Formula"); }
|
||||
|
||||
if ($id == 2) // Special cas for state page
|
||||
{
|
||||
if ($fieldlist[$field]=='region_id') { $valuetoshow=' '; $showfield=1; }
|
||||
if ($fieldlist[$field]=='region') { $valuetoshow=$langs->trans("Country").'/'.$langs->trans("Region"); $showfield=1; }
|
||||
}
|
||||
|
||||
if ($valuetoshow != '')
|
||||
{
|
||||
@ -603,7 +559,7 @@ if ($id)
|
||||
|
||||
$obj = new stdClass();
|
||||
// If data was already input, we define them in obj to populate input fields.
|
||||
if (GETPOST('actionadd'))
|
||||
if (GETPOST('actionadd','alpha'))
|
||||
{
|
||||
foreach ($fieldlist as $key=>$val)
|
||||
{
|
||||
@ -617,25 +573,13 @@ if ($id)
|
||||
$reshook=$hookmanager->executeHooks('createDictionaryFieldlist',$parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
||||
|
||||
if ($id == 3) unset($fieldlist[2]);
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
if ($tabname[$id] == MAIN_DB_PREFIX.'c_email_templates' && $action == 'edit')
|
||||
{
|
||||
fieldListAccountModel($fieldlist,$obj,$tabname[$id],'hide');
|
||||
}
|
||||
else
|
||||
{
|
||||
fieldListAccountModel($fieldlist,$obj,$tabname[$id],'add');
|
||||
}
|
||||
fieldListAccountModel($fieldlist,$obj,$tabname[$id],'add');
|
||||
}
|
||||
|
||||
print '<td colspan="3" align="right">';
|
||||
if ($tabname[$id] != MAIN_DB_PREFIX.'c_email_templates' || $action != 'edit')
|
||||
{
|
||||
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
}
|
||||
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
|
||||
@ -657,7 +601,6 @@ if ($id)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$var=true;
|
||||
|
||||
$param = '&id='.$id;
|
||||
if ($search_country_id > 0) $param.= '&search_country_id='.$search_country_id;
|
||||
@ -721,50 +664,15 @@ if ($id)
|
||||
*/
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // By defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
if ($fieldlist[$field]=='source') { $valuetoshow=$langs->trans("Contact"); }
|
||||
if ($fieldlist[$field]=='price') { $valuetoshow=$langs->trans("PriceUHT"); }
|
||||
if ($fieldlist[$field]=='taux') {
|
||||
if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow=$langs->trans("Rate");
|
||||
else $valuetoshow=$langs->trans("Amount");
|
||||
$align='right';
|
||||
}
|
||||
if ($fieldlist[$field]=='localtax1_type') { $valuetoshow=$langs->trans("UseLocalTax")." 2"; $align="center"; $sortable=0; }
|
||||
if ($fieldlist[$field]=='localtax1') { $valuetoshow=$langs->trans("Rate")." 2"; $sortable=0; }
|
||||
if ($fieldlist[$field]=='localtax2_type') { $valuetoshow=$langs->trans("UseLocalTax")." 3"; $align="center"; $sortable=0; }
|
||||
if ($fieldlist[$field]=='localtax2') { $valuetoshow=$langs->trans("Rate")." 3"; $sortable=0; }
|
||||
if ($fieldlist[$field]=='organization') { $valuetoshow=$langs->trans("Organization"); }
|
||||
if ($fieldlist[$field]=='lang') { $valuetoshow=$langs->trans("Language"); }
|
||||
if ($fieldlist[$field]=='type') { $valuetoshow=$langs->trans("Type"); }
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
|
||||
{
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
if ($id != 25) $valuetoshow.="*";
|
||||
}
|
||||
if ($fieldlist[$field]=='libelle_facture') { $valuetoshow=$langs->trans("LabelOnDocuments")."*"; }
|
||||
if ($fieldlist[$field]=='country') { $valuetoshow=$langs->trans("Country"); }
|
||||
if ($fieldlist[$field]=='recuperableonly') { $valuetoshow=$langs->trans("NPR"); $align="center"; }
|
||||
if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); }
|
||||
if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; }
|
||||
if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); }
|
||||
if ($fieldlist[$field]=='width') { $valuetoshow=$langs->trans("Width"); }
|
||||
if ($fieldlist[$field]=='height') { $valuetoshow=$langs->trans("Height"); }
|
||||
if ($fieldlist[$field]=='unit') { $valuetoshow=$langs->trans("MeasuringUnit"); }
|
||||
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
|
||||
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
|
||||
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); $sortable=0; }
|
||||
if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); $sortable=0; }
|
||||
if ($fieldlist[$field]=='country_id') { $showfield=0; }
|
||||
if ($fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
||||
if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountsparent"); }
|
||||
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
|
||||
if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); }
|
||||
if ($fieldlist[$field]=='sortorder') { $valuetoshow=$langs->trans("SortOrder"); }
|
||||
if ($fieldlist[$field]=='short_label') { $valuetoshow=$langs->trans("ShortLabel"); }
|
||||
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
|
||||
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); }
|
||||
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Sens"); }
|
||||
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
|
||||
if ($fieldlist[$field]=='formula') { $valuetoshow=$langs->trans("Formula"); }
|
||||
|
||||
// Affiche nom du champ
|
||||
if ($showfield)
|
||||
@ -844,120 +752,9 @@ if ($id)
|
||||
$valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country);
|
||||
}
|
||||
}
|
||||
else if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field]=='type_cdr' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') {
|
||||
if(empty($valuetoshow)) $valuetoshow = $langs->trans('None');
|
||||
elseif($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth');
|
||||
elseif($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext');
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) {
|
||||
$valuetoshow=price($valuetoshow);
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle_facture') {
|
||||
$langs->load("bills");
|
||||
$key=$langs->trans("PaymentCondition".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "PaymentCondition".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
$valuetoshow=nl2br($valuetoshow);
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') {
|
||||
$key=$langs->trans("Country".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') {
|
||||
$langs->load("propal");
|
||||
$key=$langs->trans("AvailabilityType".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') {
|
||||
$key=$langs->trans("Action".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if (! empty($obj->code_iso) && $fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_currencies') {
|
||||
$key=$langs->trans("Currency".strtoupper($obj->code_iso));
|
||||
$valuetoshow=($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_typent') {
|
||||
$key=$langs->trans(strtoupper($obj->code));
|
||||
$valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_prospectlevel') {
|
||||
$key=$langs->trans(strtoupper($obj->code));
|
||||
$valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_civility') {
|
||||
$key=$langs->trans("Civility".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') {
|
||||
$langs->load('agenda');
|
||||
$key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') {
|
||||
$langs->load("bills");
|
||||
$key=$langs->trans("PaymentConditionShort".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') {
|
||||
$langs->load("bills");
|
||||
$key=$langs->trans("PaymentType".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') {
|
||||
$key=$langs->trans("DemandReasonType".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') {
|
||||
$langs->load("orders");
|
||||
$key=$langs->trans($obj->code);
|
||||
$valuetoshow=($obj->code && $key != $obj->code)?$key:$obj->{$fieldlist[$field]};
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') {
|
||||
$langs->load("sendings");
|
||||
$key=$langs->trans("SendingMethod".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field] == 'libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paper_format')
|
||||
{
|
||||
$key = $langs->trans('PaperFormat'.strtoupper($obj->code));
|
||||
$valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees')
|
||||
{
|
||||
$langs->load('trips');
|
||||
$key = $langs->trans(strtoupper($obj->code));
|
||||
$valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') {
|
||||
else if ($fieldlist[$field]=='country_id') {
|
||||
$showfield=0;
|
||||
}
|
||||
else if ($fieldlist[$field]=='unicode') {
|
||||
$valuetoshow = $langs->getCurrencySymbol($obj->code,1);
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
|
||||
$langs->load("products");
|
||||
$valuetoshow=$langs->trans($obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
|
||||
$langs->load("products");
|
||||
$valuetoshow = $langs->trans($obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format'))
|
||||
{
|
||||
$key = $langs->trans('SizeUnit'.strtolower($obj->unit));
|
||||
$valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='taux') {
|
||||
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||
$align="right";
|
||||
}
|
||||
else if (in_array($fieldlist[$field],array('recuperableonly')))
|
||||
{
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') {
|
||||
$valuetoshow = length_accountg($valuetoshow);
|
||||
}
|
||||
|
||||
$class='tddict';
|
||||
if ($fieldlist[$field] == 'tracking') $class.=' tdoverflowauto';
|
||||
@ -968,17 +765,6 @@ if ($id)
|
||||
|
||||
// Can an entry be erased or disabled ?
|
||||
$iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
|
||||
if (isset($obj->code) && $id != 10)
|
||||
{
|
||||
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
|
||||
else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
|
||||
else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
|
||||
}
|
||||
|
||||
if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable=0; }
|
||||
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO')) || in_array($obj->type, array('systemauto'))) { $canbedisabled=0; $canbedisabled = 0; }
|
||||
$canbemodified=$iserasable;
|
||||
if ($obj->code == 'RECEP') $canbemodified=1;
|
||||
|
||||
$url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):'');
|
||||
if ($param) $url .= '&'.$param;
|
||||
@ -987,13 +773,7 @@ if ($id)
|
||||
// Active
|
||||
print '<td align="center" class="nowrap">';
|
||||
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
|
||||
else
|
||||
{
|
||||
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive");
|
||||
else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
|
||||
else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption");
|
||||
else print $langs->trans("AlwaysActive");
|
||||
}
|
||||
else print $langs->trans("AlwaysActive");
|
||||
print "</td>";
|
||||
|
||||
// Modify link
|
||||
@ -1022,7 +802,7 @@ if ($id)
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -1042,7 +822,6 @@ function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='')
|
||||
global $form;
|
||||
global $region_id;
|
||||
global $elementList,$sourceList;
|
||||
global $bc;
|
||||
|
||||
$formadmin = new FormAdmin($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
@ -1074,53 +853,7 @@ function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='')
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'region')
|
||||
{
|
||||
print '<td>';
|
||||
$formcompany->select_region($region_id,'region');
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'region_id')
|
||||
{
|
||||
$region_id = (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:0);
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="'.$fieldlist[$field].'" value="'.$region_id.'">';
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'lang')
|
||||
{
|
||||
print '<td>';
|
||||
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT,'lang');
|
||||
print '</td>';
|
||||
}
|
||||
// Le type de template
|
||||
elseif ($fieldlist[$field] == 'type_template')
|
||||
{
|
||||
print '<td>';
|
||||
print $form->selectarray('type_template', $elementList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
|
||||
print '</td>';
|
||||
}
|
||||
// Le type de l'element (pour les type de contact)
|
||||
elseif ($fieldlist[$field] == 'element')
|
||||
{
|
||||
print '<td>';
|
||||
print $form->selectarray('element', $elementList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
|
||||
print '</td>';
|
||||
}
|
||||
// La source de l'element (pour les type de contact)
|
||||
elseif ($fieldlist[$field] == 'source')
|
||||
{
|
||||
print '<td>';
|
||||
print $form->selectarray('source', $sourceList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX."c_actioncomm")
|
||||
{
|
||||
print '<td>';
|
||||
print 'user<input type="hidden" name="type" value="user">';
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'type_cdr' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') {
|
||||
elseif ($fieldlist[$field] == 'type_cdr') {
|
||||
if ($fieldlist[$field] == 'type_cdr') print '<td align="center">';
|
||||
else print '<td>';
|
||||
if ($fieldlist[$field] == 'type_cdr') {
|
||||
@ -1130,54 +863,9 @@ function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='')
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
elseif (in_array($fieldlist[$field],array('nbjour','decalage','taux','localtax1','localtax2'))) {
|
||||
$align="left";
|
||||
if (in_array($fieldlist[$field],array('taux','localtax1','localtax2'))) $align="right"; // Fields aligned on right
|
||||
print '<td align="'.$align.'">';
|
||||
print '<input type="text" class="flat" value="'.(isset($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" size="3" name="'.$fieldlist[$field].'">';
|
||||
print '</td>';
|
||||
}
|
||||
elseif (in_array($fieldlist[$field], array('libelle_facture'))) {
|
||||
print '<td><textarea cols="30" rows="'.ROWS_2.'" class="flat" name="'.$fieldlist[$field].'">'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'</textarea></td>';
|
||||
}
|
||||
elseif (in_array($fieldlist[$field], array('content')))
|
||||
{
|
||||
if ($tabname == MAIN_DB_PREFIX.'c_email_templates')
|
||||
{
|
||||
print '<td colspan="4"></td></tr><tr class="pair nohover"><td colspan="5">'; // To create an artificial CR for the current tr we are on
|
||||
}
|
||||
else print '<td>';
|
||||
if ($context != 'hide')
|
||||
{
|
||||
//print '<textarea cols="3" rows="'.ROWS_2.'" class="flat" name="'.$fieldlist[$field].'">'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'</textarea>';
|
||||
$okforextended=true;
|
||||
if ($tabname == MAIN_DB_PREFIX.'c_email_templates' && empty($conf->global->FCKEDITOR_ENABLE_MAIL)) $okforextended=false;
|
||||
$doleditor = new DolEditor($fieldlist[$field], (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_5, '90%');
|
||||
print $doleditor->Create(1);
|
||||
}
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i',$fieldlist[$field])) {
|
||||
print '<td><input type="text" class="flat" value="'.price((! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')).'" size="8" name="'.$fieldlist[$field].'"></td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) {
|
||||
print '<td><input type="text" class="flat" value="'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" size="10" name="'.$fieldlist[$field].'"></td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy')
|
||||
{
|
||||
print '<td>';
|
||||
if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
$accountancy_account = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0);
|
||||
print $formaccounting->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="text" size="10" class="flat" value="'.(isset($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:'').'" name="'.$fieldlist[$field].'">';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td>';
|
||||
@ -1185,7 +873,6 @@ function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='')
|
||||
if ($fieldlist[$field]=='code') $size='size="8" ';
|
||||
if ($fieldlist[$field]=='position') $size='size="4" ';
|
||||
if ($fieldlist[$field]=='libelle') $size='centpercent';
|
||||
if ($fieldlist[$field]=='tracking') $class='centpercent';
|
||||
if ($fieldlist[$field]=='sortorder' || $fieldlist[$field]=='sens' || $fieldlist[$field]=='category_type') $size='size="2" ';
|
||||
print '<input type="text" '.$size.' class="flat'.($class?' '.$class:'').'" value="'.(isset($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" name="'.$fieldlist[$field].'">';
|
||||
print '</td>';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/card.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Card of accounting account
|
||||
* \file htdocs/accountancy/admin/card.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Card of accounting account
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
@ -31,9 +31,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
$error = 0;
|
||||
|
||||
// Langs
|
||||
$langs->load("bills");
|
||||
$langs->load("accountancy");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("bills","accountancy"));
|
||||
|
||||
$mesg = '';
|
||||
$action = GETPOST('action','aZ09');
|
||||
@ -42,6 +41,7 @@ $id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
$accountingaccount = GETPOST('accountingaccount','alpha');
|
||||
|
||||
// Security check
|
||||
|
||||
@ -74,25 +74,28 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||
// To manage zero or not at the end of the accounting account
|
||||
if($conf->global->ACCOUNTING_MANAGE_ZERO == 1)
|
||||
{
|
||||
$account_number = GETPOST('account_number');
|
||||
$account_number = GETPOST('account_number','string');
|
||||
}
|
||||
else
|
||||
{
|
||||
$account_number = clean_account(GETPOST('account_number'));
|
||||
$account_number = clean_account(GETPOST('account_number','string'));
|
||||
}
|
||||
|
||||
if (GETPOST('account_parent') <= 0) {
|
||||
if (GETPOST('account_parent','int') <= 0)
|
||||
{
|
||||
$account_parent = 0;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$account_parent = GETPOST('account_parent','int');
|
||||
}
|
||||
|
||||
$object->fk_pcg_version = $obj->pcg_version;
|
||||
$object->pcg_type = GETPOST('pcg_type');
|
||||
$object->pcg_subtype = GETPOST('pcg_subtype');
|
||||
$object->pcg_type = GETPOST('pcg_type','alpha');
|
||||
$object->pcg_subtype = GETPOST('pcg_subtype','alpha');
|
||||
$object->account_number = $account_number;
|
||||
$object->account_parent = $account_parent;
|
||||
$object->account_category = GETPOST('account_category');
|
||||
$object->account_category = GETPOST('account_category','alpha');
|
||||
$object->label = GETPOST('label', 'alpha');
|
||||
$object->active = 1;
|
||||
|
||||
@ -136,25 +139,28 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||
// To manage zero or not at the end of the accounting account
|
||||
if($conf->global->ACCOUNTING_MANAGE_ZERO == 1)
|
||||
{
|
||||
$account_number = GETPOST('account_number');
|
||||
$account_number = GETPOST('account_number','string');
|
||||
}
|
||||
else
|
||||
{
|
||||
$account_number = clean_account(GETPOST('account_number'));
|
||||
$account_number = clean_account(GETPOST('account_number','string'));
|
||||
}
|
||||
|
||||
if (GETPOST('account_parent') <= 0) {
|
||||
if (GETPOST('account_parent','int') <= 0)
|
||||
{
|
||||
$account_parent = 0;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$account_parent = GETPOST('account_parent','int');
|
||||
}
|
||||
|
||||
$object->fk_pcg_version = $obj->pcg_version;
|
||||
$object->pcg_type = GETPOST('pcg_type');
|
||||
$object->pcg_subtype = GETPOST('pcg_subtype');
|
||||
$object->pcg_type = GETPOST('pcg_type','alpha');
|
||||
$object->pcg_subtype = GETPOST('pcg_subtype','alpha');
|
||||
$object->account_number = $account_number;
|
||||
$object->account_parent = $account_parent;
|
||||
$object->account_category = GETPOST('account_category');
|
||||
$object->account_category = GETPOST('account_category','alpha');
|
||||
$object->label = GETPOST('label', 'alpha');
|
||||
|
||||
$result = $object->update($user);
|
||||
@ -188,12 +194,10 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
$title = $langs->trans('AccountAccounting') ." - ". $langs->trans('Card');
|
||||
$helpurl = '';
|
||||
llxheader('', $title, $helpurl);
|
||||
|
||||
$form = new Form($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
@ -201,6 +205,11 @@ $formaccounting = new FormAccounting($db);
|
||||
$accountsystem = new AccountancySystem($db);
|
||||
$accountsystem->fetch($conf->global->CHARTOFACCOUNTS);
|
||||
|
||||
$title = $langs->trans('AccountAccounting') ." - ". $langs->trans('Card');
|
||||
$helpurl = '';
|
||||
llxheader('', $title, $helpurl);
|
||||
|
||||
|
||||
// Create mode
|
||||
if ($action == 'create') {
|
||||
print load_fiche_titre($langs->trans('NewAccountingAccount'));
|
||||
@ -221,7 +230,7 @@ if ($action == 'create') {
|
||||
|
||||
// Account number
|
||||
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
|
||||
print '<td><input name="account_number" size="30" value="' . $object->account_number . '"></td></tr>';
|
||||
print '<td><input name="account_number" size="30" value="' . $accountingaccount . '"></td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td><span class="fieldrequired">' . $langs->trans("Label") . '</span></td>';
|
||||
@ -330,7 +339,7 @@ else if ($id > 0 || $ref) {
|
||||
print '</form>';
|
||||
} else {
|
||||
// View mode
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php">' . $langs->trans("BackToList") . '</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php?restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), -1, 'billr');
|
||||
|
||||
@ -379,13 +388,13 @@ else if ($id > 0 || $ref) {
|
||||
if (! empty($user->rights->accounting->chartofaccount)) {
|
||||
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $id . '">' . $langs->trans('Modify') . '</a>';
|
||||
} else {
|
||||
print '<a class="butActionRefused" 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)) {
|
||||
print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>';
|
||||
} else {
|
||||
print '<a class="butActionRefused" 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>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
@ -395,6 +404,6 @@ else if ($id > 0 || $ref) {
|
||||
}
|
||||
}
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
$db->close();
|
||||
|
||||
@ -29,17 +29,17 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
$error = 0;
|
||||
|
||||
$langs->load("bills");
|
||||
$langs->load("accountancy");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("bills","accountancy"));
|
||||
|
||||
$mesg = '';
|
||||
$id = GETPOST('id', 'int');
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
$action = GETPOST('action','aZ09');
|
||||
$cat_id = GETPOST('account_category');
|
||||
$cat_id = GETPOST('account_category','int');
|
||||
$selectcpt = GETPOST('cpt_bk', 'array');
|
||||
$cpt_id = GETPOST('cptid');
|
||||
$cpt_id = GETPOST('cptid','int');
|
||||
|
||||
if ($cat_id == 0) {
|
||||
$cat_id = null;
|
||||
@ -53,6 +53,11 @@ if (empty($user->rights->accounting->chartofaccount))
|
||||
|
||||
$accountingcategory = new AccountancyCategory($db);
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// si ajout de comptes
|
||||
if (! empty($selectcpt)) {
|
||||
$cpts = array ();
|
||||
@ -66,7 +71,7 @@ if (! empty($selectcpt)) {
|
||||
if ($return<0) {
|
||||
setEventMessages($langs->trans('errors'), $accountingcategory->errors, 'errors');
|
||||
} else {
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
if ($action == 'delete') {
|
||||
@ -83,6 +88,7 @@ if ($action == 'delete') {
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
@ -99,13 +105,15 @@ print '<input type="hidden" name="action" value="display">';
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
// Category
|
||||
|
||||
// Select the category
|
||||
print '<tr><td class="titlefield">' . $langs->trans("AccountingCategory") . '</td>';
|
||||
print '<td>';
|
||||
$formaccounting->select_accounting_category($cat_id, 'account_category', 1, 0, 0, 1);
|
||||
print '<input class="button" type="submit" value="' . $langs->trans("Select") . '">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Select the accounts
|
||||
if (! empty($cat_id))
|
||||
{
|
||||
$return = $accountingcategory->getAccountsWithNoCategory($cat_id);
|
||||
@ -153,7 +161,7 @@ if ($action == 'display' || $action == 'delete') {
|
||||
print "</tr>\n";
|
||||
|
||||
if (! empty($cat_id)) {
|
||||
$return = $accountingcategory->display($cat_id);
|
||||
$return = $accountingcategory->display($cat_id); // This load ->lines_display
|
||||
if ($return < 0) {
|
||||
setEventMessages(null, $accountingcategory->errors, 'errors');
|
||||
}
|
||||
@ -176,6 +184,6 @@ if ($action == 'display' || $action == 'delete') {
|
||||
print "</table>";
|
||||
}
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -31,9 +31,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("errors","admin","companies","resource","holiday","accountancy","hrm"));
|
||||
|
||||
$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
|
||||
$action=GETPOST('action','aZ09')?GETPOST('action','aZ09'):'view';
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$id=32;
|
||||
$rowid=GETPOST('rowid','alpha');
|
||||
@ -50,8 +51,8 @@ $acts[1] = "disable";
|
||||
$actl[0] = img_picto($langs->trans("Disabled"),'switch_off');
|
||||
$actl[1] = img_picto($langs->trans("Activated"),'switch_on');
|
||||
|
||||
$listoffset=GETPOST('listoffset');
|
||||
$listlimit=GETPOST('listlimit')>0?GETPOST('listlimit'):1000;
|
||||
$listoffset=GETPOST('listoffset','alpha');
|
||||
$listlimit=GETPOST('listlimit','int')>0?GETPOST('listlimit','int'):1000;
|
||||
$active = 1;
|
||||
|
||||
$sortfield = GETPOST("sortfield",'aZ09comma');
|
||||
@ -133,13 +134,13 @@ $sourceList=array();
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('button_removefilter') || GETPOST('button_removefilter.x') || GETPOST('button_removefilter_x'))
|
||||
if (GETPOST('button_removefilter','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter_x','alpha'))
|
||||
{
|
||||
$search_country_id = '';
|
||||
}
|
||||
|
||||
// Actions add or modify an entry into a dictionary
|
||||
if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha'))
|
||||
{
|
||||
$listfield=explode(',', str_replace(' ', '',$tabfield[$id]));
|
||||
$listfieldinsert=explode(',',$tabfieldinsert[$id]);
|
||||
@ -178,7 +179,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
}
|
||||
if (! is_numeric(GETPOST('position','alpha')))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$langs->loadLangs(array("errors"));
|
||||
$ok=0;
|
||||
setEventMessages($langs->transnoentities('ErrorFieldMustBeANumeric', $langs->transnoentities("Position")), null, 'errors');
|
||||
}
|
||||
@ -201,7 +202,6 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$newid=($obj->newid + 1);
|
||||
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
@ -249,7 +249,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
}
|
||||
|
||||
// Si verif ok et action modify, on modifie la ligne
|
||||
if ($ok && GETPOST('actionmodify'))
|
||||
if ($ok && GETPOST('actionmodify','alpha'))
|
||||
{
|
||||
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
|
||||
else { $rowidcol="rowid"; }
|
||||
@ -290,7 +290,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||
}
|
||||
|
||||
if (GETPOST('actioncancel'))
|
||||
if (GETPOST('actioncancel','alpha'))
|
||||
{
|
||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||
}
|
||||
@ -456,7 +456,6 @@ if ($id)
|
||||
if ($tabname[$id])
|
||||
{
|
||||
$alabelisused=0;
|
||||
$var=false;
|
||||
|
||||
$fieldlist=explode(',',$tabfield[$id]);
|
||||
|
||||
@ -513,7 +512,7 @@ if ($id)
|
||||
|
||||
$obj = new stdClass();
|
||||
// If data was already input, we define them in obj to populate input fields.
|
||||
if (GETPOST('actionadd'))
|
||||
if (GETPOST('actionadd','alpha'))
|
||||
{
|
||||
foreach ($fieldlist as $key=>$val)
|
||||
{
|
||||
@ -550,7 +549,6 @@ if ($id)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$var=true;
|
||||
|
||||
$param = '&id='.$id;
|
||||
if ($search_country_id > 0) $param.= '&search_country_id='.$search_country_id;
|
||||
@ -720,7 +718,7 @@ if ($id)
|
||||
$valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') {
|
||||
$langs->load("propal");
|
||||
$langs->loadLangs(array("propal"));
|
||||
$key=$langs->trans("AvailabilityType".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
@ -801,7 +799,7 @@ if ($id)
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -34,12 +34,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("admin");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("salaries");
|
||||
$langs->load("loan");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("compta","bills","admin","accountancy","salaries","loan"));
|
||||
|
||||
// Security check
|
||||
if (empty($user->rights->accounting->chartofaccount))
|
||||
@ -47,7 +43,7 @@ if (empty($user->rights->accounting->chartofaccount))
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
|
||||
$list_account_main = array (
|
||||
@ -67,6 +63,7 @@ $list_account = array (
|
||||
'ACCOUNTING_ACCOUNT_SUSPENSE',
|
||||
'ACCOUNTING_ACCOUNT_TRANSFER_CASH',
|
||||
'DONATION_ACCOUNTINGACCOUNT',
|
||||
'ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT',
|
||||
'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',
|
||||
'LOAN_ACCOUNTING_ACCOUNT_INTEREST',
|
||||
'LOAN_ACCOUNTING_ACCOUNT_INSURANCE'
|
||||
@ -80,7 +77,7 @@ $list_account = array (
|
||||
$accounting_mode = empty($conf->global->ACCOUNTING_MODE) ? 'RECETTES-DEPENSES' : $conf->global->ACCOUNTING_MODE;
|
||||
|
||||
|
||||
if (GETPOST('change_chart'))
|
||||
if (GETPOST('change_chart', 'alpha'))
|
||||
{
|
||||
$chartofaccounts = GETPOST('chartofaccounts', 'int');
|
||||
|
||||
@ -194,5 +191,6 @@ print '<div class="center"><input type="submit" class="button" value="' . $langs
|
||||
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2017-2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -28,15 +28,12 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("admin");
|
||||
$langs->load("accountancy");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("compta","bills","admin","accountancy"));
|
||||
|
||||
// Security access
|
||||
if (empty($user->rights->accounting->chartofaccount))
|
||||
@ -44,20 +41,20 @@ if (empty($user->rights->accounting->chartofaccount))
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
// Parameters ACCOUNTING_EXPORT_*
|
||||
$main_option = array (
|
||||
$main_option = array(
|
||||
'ACCOUNTING_EXPORT_PREFIX_SPEC',
|
||||
);
|
||||
|
||||
$configuration = AccountancyExport::getTypeConfig();
|
||||
|
||||
$listparam = $configuration[param];
|
||||
$listparam = $configuration['param'];
|
||||
|
||||
$listformat = $configuration[format];
|
||||
$listformat = $configuration['format'];
|
||||
|
||||
$listcr = $configuration[cr];
|
||||
$listcr = $configuration['cr'];
|
||||
|
||||
|
||||
$model_option = array (
|
||||
@ -82,6 +79,7 @@ $model_option = array (
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'update') {
|
||||
$error = 0;
|
||||
|
||||
@ -120,13 +118,15 @@ if ($action == 'update') {
|
||||
if (! $error) {
|
||||
// reload
|
||||
$configuration = AccountancyExport::getTypeConfig();
|
||||
$listparam = $configuration[param];
|
||||
$listparam = $configuration['param'];
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -145,27 +145,27 @@ print ' {'."\n";
|
||||
foreach ($listparam as $key => $param) {
|
||||
print ' if (jQuery("#ACCOUNTING_EXPORT_MODELCSV").val()=="'.$key.'")'."\n";
|
||||
print ' {'."\n";
|
||||
print ' //console.log("'.$param[label].'");'."\n";
|
||||
if (empty($param[ACCOUNTING_EXPORT_FORMAT])) {
|
||||
print ' //console.log("'.$param['label'].'");'."\n";
|
||||
if (empty($param['ACCOUNTING_EXPORT_FORMAT'])) {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$conf->global->ACCOUNTING_EXPORT_FORMAT.'");'."\n";
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").prop("disabled", true);'."\n";
|
||||
} else {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$param[ACCOUNTING_EXPORT_FORMAT].'");'."\n";
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$param['ACCOUNTING_EXPORT_FORMAT'].'");'."\n";
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").removeAttr("disabled");'."\n";
|
||||
}
|
||||
if (empty($param[ACCOUNTING_EXPORT_SEPARATORCSV])) {
|
||||
if (empty($param['ACCOUNTING_EXPORT_SEPARATORCSV'])) {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("");'."\n";
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").prop("disabled", true);'."\n";
|
||||
} else {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("'.$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV.'");'."\n";
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").removeAttr("disabled");'."\n";
|
||||
}
|
||||
if (empty($param[ACCOUNTING_EXPORT_ENDLINE])) {
|
||||
if (empty($param['ACCOUNTING_EXPORT_ENDLINE'])) {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").prop("disabled", true);'."\n";
|
||||
} else {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").removeAttr("disabled");'."\n";
|
||||
}
|
||||
if (empty($param[ACCOUNTING_EXPORT_DATE])) {
|
||||
if (empty($param['ACCOUNTING_EXPORT_DATE'])) {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_DATE").val("");'."\n";
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_DATE").prop("disabled", true);'."\n";
|
||||
} else {
|
||||
@ -260,17 +260,17 @@ if ($num2) {
|
||||
print '<tr class="oddeven value">';
|
||||
|
||||
// Param
|
||||
$label = $key[label];
|
||||
$label = $key['label'];
|
||||
print '<td width="50%">' . $langs->trans($label) . '</td>';
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
if (is_array($key[param])) {
|
||||
print $form->selectarray($label, $key[param], $conf->global->$label, 0);
|
||||
if (is_array($key['param'])) {
|
||||
print $form->selectarray($label, $key['param'], $conf->global->$label, 0);
|
||||
} else {
|
||||
print '<input type="text" size="20" id="'. $label .'" name="' . $key[label] . '" value="' . $conf->global->$label . '">';
|
||||
print '<input type="text" size="20" id="'. $label .'" name="' . $key['label'] . '" value="' . $conf->global->$label . '">';
|
||||
}
|
||||
|
||||
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -281,5 +281,6 @@ print '<div class="center"><input type="submit" class="button" value="' . dol_es
|
||||
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
/* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/fiscalyear.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Setup page to configure fiscal year
|
||||
* \file htdocs/accountancy/admin/fiscalyear.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Setup page to configure fiscal year
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
@ -39,14 +39,14 @@ $pagenext = $page + 1;
|
||||
if (! $sortfield) $sortfield="f.rowid"; // Set here default search field
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("compta");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin","compta"));
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
if (! $user->rights->accounting->fiscalyear) // If we can read accounting records, we shoul be able to see fiscal year.
|
||||
accessforbidden();
|
||||
if (! $user->rights->accounting->fiscalyear) // If we can read accounting records, we should be able to see fiscal year.
|
||||
accessforbidden();
|
||||
|
||||
$error = 0;
|
||||
|
||||
@ -95,6 +95,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||
{
|
||||
$page = 0;
|
||||
$offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$sql.= $db->plimit($limit+1, $offset);
|
||||
@ -108,23 +113,26 @@ if ($result)
|
||||
|
||||
if (! empty($user->rights->accounting->fiscalyear))
|
||||
{
|
||||
$addbutton = '<a class="butAction" href="fiscalyear_card.php?action=create">' . $langs->trans("NewFiscalYear") . '</a>';
|
||||
$addbutton = '<a class="butActionNew" href="fiscalyear_card.php?action=create"><span class="valignmiddle">' . $langs->trans("NewFiscalYear") .'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$addbutton = '<a class="butActionRefused" href="#">' . $langs->trans("NewFiscalYear") . '</a>';
|
||||
$addbutton = '<a class="butActionRefused classfortooltip" href="#"><span class="valignmiddle" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">' . $langs->trans("NewFiscalYear") .'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
}
|
||||
|
||||
$title = $langs->trans('AccountingPeriods');
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $addbutton, '', $limit, 1);
|
||||
|
||||
// Load attribute_label
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>' . $langs->trans("Ref") . '</td>';
|
||||
print '<td>' . $langs->trans("Label") . '</td>';
|
||||
print '<td>' . $langs->trans("DateStart") . '</td>';
|
||||
print '<td>' . $langs->trans("DateEnd") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("NumberOfAccountancyEntries") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("NumberOfAccountancyMovements") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("Statut") . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -139,6 +147,8 @@ if ($result)
|
||||
print '<td align="left">' . $obj->label . '</td>';
|
||||
print '<td align="left">' . dol_print_date($db->jdate($obj->date_start), 'day') . '</td>';
|
||||
print '<td align="left">' . dol_print_date($db->jdate($obj->date_end), 'day') . '</td>';
|
||||
print '<td align="center">' . $object->getAccountancyEntriesByFiscalYear($obj->date_start, $obj->date_end) . '</td>';
|
||||
print '<td align="center">' . $object->getAccountancyMovementsByFiscalYear($obj->date_start, $obj->date_end) . '</td>';
|
||||
print '<td align="right">' . $fiscalyearstatic->LibStatut($obj->statut, 5) . '</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
@ -147,10 +157,11 @@ if ($result)
|
||||
print '<tr class="oddeven"><td colspan="5" class="opacitymedium">' . $langs->trans("None") . '</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
$db->close();
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -26,8 +27,8 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/fiscalyear.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("compta");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin","compta"));
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
@ -37,7 +38,7 @@ if (empty($user->rights->accounting->fiscalyear))
|
||||
|
||||
$error = 0;
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
@ -165,16 +166,16 @@ if ($action == 'create')
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Label
|
||||
print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans("Label") . '</td><td><input name="label" size="32" value="' . GETPOST("label") . '"></td></tr>';
|
||||
print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans("Label") . '</td><td><input name="label" size="32" value="' . GETPOST('label', 'alpha') . '"></td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>';
|
||||
print $form->select_date(($date_start ? $date_start : ''), 'fiscalyear');
|
||||
print $form->selectDate(($date_start ? $date_start : ''), 'fiscalyear');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td class="fieldrequired">' . $langs->trans("DateEnd") . '</td><td>';
|
||||
print $form->select_date(($date_end ? $date_end : - 1), 'fiscalyearend');
|
||||
print $form->selectDate(($date_end ? $date_end : - 1), 'fiscalyearend');
|
||||
print '</td></tr>';
|
||||
|
||||
/*
|
||||
@ -182,7 +183,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">' . $langs->trans("Status") . '</td>';
|
||||
print '<td class="valeur">';
|
||||
print $form->selectarray('statut', $statut2label, GETPOST('statut'));
|
||||
print $form->selectarray('statut', $statut2label, GETPOST('statut', 'int'));
|
||||
print '</td></tr>';
|
||||
*/
|
||||
|
||||
@ -225,12 +226,12 @@ if ($action == 'create')
|
||||
|
||||
// Date start
|
||||
print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>';
|
||||
print $form->select_date($object->date_start ? $object->date_start : - 1, 'fiscalyear');
|
||||
print $form->selectDate($object->date_start ? $object->date_start : - 1, 'fiscalyear');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td class="fieldrequired">' . $langs->trans("DateEnd") . '</td><td>';
|
||||
print $form->select_date($object->date_end ? $object->date_end : - 1, 'fiscalyearend');
|
||||
print $form->selectDate($object->date_end ? $object->date_end : - 1, 'fiscalyearend');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
@ -318,5 +319,6 @@ if ($action == 'create')
|
||||
}
|
||||
}
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -26,8 +26,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/fiscalyear.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("compta");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin","compta"));
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
@ -58,5 +58,6 @@ if ($id) {
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -18,22 +19,18 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/importaccounts.php
|
||||
* \file htdocs/accountancy/admin/importaccounts.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Page import accounting account
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
// langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("compta","bills","accountancy"));
|
||||
|
||||
// Security check
|
||||
if (! $user->admin)
|
||||
@ -75,10 +72,10 @@ if ($_POST["action"] == 'import') {
|
||||
|
||||
$accounting = new AccountingAccount($db);
|
||||
|
||||
$monLabel = GETPOST('label' . $maLigneCochee);
|
||||
$monParentAccount = GETPOST('AccountParent' . $maLigneCochee);
|
||||
$monType = GETPOST('pcgType' . $maLigneCochee);
|
||||
$monSubType = GETPOST('pcgSubType' . $maLigneCochee);
|
||||
$monLabel = (string) GETPOST('label' . $maLigneCochee);
|
||||
$monParentAccount = (string) GETPOST('AccountParent' . $maLigneCochee);
|
||||
$monType = (string) GETPOST('pcgType' . $maLigneCochee);
|
||||
$monSubType = (string) GETPOST('pcgSubType' . $maLigneCochee);
|
||||
|
||||
$accounting->fk_pcg_version = $obj->pcg_version;
|
||||
$accounting->account_number = $maLigneCochee;
|
||||
@ -87,7 +84,7 @@ if ($_POST["action"] == 'import') {
|
||||
$accounting->pcg_type = $monType;
|
||||
$accounting->pcg_subtype = $monSubType;
|
||||
$accounting->active = 1;
|
||||
|
||||
|
||||
$result = $accounting->create($user);
|
||||
if ($result > 0) {
|
||||
setEventMessages($langs->trans("AccountingAccountAdd"), null, 'mesgs');
|
||||
@ -105,7 +102,7 @@ if ($_POST["action"] == 'import') {
|
||||
print '<div><font color="red">' . $langs->trans("EndProcessing") . '</font></div>';
|
||||
}
|
||||
|
||||
// list accounting account from product
|
||||
// list accounting account from product
|
||||
|
||||
$sql = "(SELECT p.rowid as product_id, p.accountancy_code_sell as accounting ";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "product as p ";
|
||||
@ -141,7 +138,6 @@ if ($result) {
|
||||
$form = new Form($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
$var = true;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
print '<tr class="oddeven">';
|
||||
@ -177,14 +173,15 @@ if ($result) {
|
||||
print '</tr>';
|
||||
$i ++;
|
||||
}
|
||||
|
||||
|
||||
print '<tr><td colspan="8"> </td></tr><tr><td colspan="8" align="center"><input type="submit" class="butAction" value="' . $langs->trans("Import") . '"></td></tr>';
|
||||
|
||||
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $db->error();
|
||||
}
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -32,10 +32,8 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("admin");
|
||||
$langs->load("accountancy");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("compta","bills","admin","accountancy"));
|
||||
|
||||
// Security access
|
||||
if (empty($user->rights->accounting->chartofaccount))
|
||||
@ -43,7 +41,7 @@ if (empty($user->rights->accounting->chartofaccount))
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
// Parameters ACCOUNTING_* and others
|
||||
$list = array (
|
||||
@ -134,6 +132,18 @@ if ($action == 'setdisabledirectinput') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'setenabledraftexport') {
|
||||
$setenabledraftexport = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL", $setenabledraftexport, 'yesno', 0, '', $conf->entity);
|
||||
if (! $res > 0)
|
||||
$error ++;
|
||||
if (! $error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -215,6 +225,19 @@ if (! empty($user->admin))
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) {
|
||||
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
|
||||
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
|
||||
@ -272,5 +295,6 @@ print '<br>';
|
||||
print '<br>';
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Setup page to configure journals
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
@ -30,9 +31,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin","compta","accountancy"));
|
||||
|
||||
$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
|
||||
$action=GETPOST('action','aZ09')?GETPOST('action','aZ09'):'view';
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$id=35;
|
||||
$rowid=GETPOST('rowid','alpha');
|
||||
@ -49,8 +51,8 @@ $acts[1] = "disable";
|
||||
$actl[0] = img_picto($langs->trans("Disabled"),'switch_off');
|
||||
$actl[1] = img_picto($langs->trans("Activated"),'switch_on');
|
||||
|
||||
$listoffset=GETPOST('listoffset');
|
||||
$listlimit=GETPOST('listlimit')>0?GETPOST('listlimit'):1000;
|
||||
$listoffset=GETPOST('listoffset', 'alpha');
|
||||
$listlimit=GETPOST('listlimit', 'int')>0?GETPOST('listlimit', 'int'):1000;
|
||||
$active = 1;
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
@ -126,27 +128,28 @@ complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,
|
||||
|
||||
// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact")
|
||||
$elementList = array();
|
||||
// Must match ids defined into eldy.lib.php
|
||||
$sourceList = array(
|
||||
'1' => $langs->trans('AccountingJournalType1'),
|
||||
'2' => $langs->trans('AccountingJournalType2'),
|
||||
'3' => $langs->trans('AccountingJournalType3'),
|
||||
'4' => $langs->trans('AccountingJournalType4'),
|
||||
'5' => $langs->trans('AccountingJournalType5'),
|
||||
'9' => $langs->trans('AccountingJournalType9')
|
||||
);
|
||||
// Must match ids defined into eldy.lib.php
|
||||
$sourceList = array(
|
||||
'1' => $langs->trans('AccountingJournalType1'),
|
||||
'2' => $langs->trans('AccountingJournalType2'),
|
||||
'3' => $langs->trans('AccountingJournalType3'),
|
||||
'4' => $langs->trans('AccountingJournalType4'),
|
||||
'5' => $langs->trans('AccountingJournalType5'),
|
||||
'8' => $langs->trans('AccountingJournalType8'),
|
||||
'9' => $langs->trans('AccountingJournalType9'),
|
||||
);
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('button_removefilter') || GETPOST('button_removefilter.x') || GETPOST('button_removefilter_x'))
|
||||
if (GETPOST('button_removefilter', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter_x', 'alpha'))
|
||||
{
|
||||
$search_country_id = '';
|
||||
}
|
||||
|
||||
// Actions add or modify an entry into a dictionary
|
||||
if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
|
||||
{
|
||||
$listfield=explode(',', str_replace(' ', '',$tabfield[$id]));
|
||||
$listfieldinsert=explode(',',$tabfieldinsert[$id]);
|
||||
@ -187,7 +190,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null
|
||||
|
||||
// Si verif ok et action add, on ajoute la ligne
|
||||
if ($ok && GETPOST('actionadd'))
|
||||
if ($ok && GETPOST('actionadd', 'alpha'))
|
||||
{
|
||||
if ($tabrowid[$id])
|
||||
{
|
||||
@ -199,7 +202,6 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$newid=($obj->newid + 1);
|
||||
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
@ -249,7 +251,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
}
|
||||
|
||||
// Si verif ok et action modify, on modifie la ligne
|
||||
if ($ok && GETPOST('actionmodify'))
|
||||
if ($ok && GETPOST('actionmodify', 'alpha'))
|
||||
{
|
||||
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
|
||||
else { $rowidcol="rowid"; }
|
||||
@ -291,10 +293,10 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||
}
|
||||
|
||||
if (GETPOST('actioncancel'))
|
||||
{
|
||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||
}
|
||||
//if (GETPOST('actioncancel', 'alpha'))
|
||||
//{
|
||||
// $_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||
//}
|
||||
|
||||
if ($action == 'confirm_delete' && $confirm == 'yes') // delete
|
||||
{
|
||||
@ -416,7 +418,6 @@ if ($id)
|
||||
if ($tabname[$id])
|
||||
{
|
||||
$alabelisused=0;
|
||||
$var=false;
|
||||
|
||||
$fieldlist=explode(',',$tabfield[$id]);
|
||||
|
||||
@ -460,7 +461,7 @@ if ($id)
|
||||
|
||||
$obj = new stdClass();
|
||||
// If data was already input, we define them in obj to populate input fields.
|
||||
if (GETPOST('actionadd'))
|
||||
if (GETPOST('actionadd', 'alpha'))
|
||||
{
|
||||
foreach ($fieldlist as $key=>$val)
|
||||
{
|
||||
@ -496,14 +497,13 @@ if ($id)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$var=true;
|
||||
|
||||
$param = '&id='.$id;
|
||||
if ($search_country_id > 0) $param.= '&search_country_id='.$search_country_id;
|
||||
$paramwithsearch = $param;
|
||||
if ($sortorder) $paramwithsearch.= '&sortorder='.$sortorder;
|
||||
if ($sortfield) $paramwithsearch.= '&sortfield='.$sortfield;
|
||||
if (GETPOST('from')) $paramwithsearch.= '&from='.GETPOST('from','alpha');
|
||||
if (GETPOST('from', 'alpha')) $paramwithsearch.= '&from='.GETPOST('from','alpha');
|
||||
|
||||
// There is several pages
|
||||
if ($num > $listlimit)
|
||||
@ -601,6 +601,7 @@ if ($id)
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
$langs->load("accountancy");
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
|
||||
@ -611,10 +612,12 @@ if ($id)
|
||||
$valuetoshow=$langs->trans('All');
|
||||
}
|
||||
else if ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
|
||||
$langs->load("accountancy");
|
||||
$key=$langs->trans("AccountingJournalType".strtoupper($obj->nature));
|
||||
$valuetoshow=($obj->nature && $key != "AccountingJournalType".strtoupper($obj->nature)?$key:$obj->{$fieldlist[$field]});
|
||||
$valuetoshow=($obj->nature && $key != "AccountingJournalType".strtoupper($langs->trans($obj->nature))?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
|
||||
$valuetoshow=$langs->trans($obj->label);
|
||||
}
|
||||
|
||||
$class='tddict';
|
||||
// Show value for field
|
||||
@ -640,13 +643,7 @@ if ($id)
|
||||
// Active
|
||||
print '<td align="center" class="nowrap">';
|
||||
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
|
||||
else
|
||||
{
|
||||
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive");
|
||||
else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
|
||||
else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption");
|
||||
else print $langs->trans("AlwaysActive");
|
||||
}
|
||||
else print $langs->trans("AlwaysActive");
|
||||
print "</td>";
|
||||
|
||||
// Modify link
|
||||
@ -685,7 +682,7 @@ if ($id)
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
@ -35,12 +34,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("companies");
|
||||
$langs->load("compta");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("products");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies","compta","accountancy","products"));
|
||||
|
||||
// Security check
|
||||
if (empty($conf->accounting->enabled)) {
|
||||
@ -50,7 +45,7 @@ if (! $user->rights->accounting->bind->write)
|
||||
accessforbidden();
|
||||
|
||||
// search & action GETPOST
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$codeventil_buy = GETPOST('codeventil_buy', 'array');
|
||||
$codeventil_sell = GETPOST('codeventil_sell', 'array');
|
||||
$chk_prod = GETPOST('chk_prod', 'array');
|
||||
@ -67,8 +62,8 @@ $search_current_account_valid = GETPOST('search_current_account_valid', 'alpha')
|
||||
if ($search_current_account_valid == '') $search_current_account_valid='withoutvalidaccount';
|
||||
|
||||
$accounting_product_mode = GETPOST('accounting_product_mode', 'alpha');
|
||||
$btn_changeaccount = GETPOST('changeaccount');
|
||||
$btn_changetype = GETPOST('changetype');
|
||||
$btn_changeaccount = GETPOST('changeaccount', 'alpha');
|
||||
$btn_changetype = GETPOST('changetype', 'alpha');
|
||||
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit','int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
@ -178,7 +173,6 @@ if ($action == 'update') {
|
||||
|
||||
$cpt++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($ko) setEventMessages($langs->trans("XLineFailedToBeBinded", $ko), null, 'errors');
|
||||
@ -261,7 +255,13 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||
{
|
||||
$page = 0;
|
||||
$offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$sql .= $db->plimit($limit + 1, $offset);
|
||||
|
||||
dol_syslog("/accountancy/admin/productaccount.php:: sql=" . $sql, LOG_DEBUG);
|
||||
@ -272,8 +272,8 @@ if ($result)
|
||||
$i = 0;
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||
if ($search_ref > 0) $param.="&search_desc=".urlencode($search_ref);
|
||||
if ($search_label > 0) $param.="&search_desc=".urlencode($search_label);
|
||||
if ($search_desc > 0) $param.="&search_desc=".urlencode($search_desc);
|
||||
@ -300,10 +300,10 @@ if ($result)
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>' . $langs->trans('Options') . '</td><td>' . $langs->trans('Description') . '</td>';
|
||||
print "</tr>\n";
|
||||
print '<tr ' . $bc[false] . '><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL"' . ($accounting_product_mode != 'ACCOUNTANCY_BUY' ? ' checked' : '') . '> ' . $langs->trans('OptionModeProductSell') . '</td>';
|
||||
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL"' . ($accounting_product_mode != 'ACCOUNTANCY_BUY' ? ' checked' : '') . '> ' . $langs->trans('OptionModeProductSell') . '</td>';
|
||||
print '<td>'.$langs->trans('OptionModeProductSellDesc');
|
||||
print "</td></tr>\n";
|
||||
print '<tr ' . $bc[true] . '><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_BUY"' . ($accounting_product_mode == 'ACCOUNTANCY_BUY' ? ' checked' : '') . '> ' . $langs->trans('OptionModeProductBuy') . '</td>';
|
||||
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_BUY"' . ($accounting_product_mode == 'ACCOUNTANCY_BUY' ? ' checked' : '') . '> ' . $langs->trans('OptionModeProductBuy') . '</td>';
|
||||
print '<td>'.$langs->trans('OptionModeProductBuyDesc')."</td></tr>\n";
|
||||
print "</table>\n";
|
||||
|
||||
@ -328,9 +328,9 @@ if ($result)
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
|
||||
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
|
||||
// On sell
|
||||
print '<td class="liste_titre"></td>';
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_SELL') print '<td class="liste_titre"></td>';
|
||||
// On buy
|
||||
print '<td class="liste_titre"></td>';
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print '<td class="liste_titre"></td>';
|
||||
// Current account
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" size="6" name="search_current_account" value="' . dol_escape_htmltag($search_current_account) . '">';
|
||||
@ -348,11 +348,9 @@ if ($result)
|
||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
|
||||
$fieldtosortaccount="p.accountancy_code_buy";
|
||||
}
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_SELL') print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') $fieldtosortaccount="p.accountancy_code_buy";
|
||||
else $fieldtosortaccount="p.accountancy_code_sell";
|
||||
print_liste_field_titre("CurrentDedicatedAccountingAccount", $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AssignDedicatedAccountingAccount");
|
||||
@ -362,7 +360,6 @@ if ($result)
|
||||
|
||||
$product_static = new Product($db);
|
||||
|
||||
$var = true;
|
||||
$i=0;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
@ -410,9 +407,11 @@ if ($result)
|
||||
print '<td style="' . $code_sell_p_l_differ . '">' . nl2br(dol_trunc($obj->description, $trunclengh)) . '</td>';
|
||||
}
|
||||
|
||||
print '<td align="center">'.$product_static->getLibStatut(3, 0).'</td>';
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_SELL')
|
||||
print '<td align="center">'.$product_static->getLibStatut(3, 0).'</td>';
|
||||
|
||||
print '<td align="center">'.$product_static->getLibStatut(3, 1).'</td>';
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY')
|
||||
print '<td align="center">'.$product_static->getLibStatut(3, 1).'</td>';
|
||||
|
||||
// Current accounting account
|
||||
print '<td align="left">';
|
||||
@ -495,5 +494,6 @@ if ($result)
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
$db->close();
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -34,15 +35,30 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("accountancy");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("accountancy"));
|
||||
|
||||
$page = GETPOST("page");
|
||||
$sortorder = GETPOST("sortorder");
|
||||
$sortfield = GETPOST("sortfield");
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
if (GETPOST("exportcsv",'alpha')) $action = 'export_csv';
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield','alpha');
|
||||
$sortorder = GETPOST('sortorder','alpha');
|
||||
$page = GETPOST('page','int');
|
||||
if (empty($page) || $page == -1 || GETPOST('button_search','alpha') || GETPOST('button_removefilter','alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
//if (! $sortfield) $sortfield="p.date_fin";
|
||||
//if (! $sortorder) $sortorder="DESC";
|
||||
|
||||
|
||||
$search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int'));
|
||||
$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
|
||||
$search_date_end = dol_mktime(23, 59, 59, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
|
||||
|
||||
$search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha');
|
||||
if ($search_accountancy_code_start == - 1) {
|
||||
@ -53,14 +69,6 @@ if ($search_accountancy_code_end == - 1) {
|
||||
$search_accountancy_code_end = '';
|
||||
}
|
||||
|
||||
if (GETPOST("exportcsv")) $action = 'export_csv';
|
||||
|
||||
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):$conf->liste_limit;
|
||||
if (empty($page) || $page < 0) { $page = 0; }
|
||||
|
||||
$offset = $limit * $page;
|
||||
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
$formaccounting = new FormAccounting($db);
|
||||
@ -96,26 +104,29 @@ if ($sortorder == "")
|
||||
if ($sortfield == "")
|
||||
$sortfield = "t.numero_compte";
|
||||
|
||||
$options = '';
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||
|
||||
$filter = array ();
|
||||
if (! empty($search_date_start)) {
|
||||
$filter['t.doc_date>='] = $search_date_start;
|
||||
$options .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int');
|
||||
$param .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int');
|
||||
}
|
||||
if (! empty($search_date_end)) {
|
||||
$filter['t.doc_date<='] = $search_date_end;
|
||||
$options .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int');
|
||||
$param .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int');
|
||||
}
|
||||
if (! empty($search_accountancy_code_start)) {
|
||||
$filter['t.numero_compte>='] = $search_accountancy_code_start;
|
||||
$options .= '&search_accountancy_code_start=' . $search_accountancy_code_start;
|
||||
$param .= '&search_accountancy_code_start=' . $search_accountancy_code_start;
|
||||
}
|
||||
if (! empty($search_accountancy_code_end)) {
|
||||
$filter['t.numero_compte<='] = $search_accountancy_code_end;
|
||||
$options .= '&search_accountancy_code_end=' . $search_accountancy_code_end;
|
||||
$param .= '&search_accountancy_code_end=' . $search_accountancy_code_end;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Action
|
||||
*/
|
||||
@ -134,15 +145,15 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
|
||||
* View
|
||||
*/
|
||||
|
||||
if ($action == 'export_csv') {
|
||||
|
||||
if ($action == 'export_csv')
|
||||
{
|
||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||
|
||||
$journal = 'balance';
|
||||
|
||||
$filename = 'balance';
|
||||
$type_export = 'balance';
|
||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||
|
||||
$result = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
|
||||
$result = $object->fetchAllBalance($sortorder, $sortfield, $limit, 0, $filter);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
@ -153,17 +164,21 @@ if ($action == 'export_csv') {
|
||||
print $object->get_compte_desc($line->numero_compte) . $sep;
|
||||
print price($line->debit) . $sep;
|
||||
print price($line->credit) . $sep;
|
||||
print price($line->debit) . $sep;
|
||||
print price($line->credit - $line->debit) . $sep;
|
||||
print "\n";
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
else {
|
||||
$title_page = $langs->trans("AccountBalance");
|
||||
|
||||
llxHeader('', $title_page);
|
||||
$title_page = $langs->trans("AccountBalance");
|
||||
|
||||
llxHeader('', $title_page);
|
||||
|
||||
|
||||
if ($action != 'export_csv')
|
||||
{
|
||||
// List
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
@ -189,15 +204,16 @@ else {
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
$button = '<input type="submit" name="exportcsv" class="butAction" value="' . $langs->trans("Export") . ' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $result, 'title_accountancy', 0, $button);
|
||||
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= $langs->trans('DateStart') . ': ';
|
||||
$moreforfilter .= $form->select_date($search_date_start?$search_date_start:-1, 'date_start', 0, 0, 1, '', 1, 0, 1);
|
||||
$moreforfilter .= $form->selectDate($search_date_start?$search_date_start:-1, 'date_start', 0, 0, 1, '', 1, 0);
|
||||
$moreforfilter .= $langs->trans('DateEnd') . ': ';
|
||||
$moreforfilter .= $form->select_date($search_date_end?$search_date_end:-1, 'date_end', 0, 0, 1, '', 1, 0, 1);
|
||||
$moreforfilter .= $form->selectDate($search_date_end?$search_date_end:-1, 'date_end', 0, 0, 1, '', 1, 0);
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
if (! empty($moreforfilter)) {
|
||||
@ -227,12 +243,12 @@ else {
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $options, "", 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $param, "", 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
$total_debit = 0;
|
||||
@ -249,23 +265,23 @@ else {
|
||||
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
|
||||
$root_account_description = $object->get_compte_racine($line->numero_compte);
|
||||
if (empty($description)) {
|
||||
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
|
||||
$link = '<a href="../admin/card.php?action=create&accountingaccount=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
|
||||
}
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Permet d'afficher le compte comptable
|
||||
if ($root_account_description != $displayed_account) {
|
||||
|
||||
if (empty($displayed_account) || $root_account_description != $displayed_account)
|
||||
{
|
||||
// Affiche un Sous-Total par compte comptable
|
||||
if ($displayed_account != "") {
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>';
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price(price2num($sous_total_credit - $sous_total_debit)) . '</td>';
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Affiche le compte comptable en d<EFBFBD>but de ligne
|
||||
// Affiche le compte comptable en debut de ligne
|
||||
print "<tr>";
|
||||
print '<td colspan="6" style="font-weight:bold; border-bottom: 1pt solid black;">' . $root_account_description . '</td>';
|
||||
print '<td colspan="6" style="font-weight:bold; border-bottom: 1pt solid black;">' . $line->numero_compte . ($root_account_description ? ' - ' . $root_account_description : '') . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$displayed_account = $root_account_description;
|
||||
@ -289,18 +305,18 @@ else {
|
||||
$sous_total_credit += $line->credit;
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>';
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price(price2num($sous_total_credit - $sous_total_debit)) . '</td>';
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap" align="right">' . price($total_debit) . '</td><td class="nowrap" align="right">' . price($total_credit) . '</td><td class="nowrap" align="right">' . price($total_credit - $total_debit) . '</td>';
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap" align="right">' . price($total_debit) . '</td><td class="nowrap" align="right">' . price($total_credit) . '</td><td class="nowrap" align="right">' . price(price2num($total_credit - $total_debit)) . '</td>';
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
|
||||
print "</table>";
|
||||
print '</form>';
|
||||
|
||||
llxFooter();
|
||||
}
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -26,16 +26,11 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("main");
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("other");
|
||||
$langs->load("accountancy");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("bills","compta","accountancy","other"));
|
||||
|
||||
// Filter
|
||||
$year = GETPOST("year",'int');
|
||||
@ -69,16 +64,29 @@ $result = $db->query($sql);
|
||||
if ($result) {
|
||||
$row = $db->fetch_row($result);
|
||||
$nbfac = $row[0];
|
||||
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
|
||||
$y = $year_current;
|
||||
|
||||
$var = true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width=150>' . $langs->trans("Label") . '</td><td align="center">' . $langs->trans("JanuaryMin") . '</td><td align="center">' . $langs->trans("FebruaryMin") . '</td><td align="center">' . $langs->trans("MarchMin") . '</td><td align="center">' . $langs->trans("AprilMin") . '</td><td align="center">' . $langs->trans("MayMin") . '</td><td align="center">' . $langs->trans("JuneMin") . '</td><td align="center">' . $langs->trans("JulyMin") . '</td><td align="center">' . $langs->trans("AugustMin") . '</td><td align="center">' . $langs->trans("SeptemberMin") . '</td><td align="center">' . $langs->trans("OctoberMin") . '</td><td align="center">' . $langs->trans("NovemberMin") . '</td><td align="center">' . $langs->trans("DecemberMin") . '</td><td align="center"><b>Total</b></td></tr>';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width=150>' . $langs->trans("Label") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("JanuaryMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("FebruaryMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("MarchMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("AprilMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("MayMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("JuneMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("JulyMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("AugustMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("SeptemberMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("OctoberMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("NovemberMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("DecemberMin") . '</td>';
|
||||
print '<td align="center"><strong>Total</strong></td>';
|
||||
print '</tr>';
|
||||
|
||||
$sql = "SELECT bk.numero_compte AS 'compte',";
|
||||
$sql .= " ROUND(SUM(IF(MONTH(bk.doc_date)=1,bk.montant,0)),2) AS 'Janvier',";
|
||||
@ -103,12 +111,12 @@ $resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
|
||||
while ( $i < $num ) {
|
||||
|
||||
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
print '<tr><td width="14%">' . length_accountg($row[0]) . '</td>';
|
||||
|
||||
print '<tr class="oddeven"><td width="14%">' . length_accountg($row[0]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[1]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[2]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[3]) . '</td>';
|
||||
@ -121,9 +129,9 @@ if ($resql) {
|
||||
print '<td align="right" width="6.5%">' . price($row[10]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[11]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[12]) . '</td>';
|
||||
print '<td align="right" width="8%"><b>' . price($row[13]) . '</b></td>';
|
||||
print '<td align="right" width="8%"><strong>' . price($row[13]) . '</strong></td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
$i ++;
|
||||
}
|
||||
$db->free($resql);
|
||||
@ -132,5 +140,6 @@ if ($resql) {
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
$db->close();
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2017 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2017 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -31,10 +32,10 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
|
||||
$langs->load("accountancy");
|
||||
$langs->load("bills");
|
||||
$langs->load("compta");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("accountancy", "bills", "compta"));
|
||||
|
||||
$action = GETPOST('action','aZ09');
|
||||
|
||||
@ -49,12 +50,21 @@ if ($user->societe_id > 0) {
|
||||
|
||||
$mesg = '';
|
||||
|
||||
$account_number = GETPOST('account_number','alphanohtml');
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingjournal = new AccountingJournal($db);
|
||||
|
||||
$accountingaccount_number = GETPOST('accountingaccount_number','alphanohtml');
|
||||
$accountingaccount->fetch(null, $accountingaccount_number, true);
|
||||
$accountingaccount_label = $accountingaccount->label;
|
||||
|
||||
$journal_code = GETPOST('code_journal','alpha');
|
||||
$accountingjournal->fetch(null, $journal_code);
|
||||
$journal_label = $accountingjournal->label;
|
||||
|
||||
$subledger_account = GETPOST('subledger_account','alphanohtml');
|
||||
if ($subledger_account == - 1) {
|
||||
$subledger_account = null;
|
||||
}
|
||||
$label_compte = GETPOST('label_compte','alphanohtml');
|
||||
$label_operation= GETPOST('label_operation','alphanohtml');
|
||||
$debit = price2num(GETPOST('debit','alpha'));
|
||||
$credit = price2num(GETPOST('credit','alpha'));
|
||||
@ -80,7 +90,7 @@ if ($action == "confirm_update") {
|
||||
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
||||
$action='update';
|
||||
}
|
||||
if (empty($account_number) || $account_number == '-1')
|
||||
if (empty($accountingaccount_number) || $accountingaccount_number == '-1')
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("AccountAccountingShort")), null, 'errors');
|
||||
@ -89,36 +99,36 @@ if ($action == "confirm_update") {
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$book = new BookKeeping($db);
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
$result = $book->fetch($id, null, $mode);
|
||||
$result = $object->fetch($id, null, $mode);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
$book->numero_compte = $account_number;
|
||||
$book->subledger_account = $subledger_account;
|
||||
$book->label_compte = $label_compte;
|
||||
$book->label_operation= $label_operation;
|
||||
$book->debit = $debit;
|
||||
$book->credit = $credit;
|
||||
$object->numero_compte = $accountingaccount_number;
|
||||
$object->subledger_account = $subledger_account;
|
||||
$object->label_compte = $accountingaccount_label;
|
||||
$object->label_operation= $label_operation;
|
||||
$object->debit = $debit;
|
||||
$object->credit = $credit;
|
||||
|
||||
if (floatval($debit) != 0.0) {
|
||||
$book->montant = $debit;
|
||||
$book->sens = 'D';
|
||||
$object->montant = $debit;
|
||||
$object->sens = 'D';
|
||||
}
|
||||
if (floatval($credit) != 0.0) {
|
||||
$book->montant = $credit;
|
||||
$book->sens = 'C';
|
||||
$object->montant = $credit;
|
||||
$object->sens = 'C';
|
||||
}
|
||||
|
||||
$result = $book->update($user, false, $mode);
|
||||
$result = $object->update($user, false, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
if ($mode != '_tmp')
|
||||
{
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
||||
}
|
||||
|
||||
$debit = 0;
|
||||
@ -139,7 +149,7 @@ else if ($action == "add") {
|
||||
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
||||
$action='';
|
||||
}
|
||||
if (empty($account_number) || $account_number == '-1')
|
||||
if (empty($accountingaccount_number) || $accountingaccount_number == '-1')
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("AccountAccountingShort")), null, 'errors');
|
||||
@ -147,39 +157,40 @@ else if ($action == "add") {
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
$book = new BookKeeping($db);
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
$book->numero_compte = $account_number;
|
||||
$book->subledger_account = $subledger_account;
|
||||
$book->label_compte = $label_compte;
|
||||
$book->label_operation= $label_operation;
|
||||
$book->debit = $debit;
|
||||
$book->credit = $credit;
|
||||
$book->doc_date = GETPOST('doc_date','alpha');
|
||||
$book->doc_type = GETPOST('doc_type','alpha');
|
||||
$book->piece_num = $piece_num;
|
||||
$book->doc_ref = GETPOST('doc_ref','alpha');
|
||||
$book->code_journal = GETPOST('code_journal','alpha');
|
||||
$book->fk_doc = GETPOST('fk_doc','alpha');
|
||||
$book->fk_docdet = GETPOST('fk_docdet','alpha');
|
||||
$object->numero_compte = $accountingaccount_number;
|
||||
$object->subledger_account = $subledger_account;
|
||||
$object->label_compte = $accountingaccount_label;
|
||||
$object->label_operation= $label_operation;
|
||||
$object->debit = $debit;
|
||||
$object->credit = $credit;
|
||||
$object->doc_date = GETPOST('doc_date','alpha');
|
||||
$object->doc_type = GETPOST('doc_type','alpha');
|
||||
$object->piece_num = $piece_num;
|
||||
$object->doc_ref = GETPOST('doc_ref','alpha');
|
||||
$object->code_journal = $journal_code;
|
||||
$object->journal_label = $journal_label;
|
||||
$object->fk_doc = GETPOST('fk_doc','alpha');
|
||||
$object->fk_docdet = GETPOST('fk_docdet','alpha');
|
||||
|
||||
if (floatval($debit) != 0.0) {
|
||||
$book->montant = $debit;
|
||||
$book->sens = 'D';
|
||||
$object->montant = $debit;
|
||||
$object->sens = 'D';
|
||||
}
|
||||
|
||||
if (floatval($credit) != 0.0) {
|
||||
$book->montant = $credit;
|
||||
$book->sens = 'C';
|
||||
$object->montant = $credit;
|
||||
$object->sens = 'C';
|
||||
}
|
||||
|
||||
$result = $book->createStd($user, false, $mode);
|
||||
$result = $object->createStd($user, false, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
if ($mode != '_tmp')
|
||||
{
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
||||
}
|
||||
|
||||
$debit = 0;
|
||||
@ -191,17 +202,17 @@ else if ($action == "add") {
|
||||
}
|
||||
|
||||
else if ($action == "confirm_delete") {
|
||||
$book = new BookKeeping($db);
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
$result = $book->fetch($id, null, $mode);
|
||||
$piece_num = $book->piece_num;
|
||||
$result = $object->fetch($id, null, $mode);
|
||||
$piece_num = $object->piece_num;
|
||||
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
$result = $book->delete($user, false, $mode);
|
||||
$result = $object->delete($user, false, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
$action = '';
|
||||
@ -210,14 +221,14 @@ else if ($action == "confirm_delete") {
|
||||
else if ($action == "confirm_create") {
|
||||
$error = 0;
|
||||
|
||||
$book = new BookKeeping($db);
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
if (! GETPOST('code_journal','alpha') || GETPOST('code_journal','alpha') == '-1') {
|
||||
if (! $journal_code || $journal_code == '-1') {
|
||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Journal")), null, 'errors');
|
||||
$action='create';
|
||||
$error++;
|
||||
}
|
||||
if (! GETPOST('next_num_mvt'))
|
||||
if (! GETPOST('next_num_mvt', 'alpha'))
|
||||
{
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumPiece")), null, 'errors');
|
||||
$error++;
|
||||
@ -225,56 +236,57 @@ else if ($action == "confirm_create") {
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$book->label_compte = '';
|
||||
$book->debit = 0;
|
||||
$book->credit = 0;
|
||||
$book->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOST('doc_datemonth','int'), GETPOST('doc_dateday','int'), GETPOST('doc_dateyear','int'));
|
||||
$book->doc_type = GETPOST('doc_type','alpha');
|
||||
$book->piece_num = GETPOST('next_num_mvt','alpha');
|
||||
$book->doc_ref = GETPOST('doc_ref','alpha');
|
||||
$book->code_journal = GETPOST('code_journal','alpha');
|
||||
$book->fk_doc = 0;
|
||||
$book->fk_docdet = 0;
|
||||
$book->montant = 0;
|
||||
$object->label_compte = '';
|
||||
$object->debit = 0;
|
||||
$object->credit = 0;
|
||||
$object->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOST('doc_datemonth','int'), GETPOST('doc_dateday','int'), GETPOST('doc_dateyear','int'));
|
||||
$object->doc_type = GETPOST('doc_type','alpha');
|
||||
$object->piece_num = GETPOST('next_num_mvt','alpha');
|
||||
$object->doc_ref = GETPOST('doc_ref','alpha');
|
||||
$object->code_journal = $journal_code;
|
||||
$object->journal_label = $journal_label;
|
||||
$object->fk_doc = 0;
|
||||
$object->fk_docdet = 0;
|
||||
$object->montant = 0;
|
||||
|
||||
$result = $book->createStd($user,0, $mode);
|
||||
$result = $object->createStd($user,0, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
if ($mode != '_tmp')
|
||||
{
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
||||
}
|
||||
$action = 'update';
|
||||
$id=$book->id;
|
||||
$piece_num = $book->piece_num;
|
||||
$id=$object->id;
|
||||
$piece_num = $object->piece_num;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'setdate') {
|
||||
$datedoc = dol_mktime(0, 0, 0, GETPOST('doc_datemonth'), GETPOST('doc_dateday'), GETPOST('doc_dateyear'));
|
||||
$datedoc = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
||||
$result = $object->updateByMvt($piece_num,'doc_date',$db->idate($datedoc),$mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
if ($mode != '_tmp')
|
||||
{
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
||||
}
|
||||
$action = '';
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'setjournal') {
|
||||
$journaldoc = trim(GETPOST('code_journal','alpha'));
|
||||
$result = $object->updateByMvt($piece_num, 'code_journal', $journaldoc, $mode);
|
||||
$result = $object->updateByMvt($piece_num, 'code_journal', $journal_code, $mode);
|
||||
$result = $object->updateByMvt($piece_num, 'journal_label', $journal_label, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
if ($mode != '_tmp')
|
||||
{
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
||||
}
|
||||
$action = '';
|
||||
}
|
||||
@ -288,7 +300,7 @@ if ($action == 'setdocref') {
|
||||
} else {
|
||||
if ($mode != '_tmp')
|
||||
{
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
||||
}
|
||||
$action = '';
|
||||
}
|
||||
@ -312,7 +324,6 @@ if ($action == 'valid') {
|
||||
|
||||
$html = new Form($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
$accountjournal = new AccountingJournal($db);
|
||||
|
||||
llxHeader('', $langs->trans("CreateMvts"));
|
||||
|
||||
@ -326,8 +337,8 @@ if ($action == 'create')
|
||||
{
|
||||
print load_fiche_titre($langs->trans("CreateMvts"));
|
||||
|
||||
$book = new BookKeeping($db);
|
||||
$next_num_mvt = $book->getNextNumMvt('_tmp');
|
||||
$object = new BookKeeping($db);
|
||||
$next_num_mvt = $object->getNextNumMvt('_tmp');
|
||||
|
||||
if (empty($next_num_mvt))
|
||||
{
|
||||
@ -351,17 +362,17 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td class="titlefieldcreate fieldrequired">' . $langs->trans("Docdate") . '</td>';
|
||||
print '<td>';
|
||||
print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1);
|
||||
print $html->selectDate('', 'doc_date', '', '', '', "create_mvt", 1, 1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">' . $langs->trans("Codejournal") . '</td>';
|
||||
print '<td>' . $formaccounting->select_journal(GETPOST('code_journal'),'code_journal',0,1,array(),1,1) . '</td>';
|
||||
print '<td>' . $formaccounting->select_journal($journal_code,'code_journal',0,0,1,1) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr>';
|
||||
print '<td>' . $langs->trans("Docref") . '</td>';
|
||||
print '<td>' . $langs->trans("Piece") . '</td>';
|
||||
print '<td><input type="text" class="minwidth200" name="doc_ref" value=""/></td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -384,13 +395,13 @@ if ($action == 'create')
|
||||
|
||||
print '</form>';
|
||||
} else {
|
||||
$book = new BookKeeping($db);
|
||||
$result = $book->fetchPerMvt($piece_num, $mode);
|
||||
$object = new BookKeeping($db);
|
||||
$result = $object->fetchPerMvt($piece_num, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
if (! empty($book->piece_num))
|
||||
if (! empty($object->piece_num))
|
||||
{
|
||||
$backlink = '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?restore_lastsearch_values=1">' . $langs->trans('BackToList') . '</a>';
|
||||
|
||||
@ -398,14 +409,14 @@ if ($action == 'create')
|
||||
|
||||
$head=array();
|
||||
$h=0;
|
||||
$head[$h][0] = $_SERVER['PHP_SELF'].'?piece_num='.$book->piece_num.($mode?'&mode='.$mode:'');
|
||||
$head[$h][0] = $_SERVER['PHP_SELF'].'?piece_num='.$object->piece_num.($mode?'&mode='.$mode:'');
|
||||
$head[$h][1] = $langs->trans("Transaction");
|
||||
$head[$h][2] = 'transaction';
|
||||
$h++;
|
||||
|
||||
dol_fiche_head($head, 'transaction', '', -1);
|
||||
|
||||
//dol_banner_tab($book, '', $backlink);
|
||||
//dol_banner_tab($object, '', $backlink);
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
@ -416,7 +427,7 @@ if ($action == 'create')
|
||||
// Account movement
|
||||
print '<tr>';
|
||||
print '<td class="titlefield">' . $langs->trans("NumMvts") . '</td>';
|
||||
print '<td>' . $book->piece_num . '</td>';
|
||||
print '<td>' . $object->piece_num . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Date
|
||||
@ -425,19 +436,19 @@ if ($action == 'create')
|
||||
print $langs->trans('Docdate');
|
||||
print '</td>';
|
||||
if ($action != 'editdate')
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?action=editdate&piece_num='. $book->piece_num .'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('SetDate'),1).'</a></td>';
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdate&piece_num='. $object->piece_num .'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('SetDate'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editdate') {
|
||||
print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
|
||||
print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $object->piece_num . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="setdate">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
$form->select_date($book->doc_date ? $book->doc_date : - 1, 'doc_date', '', '', '', "setdate");
|
||||
print $form->selectDate($object->doc_date ? $object->doc_date : - 1, 'doc_date', '', '', '', "setdate");
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $book->doc_date ? dol_print_date($book->doc_date, 'day') : ' ';
|
||||
print $object->doc_date ? dol_print_date($object->doc_date, 'day') : ' ';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -448,19 +459,19 @@ if ($action == 'create')
|
||||
print $langs->trans('Codejournal');
|
||||
print '</td>';
|
||||
if ($action != 'editjournal')
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?action=editjournal&piece_num='.$book->piece_num.'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</a></td>';
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editjournal&piece_num='.$object->piece_num.'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editjournal') {
|
||||
print '<form name="setjournal" action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
|
||||
print '<form name="setjournal" action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $object->piece_num . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="setjournal">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print $formaccounting->select_journal($book->code_journal,'code_journal',0,0,array(),1,1);
|
||||
print $formaccounting->select_journal($object->code_journal,'code_journal',0,0,array(),1,1);
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $book->code_journal ;
|
||||
print $object->code_journal ;
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -468,22 +479,22 @@ if ($action == 'create')
|
||||
// Ref document
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Docref');
|
||||
print $langs->trans('Piece');
|
||||
print '</td>';
|
||||
if ($action != 'editdocref')
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?action=editdocref&piece_num='.$book->piece_num.'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</a></td>';
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdocref&piece_num='.$object->piece_num.'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editdocref') {
|
||||
print '<form name="setdocref" action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
|
||||
print '<form name="setdocref" action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $object->piece_num . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="setdocref">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print '<input type="text" size="20" name="doc_ref" value="'.dol_escape_htmltag($book->doc_ref).'">';
|
||||
print '<input type="text" size="20" name="doc_ref" value="'.dol_escape_htmltag($object->doc_ref).'">';
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $book->doc_ref ;
|
||||
print $object->doc_ref ;
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -498,11 +509,11 @@ if ($action == 'create')
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Doc type
|
||||
if(! empty($book->doc_type))
|
||||
if(! empty($object->doc_type))
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td class="titlefield">' . $langs->trans("Doctype") . '</td>';
|
||||
print '<td>' . $book->doc_type . '</td>';
|
||||
print '<td>' . $object->doc_type . '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -510,7 +521,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td class="titlefield">' . $langs->trans("DateCreation") . '</td>';
|
||||
print '<td>';
|
||||
print $book->date_creation ? dol_print_date($book->date_creation, 'day') : ' ';
|
||||
print $object->date_creation ? dol_print_date($object->date_creation, 'day') : ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -519,7 +530,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td class="titlefield">' . $langs->trans("Status") . '</td>';
|
||||
print '<td>';
|
||||
if (empty($book->validated)) {
|
||||
if (empty($object->validated)) {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $line->rowid . '&action=enable">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
@ -536,11 +547,11 @@ if ($action == 'create')
|
||||
/*
|
||||
print '<tr>';
|
||||
print '<td class="titlefield">' . $langs->trans("Control") . '</td>';
|
||||
if ($book->doc_type == 'customer_invoice')
|
||||
if ($object->doc_type == 'customer_invoice')
|
||||
{
|
||||
$sqlmid = 'SELECT rowid as ref';
|
||||
$sqlmid .= " FROM ".MAIN_DB_PREFIX."facture as fac";
|
||||
$sqlmid .= " WHERE fac.rowid=" . $book->fk_doc;
|
||||
$sqlmid .= " WHERE fac.rowid=" . $object->fk_doc;
|
||||
dol_syslog("accountancy/bookkeeping/card.php::sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
if ($resultmid) {
|
||||
@ -556,31 +567,32 @@ if ($action == 'create')
|
||||
*/
|
||||
print "</table>\n";
|
||||
|
||||
print '</div></div>';
|
||||
print '</div>';
|
||||
print '</div></div><!-ee-->';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div style="clear:both"></div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
$result = $book->fetchAllPerMvt($piece_num, $mode);
|
||||
$result = $object->fetchAllPerMvt($piece_num, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
|
||||
print load_fiche_titre($langs->trans("ListeMvts"), '', '');
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
|
||||
print '<input type="hidden" name="doc_date" value="' . $book->doc_date . '">' . "\n";
|
||||
print '<input type="hidden" name="doc_type" value="' . $book->doc_type . '">' . "\n";
|
||||
print '<input type="hidden" name="doc_ref" value="' . $book->doc_ref . '">' . "\n";
|
||||
print '<input type="hidden" name="code_journal" value="' . $book->code_journal . '">' . "\n";
|
||||
print '<input type="hidden" name="fk_doc" value="' . $book->fk_doc . '">' . "\n";
|
||||
print '<input type="hidden" name="fk_docdet" value="' . $book->fk_docdet . '">' . "\n";
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $object->piece_num . '" method="post">';
|
||||
print '<input type="hidden" name="doc_date" value="' . $object->doc_date . '">' . "\n";
|
||||
print '<input type="hidden" name="doc_type" value="' . $object->doc_type . '">' . "\n";
|
||||
print '<input type="hidden" name="doc_ref" value="' . $object->doc_ref . '">' . "\n";
|
||||
print '<input type="hidden" name="code_journal" value="' . $object->code_journal . '">' . "\n";
|
||||
print '<input type="hidden" name="fk_doc" value="' . $object->fk_doc . '">' . "\n";
|
||||
print '<input type="hidden" name="fk_docdet" value="' . $object->fk_docdet . '">' . "\n";
|
||||
print '<input type="hidden" name="mode" value="' . $mode . '">' . "\n";
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
if (count($book->linesmvt) > 0) {
|
||||
if (count($object->linesmvt) > 0) {
|
||||
|
||||
$total_debit = 0;
|
||||
$total_credit = 0;
|
||||
@ -589,7 +601,6 @@ if ($action == 'create')
|
||||
|
||||
print_liste_field_titre("AccountAccountingShort");
|
||||
print_liste_field_titre("SubledgerAccount");
|
||||
print_liste_field_titre("LabelAccount");
|
||||
print_liste_field_titre("LabelOperation");
|
||||
print_liste_field_titre("Debit", "", "", "", "", 'align="right"');
|
||||
print_liste_field_titre("Credit", "", "", "", "", 'align="right"');
|
||||
@ -597,14 +608,14 @@ if ($action == 'create')
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
foreach ($book->linesmvt as $line) {
|
||||
foreach ($object->linesmvt as $line) {
|
||||
print '<tr class="oddeven">';
|
||||
$total_debit += $line->debit;
|
||||
$total_credit += $line->credit;
|
||||
|
||||
if ($action == 'update' && $line->id == $id) {
|
||||
print '<td>';
|
||||
print $formaccounting->select_account($line->numero_compte, 'account_number', 1, array (), 1, 1, '');
|
||||
print $formaccounting->select_account($line->numero_compte, 'accountingaccount_number', 1, array (), 1, 1, '');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
// TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because it does not
|
||||
@ -618,8 +629,7 @@ if ($action == 'create')
|
||||
print '<input type="text" name="subledger_account" value="'.$line->subledger_account.'">';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td><input type="text" class="minwidth100" name="label_compte" value="' . $line->label_compte . '"/></td>';
|
||||
print '<td><input type="text" class="minwidth300" name="label_operation" value="' . $line->label_operation. '"/></td>';
|
||||
print '<td><input type="text" class="minwidth200" name="label_operation" value="' . $line->label_operation. '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="debit" value="' . price($line->debit) . '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="credit" value="' . price($line->credit) . '"/></td>';
|
||||
print '<td>';
|
||||
@ -627,9 +637,9 @@ if ($action == 'create')
|
||||
print '<input type="submit" class="button" name="update" value="' . $langs->trans("Update") . '">';
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
||||
$accountingaccount->fetch(null, $line->numero_compte, true);
|
||||
print '<td>' . $accountingaccount->getNomUrl(0,1,1,'',0) . '</td>';
|
||||
print '<td>' . length_accounta($line->subledger_account) . '</td>';
|
||||
print '<td>' . $line->label_compte . '</td>';
|
||||
print '<td>' . $line->label_operation. '</td>';
|
||||
print '<td align="right">' . price($line->debit) . '</td>';
|
||||
print '<td align="right">' . price($line->credit) . '</td>';
|
||||
@ -656,13 +666,13 @@ if ($action == 'create')
|
||||
|
||||
if ($total_debit != $total_credit)
|
||||
{
|
||||
setEventMessages(null, array($langs->trans('MvtNotCorrectlyBalanced', $total_credit, $total_debit)), 'warnings');
|
||||
setEventMessages(null, array($langs->trans('MvtNotCorrectlyBalanced', $total_debit, $total_credit)), 'warnings');
|
||||
}
|
||||
|
||||
if ($action == "" || $action == 'add') {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account($account_number, 'account_number', 1, array (), 1, 1, '');
|
||||
print $formaccounting->select_account($accountingaccount_number, 'accountingaccount_number', 1, array (), 1, 1, '');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
|
||||
@ -676,10 +686,9 @@ if ($action == 'create')
|
||||
print '<input type="text" name="subledger_account" value="">';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td><input type="text" class="minwidth100" name="label_compte" value=""/></td>';
|
||||
print '<td><input type="text" class="minwidth300" name="label_operation" value=""/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="debit" value="' . ($debit ? price($debit) : '') . '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="credit" value="' . ($credit ? price($credit) : '') . '"/></td>';
|
||||
print '<td><input type="text" class="minwidth200" name="label_operation" value=""/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="debit" value=""/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="credit" value=""/></td>';
|
||||
print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Add") . '"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
@ -692,11 +701,11 @@ if ($action == 'create')
|
||||
print '<div class="center">';
|
||||
if ($total_debit == $total_credit)
|
||||
{
|
||||
print '<a class="button" href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '&action=valid">'.$langs->trans("ValidTransaction").'</a>';
|
||||
print '<a class="button" href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $object->piece_num . '&action=valid">'.$langs->trans("ValidTransaction").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="submit" class="button" disabled="disabled" href="#" title="'.dol_escape_htmltag($langs->trans("MvtNotCorrectlyBalanced", $credit, $debit)).'" value="'.dol_escape_htmltag($langs->trans("ValidTransaction")).'">';
|
||||
print '<input type="submit" class="button" disabled="disabled" href="#" title="'.dol_escape_htmltag($langs->trans("MvtNotCorrectlyBalanced", $debit, $credit)).'" value="'.dol_escape_htmltag($langs->trans("ValidTransaction")).'">';
|
||||
}
|
||||
|
||||
print ' ';
|
||||
@ -713,5 +722,7 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -32,13 +33,13 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("accountancy");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("accountancy"));
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$search_mvt_num = GETPOST('search_mvt_num', 'int');
|
||||
$search_doc_type = GETPOST("search_doc_type");
|
||||
$search_doc_ref = GETPOST("search_doc_ref");
|
||||
$search_doc_type = GETPOST("search_doc_type", 'alpha');
|
||||
$search_doc_ref = GETPOST("search_doc_ref", 'alpha');
|
||||
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
|
||||
$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
|
||||
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
||||
@ -78,6 +79,7 @@ $search_direction = GETPOST('search_direction', 'alpha');
|
||||
$search_debit = GETPOST('search_debit', 'alpha');
|
||||
$search_credit = GETPOST('search_credit', 'alpha');
|
||||
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
|
||||
$search_lettering_code = GETPOST('search_lettering_code', 'alpha');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||
@ -137,11 +139,14 @@ $arrayfields=array(
|
||||
't.label_operation'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
|
||||
't.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1),
|
||||
't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1),
|
||||
't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1),
|
||||
't.code_journal'=>array('label'=>$langs->trans("Codejournal"), 'checked'=>1),
|
||||
't.date_creation'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0),
|
||||
't.tms'=>array('label'=>$langs->trans("DateModification"), 'checked'=>0),
|
||||
);
|
||||
|
||||
if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) unset($arrayfields['t.lettering_code']);
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -175,6 +180,7 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
|
||||
$search_date_modification_end = '';
|
||||
$search_debit = '';
|
||||
$search_credit = '';
|
||||
$search_lettering_code = '';
|
||||
}
|
||||
|
||||
// Must be after the remove filter action, before the export.
|
||||
@ -271,6 +277,11 @@ if (! empty($search_credit)) {
|
||||
$filter['t.credit'] = $search_credit;
|
||||
$param .= '&search_credit=' . urlencode($search_credit);
|
||||
}
|
||||
if (! empty($search_lettering_code)) {
|
||||
$filter['t.lettering_code'] = $search_lettering_code;
|
||||
$param .= '&search_lettering_code=' . urlencode($search_lettering_code);
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'delbookkeeping') {
|
||||
|
||||
@ -335,7 +346,7 @@ if ($action == 'delmouvconfirm') {
|
||||
}
|
||||
}
|
||||
|
||||
// Export into a file with format defined into setup
|
||||
// Export into a file with format defined into setup (FEC, CSV, ...)
|
||||
if ($action == 'export_file') {
|
||||
|
||||
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
|
||||
@ -348,7 +359,9 @@ if ($action == 'export_file') {
|
||||
{
|
||||
$accountancyexport = new AccountancyExport($db);
|
||||
$accountancyexport->export($object->lines);
|
||||
if (!empty($accountancyexport->errors)) {
|
||||
|
||||
if (!empty($accountancyexport->errors))
|
||||
{
|
||||
setEventMessages('', $accountancyexport->errors, 'errors');
|
||||
}
|
||||
exit;
|
||||
@ -437,10 +450,12 @@ else $button.= $langs->trans("ExportList");
|
||||
$button.= '</a>';
|
||||
|
||||
|
||||
$groupby = ' <a class="nohover" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param.'">' . $langs->trans("GroupByAccountAccounting") . '</a>';
|
||||
$addbutton = '<a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a>';
|
||||
$groupby = ' <a class="nohover marginrightonly" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param.'">' . $langs->trans("GroupByAccountAccounting") . '</a>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle">' . $langs->trans("NewAccountingMvt").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby.$addbutton, '', $limit);
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby.$newcardbutton, '', $limit);
|
||||
|
||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
@ -462,11 +477,11 @@ if (! empty($arrayfields['t.doc_date']['checked']))
|
||||
print '<td class="liste_titre center">';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('From') . ' ';
|
||||
print $form->select_date($search_date_start?$search_date_start:-1, 'search_date_start', 0, 0, 1);
|
||||
print $form->selectDate($search_date_start?$search_date_start:-1, 'search_date_start', 0, 0, 1);
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('to') . ' ';
|
||||
print $form->select_date($search_date_end?$search_date_end:-1, 'search_date_end', 0, 0, 1);
|
||||
print $form->selectDate($search_date_end?$search_date_end:-1, 'search_date_end', 0, 0, 1);
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
@ -542,6 +557,13 @@ if (! empty($arrayfields['t.credit']['checked']))
|
||||
print '<input type="text" class="flat" name="search_credit" size="4" value="'.dol_escape_htmltag($search_credit).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Lettering code
|
||||
if (! empty($arrayfields['t.lettering_code']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre center">';
|
||||
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="' . $search_lettering_code . '"/>';
|
||||
print '</td>';
|
||||
}
|
||||
// Code journal
|
||||
if (! empty($arrayfields['t.code_journal']['checked']))
|
||||
{
|
||||
@ -553,11 +575,11 @@ if (! empty($arrayfields['t.date_creation']['checked']))
|
||||
print '<td class="liste_titre center">';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('From') . ' ';
|
||||
print $form->select_date($search_date_creation_start, 'date_creation_start', 0, 0, 1);
|
||||
print $form->selectDate($search_date_creation_start, 'date_creation_start', 0, 0, 1);
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('to') . ' ';
|
||||
print $form->select_date($search_date_creation_end, 'date_creation_end', 0, 0, 1);
|
||||
print $form->selectDate($search_date_creation_end, 'date_creation_end', 0, 0, 1);
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
@ -567,11 +589,11 @@ if (! empty($arrayfields['t.tms']['checked']))
|
||||
print '<td class="liste_titre center">';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('From') . ' ';
|
||||
print $form->select_date($search_date_modification_start, 'date_modification_start', 0, 0, 1);
|
||||
print $form->selectDate($search_date_modification_start, 'date_modification_start', 0, 0, 1);
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('to') . ' ';
|
||||
print $form->select_date($search_date_modification_end, 'date_modification_end', 0, 0, 1);
|
||||
print $form->selectDate($search_date_modification_end, 'date_modification_end', 0, 0, 1);
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
@ -591,6 +613,7 @@ if (! empty($arrayfields['t.subledger_account']['checked'])) print_liste_field_t
|
||||
if (! empty($arrayfields['t.label_operation']['checked'])) print_liste_field_titre($arrayfields['t.label_operation']['label'], $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.debit']['checked'])) print_liste_field_titre($arrayfields['t.debit']['label'], $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.credit']['checked'])) print_liste_field_titre($arrayfields['t.credit']['label'], $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.lettering_code']['checked'])) print_liste_field_titre($arrayfields['t.lettering_code']['label'], $_SERVER['PHP_SELF'], "t.lettering_code", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.code_journal']['checked'])) print_liste_field_titre($arrayfields['t.code_journal']['label'], $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.date_creation']['checked'])) print_liste_field_titre($arrayfields['t.date_creation']['label'], $_SERVER['PHP_SELF'], "t.date_creation", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.tms']['checked'])) print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER['PHP_SELF'], "t.tms", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
@ -618,7 +641,6 @@ if ($num > 0)
|
||||
$object->id = $line->id;
|
||||
$object->piece_num = $line->piece_num;
|
||||
print $object->getNomUrl(1,'',0,'',1);
|
||||
//print '<a href="./card.php?piece_num=' . $line->piece_num . '&save_lastsearch_values=1">' . $line->piece_num . '</a>';
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
@ -676,6 +698,13 @@ if ($num > 0)
|
||||
$totalarray['totalcredit'] += $line->credit;
|
||||
}
|
||||
|
||||
// Lettering code
|
||||
if (! empty($arrayfields['t.lettering_code']['checked']))
|
||||
{
|
||||
print '<td align="center">' . $line->lettering_code . '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Journal code
|
||||
if (! empty($arrayfields['t.code_journal']['checked']))
|
||||
{
|
||||
@ -701,7 +730,7 @@ if ($num > 0)
|
||||
}
|
||||
|
||||
// Action column
|
||||
print '<td align="center">';
|
||||
print '<td align="center" class="nowraponall">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_edit() . '</a> ';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_delete() . '</a>';
|
||||
print '</td>';
|
||||
@ -730,7 +759,6 @@ if ($num > 0)
|
||||
else print '<td></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -739,12 +767,12 @@ print '</div>';
|
||||
|
||||
// TODO Replace this with mass delete action
|
||||
print '<div class="tabsAction tabsActionNoBottom">' . "\n";
|
||||
print '<a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param?'&'.$param:'').'">' . $langs->trans("DelBookKeeping") . '</a>';
|
||||
print '<a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param?'&'.$param:'').'">' . $langs->trans("DeleteMvt") . '</a>';
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
/* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -26,35 +27,39 @@
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("accountancy");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("accountancy"));
|
||||
|
||||
$page = GETPOST("page");
|
||||
$sortorder = GETPOST("sortorder");
|
||||
$sortfield = GETPOST("sortfield");
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int'));
|
||||
$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
|
||||
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
|
||||
$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
|
||||
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
||||
|
||||
|
||||
|
||||
$search_accountancy_code = GETPOST("search_accountancy_code");
|
||||
$search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha');
|
||||
if ($search_accountancy_code_start == - 1) {
|
||||
$search_accountancy_code_start = '';
|
||||
}
|
||||
$search_label_account = GETPOST('search_label_account', 'alpha');
|
||||
$search_mvt_label = GETPOST('search_mvt_label', 'alpha');
|
||||
$search_accountancy_code_end = GETPOST('search_accountancy_code_end', 'alpha');
|
||||
if ($search_accountancy_code_end == - 1) {
|
||||
$search_accountancy_code_end = '';
|
||||
}
|
||||
$search_doc_ref = GETPOST('search_doc_ref', 'alpha');
|
||||
$search_label_operation = GETPOST('search_label_operation', 'alpha');
|
||||
$search_direction = GETPOST('search_direction', 'alpha');
|
||||
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
|
||||
$search_debit = GETPOST('search_debit', 'alpha');
|
||||
$search_credit = GETPOST('search_credit', 'alpha');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||
@ -96,63 +101,86 @@ if (empty($search_date_start) && empty($search_date_end)) {
|
||||
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
|
||||
$options = '';
|
||||
$filter = array ();
|
||||
|
||||
if (! empty($search_date_start)) {
|
||||
$filter['t.doc_date>='] = $search_date_start;
|
||||
$options .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int');
|
||||
}
|
||||
if (! empty($search_date_end)) {
|
||||
$filter['t.doc_date<='] = $search_date_end;
|
||||
$options .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int');
|
||||
}
|
||||
if (! empty($search_doc_date)) {
|
||||
$filter['t.doc_date'] = $search_doc_date;
|
||||
$options .= '&doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&doc_dateday=' . GETPOST('doc_dateday', 'int') . '&doc_dateyear=' . GETPOST('doc_dateyear', 'int');
|
||||
}
|
||||
|
||||
if (! GETPOST('button_removefilter_x','alpha') && ! GETPOST('button_removefilter.x','alpha') && ! GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
if (! empty($search_accountancy_code_start)) {
|
||||
$filter['t.numero_compte'] = $search_accountancy_code_start;
|
||||
$options .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start);
|
||||
}
|
||||
if (! empty($search_label_account)) {
|
||||
$filter['t.label_operation'] = $search_label_account;
|
||||
$options .= '&search_label_account=' . urlencode($search_label_account);
|
||||
}
|
||||
if (! empty($search_mvt_label)) {
|
||||
$filter['t.label_operation'] = $search_mvt_label;
|
||||
$options .= '&search_mvt_label=' . urlencode($search_mvt_label);
|
||||
}
|
||||
if (! empty($search_direction)) {
|
||||
$filter['t.sens'] = $search_direction;
|
||||
$options .= '&search_direction=' . urlencode($search_direction);
|
||||
}
|
||||
if (! empty($search_ledger_code)) {
|
||||
$filter['t.code_journal'] = $search_ledger_code;
|
||||
$options .= '&search_ledger_code=' . urlencode($search_ledger_code);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Action
|
||||
*/
|
||||
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$search_doc_date = '';
|
||||
$search_accountancy_code = '';
|
||||
$search_accountancy_code_start = '';
|
||||
$search_label_account = '';
|
||||
$search_mvt_label = '';
|
||||
$search_accountancy_code_end = '';
|
||||
$search_label_account = '';
|
||||
$search_doc_ref = '';
|
||||
$search_label_operation = '';
|
||||
$search_direction = '';
|
||||
$search_ledger_code = '';
|
||||
$search_date_start='';
|
||||
$search_date_end='';
|
||||
$search_date_startyear='';
|
||||
$search_date_startmonth='';
|
||||
$search_date_startday='';
|
||||
$search_date_endyear='';
|
||||
$search_date_endmonth='';
|
||||
$search_date_endday='';
|
||||
$search_debit = '';
|
||||
$search_credit = '';
|
||||
}
|
||||
|
||||
// Must be after the remove filter action, before the export.
|
||||
$param = '';
|
||||
$filter = array ();
|
||||
|
||||
if (! empty($search_date_start)) {
|
||||
$filter['t.doc_date>='] = $search_date_start;
|
||||
$param .= '&search_date_startmonth=' . GETPOST('search_date_startmonth', 'int') . '&search_date_startday=' . GETPOST('search_date_startday', 'int') . '&search_date_startyear=' . GETPOST('search_date_startyear', 'int');
|
||||
}
|
||||
if (! empty($search_date_end)) {
|
||||
$filter['t.doc_date<='] = $search_date_end;
|
||||
$param .= '&search_date_endmonth=' . GETPOST('search_date_endmonth', 'int') . '&search_date_endday=' . GETPOST('search_date_endday', 'int') . '&search_date_endyear=' . GETPOST('search_date_endyear', 'int');
|
||||
}
|
||||
if (! empty($search_doc_date)) {
|
||||
$filter['t.doc_date'] = $search_doc_date;
|
||||
$param .= '&doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&doc_dateday=' . GETPOST('doc_dateday', 'int') . '&doc_dateyear=' . GETPOST('doc_dateyear', 'int');
|
||||
}
|
||||
if (! empty($search_accountancy_code_start)) {
|
||||
$filter['t.numero_compte>='] = $search_accountancy_code_start;
|
||||
$param .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start);
|
||||
}
|
||||
if (! empty($search_accountancy_code_end)) {
|
||||
$filter['t.numero_compte<='] = $search_accountancy_code_end;
|
||||
$param .= '&search_accountancy_code_end=' . urlencode($search_accountancy_code_end);
|
||||
}
|
||||
if (! empty($search_label_account)) {
|
||||
$filter['t.label_compte'] = $search_label_account;
|
||||
$param .= '&search_label_compte=' . urlencode($search_label_account);
|
||||
}
|
||||
if (! empty($search_doc_ref)) {
|
||||
$filter['t.doc_ref'] = $search_doc_ref;
|
||||
$param .= '&search_doc_ref=' . urlencode($search_doc_ref);
|
||||
}
|
||||
if (! empty($search_label_operation)) {
|
||||
$filter['t.label_operation'] = $search_label_operation;
|
||||
$param .= '&search_label_operation=' . urlencode($search_label_operation);
|
||||
}
|
||||
if (! empty($search_direction)) {
|
||||
$filter['t.sens'] = $search_direction;
|
||||
$param .= '&search_direction=' . urlencode($search_direction);
|
||||
}
|
||||
if (! empty($search_ledger_code)) {
|
||||
$filter['t.code_journal'] = $search_ledger_code;
|
||||
$param .= '&search_ledger_code=' . urlencode($search_ledger_code);
|
||||
}
|
||||
if (! empty($search_debit)) {
|
||||
$filter['t.debit'] = $search_debit;
|
||||
$param .= '&search_debit=' . urlencode($search_debit);
|
||||
}
|
||||
if (! empty($search_credit)) {
|
||||
$filter['t.credit'] = $search_credit;
|
||||
$param .= '&search_credit=' . urlencode($search_credit);
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'delmouvconfirm') {
|
||||
|
||||
$mvt_num = GETPOST('mvt_num', 'int');
|
||||
@ -176,7 +204,7 @@ $formaccounting = new FormAccounting($db);
|
||||
$formother = new FormOther($db);
|
||||
$form = new Form($db);
|
||||
|
||||
$title_page = $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . $langs->trans("AccountAccounting");
|
||||
$title_page = $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . strtolower($langs->trans("AccountAccounting"));
|
||||
|
||||
llxHeader('', $title_page);
|
||||
|
||||
@ -226,41 +254,50 @@ if ($action == 'delbookkeepingyear') {
|
||||
}
|
||||
|
||||
|
||||
$param=$options;
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
|
||||
$viewflat = ' <a class="nohover" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param.'">' . $langs->trans("ViewFlatList") . '</a>';
|
||||
$addbutton = '<a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a>';
|
||||
$viewflat = ' <a class="nohover marginrightonly" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param.'">' . $langs->trans("ViewFlatList") . '</a>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle">' . $langs->trans("NewAccountingMvt").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $viewflat.$addbutton, '', $limit);
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $viewflat.$newcardbutton, '', $limit);
|
||||
|
||||
// Reverse sort order
|
||||
if ( preg_match('/^asc/i', $sortorder) )
|
||||
$sortorder = "asc";
|
||||
$sortorder = "asc";
|
||||
else
|
||||
$sortorder = "desc";
|
||||
$sortorder = "desc";
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">' . $object->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '') . '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('From').' ';
|
||||
print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, 'maxwidth200');
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('to').' ';
|
||||
print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, 'maxwidth200');
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $langs->trans('From') . ': ';
|
||||
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
|
||||
print $form->selectDate($search_date_start, 'search_date_start', 0, 0, 1);
|
||||
print '<br>';
|
||||
print $langs->trans('to') . ': ';
|
||||
print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
|
||||
print $form->selectDate($search_date_end, 'search_date_end', 0, 0, 1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/></td>';
|
||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_account" value="' . $search_label_account . '"/></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
|
||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_doc_ref" value="' . dol_escape_htmltag($search_doc_ref) . '"/></td>';
|
||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_operation" value="' . dol_escape_htmltag($search_label_operation) . '"/></td>';
|
||||
print '<td class="liste_titre" align="right"><input type="text" class="flat" name="search_debit" size="4" value="'.dol_escape_htmltag($search_debit).'"></td>';
|
||||
print '<td class="liste_titre" align="right"><input type="text" class="flat" name="search_credit" size="4" value="'.dol_escape_htmltag($search_credit).'"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" name="search_ledger_code" size="3" value="' . dol_escape_htmltag($search_ledger_code) . '"></td>';
|
||||
print '<td class="liste_titre" align="right" colspan="2">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
@ -268,14 +305,14 @@ print '</td>';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("AccountAccountingShort", $_SERVER['PHP_SELF']);
|
||||
print_liste_field_titre("TransactionNumShort", $_SERVER['PHP_SELF'], "t.piece_num", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Docdate", $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Docref", $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("TransactionNumShort", $_SERVER['PHP_SELF'], "t.piece_num", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Docdate", $_SERVER['PHP_SELF'], "t.doc_date", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Piece", $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label");
|
||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
print '</tr>';
|
||||
@ -295,34 +332,34 @@ while ($i < min($num, $limit))
|
||||
$total_debit += $line->debit;
|
||||
$total_credit += $line->credit;
|
||||
|
||||
$accountg = length_accountg($line->numero_compte);
|
||||
$accountg = length_accountg($line->numero_compte);
|
||||
//if (empty($accountg)) $accountg = '-';
|
||||
|
||||
// Is it a break ?
|
||||
if ($accountg != $displayed_account_number || ! isset($displayed_account_number)) {
|
||||
if ($accountg != $displayed_account_number || ! isset($displayed_account_number)) {
|
||||
|
||||
// Affiche un Sous-Total par compte comptable
|
||||
if (isset($displayed_account_number)) {
|
||||
print '<tr class="liste_total"><td align="right" colspan="5">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
|
||||
print "<td> </td>\n";
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
}
|
||||
// Affiche un Sous-Total par compte comptable
|
||||
if (isset($displayed_account_number)) {
|
||||
print '<tr class="liste_total"><td align="right" colspan="5">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
|
||||
print "<td> </td>\n";
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Show the break account
|
||||
$colspan = 9;
|
||||
print "<tr>";
|
||||
print '<td colspan="'.$colspan.'" style="font-weight:bold; border-bottom: 1pt solid black;">';
|
||||
if (! empty($line->numero_compte) && $line->numero_compte != '-1') print length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte);
|
||||
else print '<span class="error">'.$langs->trans("Unknown").'</span>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
// Show the break account
|
||||
$colspan = 9;
|
||||
print "<tr>";
|
||||
print '<td colspan="'.$colspan.'" style="font-weight:bold; border-bottom: 1pt solid black;">';
|
||||
if (! empty($line->numero_compte) && $line->numero_compte != '-1') print length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte);
|
||||
else print '<span class="error">'.$langs->trans("Unknown").'</span>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$displayed_account_number = $accountg;
|
||||
//if (empty($displayed_account_number)) $displayed_account_number='-';
|
||||
$sous_total_debit = 0;
|
||||
$sous_total_credit = 0;
|
||||
}
|
||||
$displayed_account_number = $accountg;
|
||||
//if (empty($displayed_account_number)) $displayed_account_number='-';
|
||||
$sous_total_debit = 0;
|
||||
$sous_total_credit = 0;
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
@ -331,22 +368,27 @@ while ($i < min($num, $limit))
|
||||
|
||||
// TODO Add a link according to doc_type and fk_doc
|
||||
print '<td class="nowrap">';
|
||||
//if ($line->doc_type == 'supplier_invoice')
|
||||
//if ($line->doc_type == 'customer_invoice')
|
||||
//if ($line->doc_type == 'supplier_invoice')
|
||||
//if ($line->doc_type == 'customer_invoice')
|
||||
print $line->doc_ref;
|
||||
print '</td>';
|
||||
print '</td>';
|
||||
|
||||
// Affiche un lien vers la facture client/fournisseur
|
||||
$doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref);
|
||||
print strlen(length_accounta($line->subledger_account)) == 0 ? '<td>' . $line->label_operation . '</td>' : '<td>' . $line->label_operation . '<br><span style="font-size:0.8em">(' . length_accounta($line->subledger_account) . ')</span></td>';
|
||||
// Affiche un lien vers la facture client/fournisseur
|
||||
$doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref);
|
||||
print strlen(length_accounta($line->subledger_account)) == 0 ? '<td>' . $line->label_operation . '</td>' : '<td>' . $line->label_operation . '<br><span style="font-size:0.8em">(' . length_accounta($line->subledger_account) . ')</span></td>';
|
||||
|
||||
|
||||
print '<td align="right">' . ($line->debit ? price($line->debit) :''). '</td>';
|
||||
print '<td align="right">' . ($line->credit ? price($line->credit) : '') . '</td>';
|
||||
print '<td align="center">' . $line->code_journal . '</td>';
|
||||
|
||||
$accountingjournal = new AccountingJournal($db);
|
||||
$result = $accountingjournal->fetch('',$line->code_journal);
|
||||
$journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0,0,0,'',0) : $line->code_journal);
|
||||
print '<td align="center">' . $journaltoshow . '</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a> ';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $options . '&page=' . $page . '">' . img_delete() . '</a>';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . '">' . img_delete() . '</a>';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -380,5 +422,6 @@ print '</tr>';
|
||||
print "</table>";
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
277
htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php
Normal file
277
htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php
Normal file
@ -0,0 +1,277 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php
|
||||
* \ingroup accountancy
|
||||
* \brief Tab to manage customer lettering
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("compta","accountancy"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$massaction = GETPOST('massaction', 'alpha');
|
||||
$show_files = GETPOST('show_files', 'int');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$page = GETPOST("page", 'int');
|
||||
if (empty($page) || $page == - 1) {
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if ($sortorder == "")
|
||||
$sortorder = "DESC";
|
||||
if ($sortfield == "")
|
||||
$sortfield = "bk.doc_date";
|
||||
|
||||
$search_year = GETPOST("search_year", 'int');
|
||||
$search_doc_type = GETPOST("search_doc_type", 'alpha');
|
||||
$search_doc_ref = GETPOST("search_doc_ref", 'alpha');
|
||||
|
||||
$lettering = GETPOST('lettering', 'alpha');
|
||||
if (! empty($lettering)) {
|
||||
$action = $lettering;
|
||||
}
|
||||
|
||||
// Did we click on purge search criteria ?
|
||||
// All tests are required to be compatible with all browsers
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
|
||||
$search_year = '';
|
||||
$search_doc_type = '';
|
||||
$search_doc_ref = '';
|
||||
}
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST("socid", 'int');
|
||||
// if ($user->societe_id) $socid=$user->societe_id;
|
||||
|
||||
$lettering = new Lettering($db);
|
||||
$object = new Societe($db);
|
||||
$object->id = $socid;
|
||||
$result = $object->fetch($socid);
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Action
|
||||
*/
|
||||
|
||||
if ($action == 'lettering') {
|
||||
|
||||
$result = $lettering->updateLettering($toselect);
|
||||
|
||||
if ($result < 0) {
|
||||
setEventMessages('', $lettering->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'autolettrage') {
|
||||
|
||||
$result = $lettering->letteringThirdparty($socid);
|
||||
|
||||
if ($result < 0) {
|
||||
setEventMessages('', $lettering->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
$title=$object->name." - ".$langs->trans('TabLetteringCustomer');
|
||||
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||
llxHeader('',$title,$help_url);
|
||||
|
||||
$head = societe_prepare_head($object);
|
||||
|
||||
dol_htmloutput_mesg(is_numeric($error) ? '' : $error, $errors, 'error');
|
||||
|
||||
dol_fiche_head($head, 'lettering_customer', $langs->trans("ThirdParty"), 0, 'company');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom', '', '', 0, '', '', 'arearefnobottom');
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<br>';
|
||||
|
||||
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, ";
|
||||
$sql .= " bk.subledger_account, bk.numero_compte , bk.label_compte, bk.debit, ";
|
||||
$sql .= " bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.lettering_code ";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
|
||||
$sql .= " WHERE (bk.subledger_account = '" . $object->code_compta . "' AND bk.numero_compte = '" . $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER . "' )";
|
||||
|
||||
if (dol_strlen($search_year)) {
|
||||
$date_start = dol_mktime(0, 0, 0, 1, 1, $search_year);
|
||||
$date_end = dol_mktime(23, 59, 59, 12, 31, $search_year);
|
||||
$sql .= " AND ( bk.doc_date BETWEEN '" . $db->idate($date_start) . "' AND '" . $db->idate($date_end) . "' )";
|
||||
}
|
||||
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
$debit = 0;
|
||||
$credit = 0;
|
||||
$solde = 0;
|
||||
// Count total nb of records and calc total sum
|
||||
$nbtotalofrecords = '';
|
||||
$resql = $db->query($sql);
|
||||
if (! $resql) {
|
||||
dol_print_error($db);
|
||||
exit();
|
||||
}
|
||||
$nbtotalofrecords = $db->num_rows($resql);
|
||||
|
||||
while ( $obj = $db->fetch_object($resql) ) {
|
||||
$debit += $obj->debit;
|
||||
$credit += $obj->credit;
|
||||
|
||||
$solde += ($obj->credit - $obj->debit);
|
||||
}
|
||||
|
||||
$sql .= $db->plimit($limit + 1, $offset);
|
||||
|
||||
dol_syslog("/accountancy/bookkeeping/thirdparty_lettering_customer.php", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if (! $resql) {
|
||||
dol_print_error($db);
|
||||
exit();
|
||||
}
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
dol_syslog("/accountancy/bookkeeping/thirdparty_lettering_customer.php", LOG_DEBUG);
|
||||
if ($resql) {
|
||||
$i = 0;
|
||||
|
||||
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '" method="POST">';
|
||||
print '<input type="hidden" name="socid" value="' . $object->id . '">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Doctype", $_SERVER["PHP_SELF"], "bk.doc_type", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Docdate", $_SERVER["PHP_SELF"], "bk.doc_date", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Docref", $_SERVER["PHP_SELF"], "bk.doc_ref", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("LabelAccount", $_SERVER["PHP_SELF"], "bk.label_compte", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "bk.debit", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "bk.credit", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Balancing", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Codejournal", $_SERVER["PHP_SELF"], "bk.code_journal", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("LetteringCode", $_SERVER["PHP_SELF"], "bk.lettering_code", "", $param, "", $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td><input type="text" name="search_doc_type" value="' . $search_doc_type . '"></td>';
|
||||
print '<td><input type="text" name="search_year" value="' . $search_year . '"></td>';
|
||||
print '<td><input type="text" name="search_doc_refe" value="' . $search_doc_ref . '"></td>';
|
||||
print '<td colspan="5"> </td>';
|
||||
print '<td align="right">';
|
||||
$searchpicto = $form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$solde = 0;
|
||||
$tmp = '';
|
||||
while ( $obj = $db->fetch_object($resql) ) {
|
||||
|
||||
if ($tmp != $obj->lettering_code || empty($tmp)) $tmp = $obj->lettering_code;
|
||||
/*if ($tmp != $obj->lettering_code || empty($obj->lettering_code))*/ $solde += ($obj->credit - $obj->debit);
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
if (empty($obj->lettering_code)) {
|
||||
print '<td><a href="' . dol_buildpath('/accountancy/bookkeeping/card.php', 1) . '?piece_num=' . $obj->piece_num . '">';
|
||||
print img_edit();
|
||||
print '</a> ' . $obj->doc_type . '</td>' . "\n";
|
||||
} else {
|
||||
print '<td>' . $obj->doc_type . '</td>' . "\n";
|
||||
}
|
||||
|
||||
print '<td>' . dol_print_date($db->jdate($obj->doc_date), 'day') . '</td>';
|
||||
print '<td>' . $obj->doc_ref . '</td>';
|
||||
print '<td>' . $obj->label_compte . '</td>';
|
||||
print '<td align="right">' . price($obj->debit) . '</td>';
|
||||
print '<td align="right">' . price($obj->credit) . '</td>';
|
||||
print '<td align="right">' . price(round($solde, 2)) . '</td>';
|
||||
print '<td align="center">' . $obj->code_journal . '</td>';
|
||||
|
||||
if (empty($obj->lettering_code)) {
|
||||
print '<td class="nowrap" align="center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>';
|
||||
} else
|
||||
print '<td align="center">' . $obj->lettering_code . '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td align="right" colspan="4">'.$langs->trans("Total").':</td>' . "\n";
|
||||
print '<td align="right"><strong>' . price($debit) . '</strong></td>';
|
||||
print '<td align="right"><strong>' . price($credit) . '</strong></td>';
|
||||
print '<td colspan="5"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td align="right" colspan="4">'.$langs->trans("Balancing").':</td>' . "\n";
|
||||
print '<td colspan="2"> </td>';
|
||||
print '<td align="right"><strong>' . price($credit - $debit) . '</strong></td>';
|
||||
print '<td colspan="3"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '<input class="butAction" type="submit" value="lettering" name="lettering" id="lettering">';
|
||||
//print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '&action=autolettering">' . $langs->trans('AccountancyAutoLettering') . '</a>';
|
||||
print "</form>";
|
||||
$db->free($resql);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user