Merge remote-tracking branch 'upstream/3.2' into 3.2
Conflicts: htdocs/core/class/conf.class.php
This commit is contained in:
commit
6e291ad70f
@ -4,7 +4,7 @@ English Dolibarr ChangeLog
|
||||
|
||||
***** ChangeLog for 3.2 compared to 3.1 *****
|
||||
WARNING: PHP lower than 5.x are no more supported.
|
||||
WARNING: Because of a major datastructure change onto supplier prices tabkes, be aware
|
||||
WARNING: Because of a major datastructure change onto supplier prices tables, be aware
|
||||
to make a backup of your database before making upgrade.
|
||||
|
||||
For users:
|
||||
|
||||
@ -9,13 +9,12 @@ Build-Depends: debhelper (>= 7), po-debconf, dpatch
|
||||
Package: dolibarr
|
||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||
php5-mysql | php5-mysqli,
|
||||
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip, php-fpdf,
|
||||
libphp-adodb,
|
||||
libfpdi-php,
|
||||
libfpdf-tpl-php,
|
||||
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip,
|
||||
php-fpdf,
|
||||
libphp-adodb,
|
||||
libnusoap-php,
|
||||
libphp-pclzip,
|
||||
libjs-jquery, libjs-jquery-ui, libjs-flot, ckeditor,
|
||||
libjs-jquery, libjs-jquery-ui, ckeditor,
|
||||
ttf-dejavu-core,
|
||||
xdg-utils,
|
||||
mysql-server,
|
||||
|
||||
@ -6,11 +6,10 @@ Installed-Size: 61200
|
||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||
php5-mysql | php5-mysqli,
|
||||
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip,
|
||||
libphp-adodb,
|
||||
libnusoap-php,
|
||||
libphp-pclzip,
|
||||
libfpdi-php,
|
||||
libfpdf-tpl-php,
|
||||
ckeditor,
|
||||
libjs-jquery, libjs-jquery-ui, ckeditor,
|
||||
ttf-dejavu-core,
|
||||
xdg-utils,
|
||||
mysql-server
|
||||
|
||||
@ -83,8 +83,9 @@ case "$1" in
|
||||
chown -R root:www-data $installconfig
|
||||
chmod -R 660 $installconfig
|
||||
|
||||
if [ ! -s $config ]
|
||||
then
|
||||
# If a conf already exists and its content was already completed by installer
|
||||
if [ ! -s $config ] || ! grep -q "File generated by" $config
|
||||
then
|
||||
# Create an empty conf.php with permission to web server
|
||||
echo Create empty file $config
|
||||
touch $config
|
||||
@ -93,17 +94,17 @@ case "$1" in
|
||||
else
|
||||
# File already exist. We add params not found.
|
||||
echo Add new params to overwrite path to use shared libraries/fonts
|
||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_UI" $config || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||
fi
|
||||
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
#set -e
|
||||
set +e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postrm> `remove'
|
||||
|
||||
@ -27,7 +27,7 @@ $force_install_lockinstall='444';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
|
||||
//$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
|
||||
$force_dolibarr_lib_GEOIP_PATH='';
|
||||
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
@ -36,7 +36,7 @@ $force_dolibarr_lib_TCPDF_PATH='';
|
||||
$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
||||
$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf';
|
||||
|
||||
?>
|
||||
@ -93,17 +93,18 @@ clean:
|
||||
# clean from all embedded libraries (we use package dependencies instead)
|
||||
rm -fr htdocs/includes/adodbtime
|
||||
rm -fr htdocs/includes/ckeditor
|
||||
rm -fr htdocs/includes/fpdfi
|
||||
# rm -fr htdocs/includes/fpdfi
|
||||
rm -fr htdocs/includes/fonts
|
||||
rm -fr htdocs/includes/geoip
|
||||
rm -fr htdocs/includes/nusoap
|
||||
rm -fr htdocs/includes/odtphp/zip/pclzip
|
||||
rm -fr htdocs/includes/jquery/css
|
||||
rm -fr htdocs/includes/jquery/js
|
||||
rm -fr htdocs/includes/jquery/plugins/flot
|
||||
# rm -fr htdocs/includes/jquery/plugins/flot
|
||||
rm -fr htdocs/includes/jquery/plugins/jstree
|
||||
rm -fr htdocs/includes/jquery/plugins/lightbox
|
||||
rm -fr htdocs/includes/jquery/plugins/mobile
|
||||
rm -fr htdocs/includes/jquery/plugins/multiselect
|
||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF
|
||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip
|
||||
rm -fr htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33
|
||||
|
||||
@ -217,6 +217,26 @@ echo Create document directory $docdir
|
||||
# Set correct owner on config files
|
||||
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||
|
||||
# If a conf already exists and its content was already completed by installer
|
||||
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||
if [ -s $config ] && grep -q "File generated by" $config
|
||||
then
|
||||
# File already exist. We add params not found.
|
||||
echo Add new params to overwrite path to use shared libraries/fonts
|
||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||
fi
|
||||
|
||||
# Create config for se $seconfig
|
||||
echo Add SE Linux permissions for dolibarr
|
||||
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
||||
@ -292,5 +312,5 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Mar 4 2012 Laurent Destailleur 3.2.0-0.1.a
|
||||
* Wed Mar 4 2012 Laurent Destailleur 3.2.0-0.2.beta1
|
||||
- Initial version (#723326)
|
||||
|
||||
@ -254,6 +254,26 @@ fi
|
||||
# Set correct owner on config files
|
||||
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||
|
||||
# If a conf already exists and its content was already completed by installer
|
||||
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||
if [ -s $config ] && grep -q "File generated by" $config
|
||||
then
|
||||
# File already exist. We add params not found.
|
||||
echo Add new params to overwrite path to use shared libraries/fonts
|
||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||
fi
|
||||
|
||||
# Create config for se $seconfig
|
||||
if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
|
||||
echo Add SE Linux permissions for dolibarr
|
||||
@ -348,5 +368,5 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Mar 4 2012 Laurent Destailleur 3.2.0-0.1.a
|
||||
* Wed Mar 4 2012 Laurent Destailleur 3.2.0-0.2.beta1
|
||||
- Initial version (#723326)
|
||||
|
||||
@ -214,6 +214,26 @@ echo Create document directory $docdir
|
||||
# Set correct owner on config files
|
||||
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||
|
||||
# If a conf already exists and its content was already completed by installer
|
||||
export confcomplete=`grep -c "File generated by" %{_sysconfdir}/dolibarr/conf.php 2>/dev/null`
|
||||
if [ -s %{_sysconfdir}/dolibarr/conf.php -a "x$confcomplete" != "x0" ]
|
||||
then
|
||||
# File already exist. We add params not found.
|
||||
echo Add new params to overwrite path to use shared libraries/fonts
|
||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/TTF/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||
fi
|
||||
|
||||
# Create a config link dolibarr.conf
|
||||
if [ ! -L $apachelink ]; then
|
||||
echo Create dolibarr web server config link $apachelink
|
||||
@ -281,5 +301,5 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Mar 4 2012 Laurent Destailleur 3.2.0-0.1.a
|
||||
* Wed Mar 4 2012 Laurent Destailleur 3.2.0-0.2.beta1
|
||||
- Initial version (#723326)
|
||||
|
||||
@ -219,6 +219,26 @@ echo Create document directory $docdir
|
||||
# Set correct owner on config files
|
||||
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||
|
||||
# If a conf already exists and its content was already completed by installer
|
||||
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||
if [ -s $config ] && grep -q "File generated by" $config
|
||||
then
|
||||
# File already exist. We add params not found.
|
||||
echo Add new params to overwrite path to use shared libraries/fonts
|
||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||
fi
|
||||
|
||||
# Create a config link dolibarr.conf
|
||||
if [ ! -L $apachelink ]; then
|
||||
echo Create dolibarr web server config link $apachelink
|
||||
@ -286,5 +306,5 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Mar 4 2012 Laurent Destailleur 3.2.0-0.1.a
|
||||
* Wed Mar 4 2012 Laurent Destailleur 3.2.0-0.2.beta1
|
||||
- Initial version (#723326)
|
||||
|
||||
@ -30,6 +30,6 @@ $force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype';
|
||||
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf';
|
||||
|
||||
?>
|
||||
@ -11,7 +11,7 @@
|
||||
#------------------------------------------------------
|
||||
|
||||
|
||||
export dumpfile="mysqldump_dolibarr_3.1.0.sql"
|
||||
export dumpfile=`ls mysqldump_dolibarr_*.sql | sort | tail -n 1`
|
||||
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
|
||||
if [ "x$mydir" = "x" ]
|
||||
then
|
||||
|
||||
6200
dev/initdata/mysqldump_dolibarr_3.2.0.sql
Normal file
6200
dev/initdata/mysqldump_dolibarr_3.2.0.sql
Normal file
File diff suppressed because one or more lines are too long
@ -39,8 +39,12 @@ $langs->load("users");
|
||||
$langs->load("mails");
|
||||
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$rowid=GETPOST('rowid','int');
|
||||
$typeid=GETPOST('typeid','int');
|
||||
|
||||
// Security check
|
||||
if (! $user->rights->adherent->cotisation->lire) accessforbidden();
|
||||
$result=restrictedArea($user,'adherent',$rowid);
|
||||
|
||||
$object = new Adherent($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
@ -50,10 +54,6 @@ $errmsg='';
|
||||
$defaultdelay=1;
|
||||
$defaultdelayunit='y';
|
||||
|
||||
$action=GETPOST('action');
|
||||
$rowid=GETPOST('rowid');
|
||||
$typeid=GETPOST('typeid');
|
||||
|
||||
if ($rowid)
|
||||
{
|
||||
// Load member
|
||||
|
||||
@ -968,7 +968,7 @@ class Adherent extends CommonObject
|
||||
*/
|
||||
function fetch($rowid,$ref='',$fk_soc='')
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $langs;
|
||||
|
||||
$sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.adresse as address, d.cp as zip, d.ville as town, d.note,";
|
||||
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
|
||||
@ -989,10 +989,12 @@ class Adherent extends CommonObject
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as dep ON d.fk_departement = dep.rowid";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON d.rowid = u.fk_member";
|
||||
$sql.= " WHERE d.fk_adherent_type = t.rowid";
|
||||
$sql.= " AND d.entity = ".$conf->entity;
|
||||
if ($ref) $sql.= " AND d.rowid='".$ref."'";
|
||||
elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'";
|
||||
else $sql.= " AND d.rowid=".$rowid;
|
||||
if ($rowid) $sql.= " AND d.rowid=".$rowid;
|
||||
elseif ($ref || $fk_soc) {
|
||||
$sql.= " AND d.entity IN (".getEntity().")";
|
||||
if ($ref) $sql.= " AND d.rowid='".$ref."'";
|
||||
elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'";
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::fetch sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -31,18 +31,21 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
|
||||
|
||||
$langs->load("members");
|
||||
$langs->load("companies");
|
||||
$langs->load('other');
|
||||
|
||||
|
||||
$id=GETPOST('id','int');
|
||||
$action=GETPOST('action','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$mesg = "";
|
||||
|
||||
// Security check
|
||||
$id = GETPOST('id','int');
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$id = $user->societe_id;
|
||||
}
|
||||
//$result = restrictedArea($user, 'societe', $id);
|
||||
$result=restrictedArea($user,'adherent',$id);
|
||||
|
||||
// Get parameters
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
@ -65,7 +68,7 @@ $upload_dir = $conf->adherent->dir_output . "/" . get_exdir($id,2,0,1) . '/' . $
|
||||
*/
|
||||
|
||||
// Envoie fichier
|
||||
if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||
|
||||
@ -96,7 +99,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
}
|
||||
|
||||
// Suppression fichier
|
||||
if ($_REQUEST['action'] == 'confirm_deletefile' && $_REQUEST['confirm'] == 'yes')
|
||||
if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||
{
|
||||
$file = $upload_dir . "/" . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||
dol_delete_file($file);
|
||||
@ -197,21 +200,21 @@ if ($id > 0)
|
||||
/*
|
||||
* Confirmation suppression fichier
|
||||
*/
|
||||
if ($_GET['action'] == 'delete')
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$member->id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
|
||||
// Affiche formulaire upload
|
||||
$formfile=new FormFile($db);
|
||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/adherents/document.php?id='.$id,'',0,0,$user->rights->adherent->creer);
|
||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/adherents/document.php?id='.$member->id,'',0,0,$user->rights->adherent->creer);
|
||||
|
||||
|
||||
// List of document
|
||||
$param='&socid='.$societe->id;
|
||||
$formfile->list_of_documents($filearray,$member,'member',$param, 0, get_exdir($id,2,0,1).'/'.$id.'/');
|
||||
$formfile->list_of_documents($filearray,$member,'member',$param, 0, get_exdir($member->id,2,0,1).'/'.$member->id.'/');
|
||||
|
||||
print "<br><br>";
|
||||
}
|
||||
@ -226,9 +229,7 @@ else
|
||||
print $langs->trans("ErrorRecordNotFound");
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@ -41,21 +41,22 @@ $langs->load("bills");
|
||||
$langs->load("members");
|
||||
$langs->load("users");
|
||||
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$rowid=GETPOST('rowid','int');
|
||||
$typeid=GETPOST('typeid','int');
|
||||
$userid=GETPOST('userid','int');
|
||||
$socid=GETPOST('socid','int');
|
||||
|
||||
// Security check
|
||||
if (! $user->rights->adherent->lire) accessforbidden();
|
||||
$result=restrictedArea($user,'adherent',$rowid);
|
||||
|
||||
$object = new Adherent($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
$errmsg=''; $errmsgs=array();
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$rowid=GETPOST('rowid','int');
|
||||
$typeid=GETPOST('typeid','int');
|
||||
$userid=GETPOST('userid','int');
|
||||
$socid=GETPOST('socid','int');
|
||||
|
||||
if ($rowid > 0)
|
||||
{
|
||||
// Load member
|
||||
@ -67,16 +68,12 @@ if ($rowid > 0)
|
||||
if ($object->user_id)
|
||||
{
|
||||
// $user est le user qui edite, $object->user_id est l'id de l'utilisateur lies au membre edite
|
||||
$caneditfielduser=( (($user->id == $object->user_id) && $user->rights->user->self->creer)
|
||||
|| (($user->id != $object->user_id) && $user->rights->user->user->creer) );
|
||||
$caneditpassworduser=( (($user->id == $object->user_id) && $user->rights->user->self->password)
|
||||
|| (($user->id != $adh->user_id) && $user->rights->user->user->password) );
|
||||
$caneditfielduser=((($user->id == $object->user_id) && $user->rights->user->self->creer)
|
||||
|| (($user->id != $object->user_id) && $user->rights->user->user->creer));
|
||||
$caneditpassworduser=((($user->id == $object->user_id) && $user->rights->user->self->password)
|
||||
|| (($user->id != $object->user_id) && $user->rights->user->user->password));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
// Define variables to know what current user can do on members
|
||||
$canaddmember=$user->rights->adherent->creer;
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.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
|
||||
@ -59,7 +60,10 @@ $AdherentType=array();
|
||||
$sql = "SELECT t.rowid, t.libelle, t.cotisation,";
|
||||
$sql.= " d.statut, count(d.rowid) as somme";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d ON t.rowid = d.fk_adherent_type";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d";
|
||||
$sql.= " ON t.rowid = d.fk_adherent_type";
|
||||
$sql.= " AND d.entity IN (".getEntity().")";
|
||||
$sql.= " WHERE t.entity IN (".getEntity().")";
|
||||
$sql.= " GROUP BY t.rowid, t.libelle, t.cotisation, d.statut";
|
||||
|
||||
dol_syslog("index.php::select nb of members by type sql=".$sql, LOG_DEBUG);
|
||||
@ -94,8 +98,9 @@ $now=dol_now();
|
||||
// old rule: uptodate = if type does not need payment, that end date is null, if type need payment that end date is in future)
|
||||
$sql = "SELECT count(*) as somme , d.fk_adherent_type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
||||
//$sql.= " WHERE d.statut = 1 AND ((t.cotisation = 0 AND d.datefin IS NULL) OR d.datefin >= ".$db->idate($now).')';
|
||||
$sql.= " WHERE d.statut = 1 AND d.datefin >= ".$db->idate($now);
|
||||
$sql.= " WHERE d.entity IN (".getEntity().")";
|
||||
//$sql.= " AND d.statut = 1 AND ((t.cotisation = 0 AND d.datefin IS NULL) OR d.datefin >= ".$db->idate($now).')';
|
||||
$sql.= " AND d.statut = 1 AND d.datefin >= ".$db->idate($now);
|
||||
$sql.= " AND t.rowid = d.fk_adherent_type";
|
||||
$sql.= " GROUP BY d.fk_adherent_type";
|
||||
|
||||
@ -212,7 +217,8 @@ $sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname,";
|
||||
$sql.= " a.tms as datem, datefin as date_end_subscription,";
|
||||
$sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
|
||||
$sql.= " WHERE a.fk_adherent_type = ta.rowid";
|
||||
$sql.= " WHERE a.entity IN (".getEntity().")";
|
||||
$sql.= " AND a.fk_adherent_type = ta.rowid";
|
||||
$sql.= $db->order("a.tms","DESC");
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
@ -264,7 +270,8 @@ $sql = "SELECT a.rowid, a.statut, a.nom, a.prenom,";
|
||||
$sql.= " datefin as date_end_subscription,";
|
||||
$sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c";
|
||||
$sql.= " WHERE c.fk_adherent = a.rowid";
|
||||
$sql.= " WHERE a.entity IN (".getEntity().")";
|
||||
$sql.= " AND c.fk_adherent = a.rowid";
|
||||
$sql.= $db->order("c.tms","DESC");
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
@ -350,7 +357,8 @@ $numb=0;
|
||||
|
||||
$sql = "SELECT c.cotisation, c.dateadh";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c";
|
||||
$sql.= " WHERE d.rowid = c.fk_adherent";
|
||||
$sql.= " WHERE d.entity IN (".getEntity().")";
|
||||
$sql.= " AND d.rowid = c.fk_adherent";
|
||||
if(isset($date_select) && $date_select != '')
|
||||
{
|
||||
$sql .= " AND dateadh LIKE '$date_select%'";
|
||||
@ -406,7 +414,6 @@ print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.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,8 +32,10 @@ $langs->load("bills");
|
||||
$langs->load("members");
|
||||
$langs->load("users");
|
||||
|
||||
if (!$user->rights->adherent->lire)
|
||||
accessforbidden();
|
||||
$id=(GETPOST('id','int') ? GETPOST('id','int') : GETPOST('rowid','int'));
|
||||
|
||||
// Security check
|
||||
$result=restrictedArea($user,'adherent',$id);
|
||||
|
||||
|
||||
/*
|
||||
@ -43,9 +45,8 @@ if (!$user->rights->adherent->lire)
|
||||
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||
|
||||
$adh = new Adherent($db);
|
||||
$adh->id=$_GET["id"];
|
||||
$adh->fetch($_GET["id"]);
|
||||
$adh->info($_GET["id"]);
|
||||
$adh->fetch($id);
|
||||
$adh->info($id);
|
||||
|
||||
$head = member_prepare_head($adh);
|
||||
|
||||
@ -59,7 +60,6 @@ print '</td></tr></table>';
|
||||
print '</div>';
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@ -27,14 +27,15 @@ require_once(DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
|
||||
|
||||
$action=GETPOST('action');
|
||||
$id=GETPOST('id','int');
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("members");
|
||||
$langs->load("companies");
|
||||
$langs->load("members");
|
||||
$langs->load("bills");
|
||||
|
||||
if (!$user->rights->adherent->lire) accessforbidden();
|
||||
$action=GETPOST('action','alpha');
|
||||
$id=GETPOST('id','int');
|
||||
|
||||
// Security check
|
||||
$result=restrictedArea($user,'adherent',$id);
|
||||
|
||||
$object = new Adherent($db);
|
||||
$result=$object->fetch($id);
|
||||
@ -49,7 +50,7 @@ if ($result > 0)
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($_POST["action"] == 'update' && $user->rights->adherent->creer && ! $_POST["cancel"])
|
||||
if ($action == 'update' && $user->rights->adherent->creer && ! $_POST["cancel"])
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
@ -174,7 +175,7 @@ if ($id)
|
||||
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@ -73,7 +73,8 @@ if ($mode)
|
||||
$data = array();
|
||||
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.libelle as label";
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_pays as c on d.pays = c.rowid";
|
||||
$sql.=" WHERE d.statut = 1";
|
||||
$sql.=" WHERE d.entity IN (".getEntity().")";
|
||||
$sql.=" AND d.statut = 1";
|
||||
$sql.=" GROUP BY c.libelle, c.code";
|
||||
//print $sql;
|
||||
}
|
||||
@ -88,7 +89,8 @@ if ($mode)
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.fk_departement = c.rowid";
|
||||
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r on c.fk_region = r.code_region";
|
||||
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
|
||||
$sql.=" WHERE d.statut = 1";
|
||||
$sql.=" WHERE d.entity IN (".getEntity().")";
|
||||
$sql.=" AND d.statut = 1";
|
||||
$sql.=" GROUP BY p.libelle, p.code, c.nom";
|
||||
//print $sql;
|
||||
}
|
||||
@ -102,7 +104,8 @@ if ($mode)
|
||||
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, d.ville as label2";
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d";
|
||||
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
|
||||
$sql.=" WHERE d.statut = 1";
|
||||
$sql.=" WHERE d.entity IN (".getEntity().")";
|
||||
$sql.=" AND d.statut = 1";
|
||||
$sql.=" GROUP BY p.libelle, p.code, d.ville";
|
||||
//print $sql;
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.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
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.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
|
||||
@ -49,8 +49,8 @@ $pagenext = $page + 1;
|
||||
if (! $sortorder) { $sortorder="DESC"; }
|
||||
if (! $sortfield) { $sortfield="d.nom"; }
|
||||
|
||||
// Security check
|
||||
if (! $user->rights->adherent->lire) accessforbidden();
|
||||
// Security check
|
||||
$result=restrictedArea($user,'adherent',$rowid,'adherent_type');
|
||||
|
||||
if (GETPOST('button_removefilter'))
|
||||
{
|
||||
@ -153,7 +153,8 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
|
||||
|
||||
$sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||
$sql.= " WHERE d.entity IN (".getEntity().")";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
@ -267,10 +268,8 @@ if ($rowid > 0)
|
||||
if ($action != 'edit')
|
||||
{
|
||||
$adht = new AdherentType($db);
|
||||
$adht->id = $rowid;
|
||||
$adht->fetch($rowid);
|
||||
|
||||
|
||||
$h=0;
|
||||
|
||||
$head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id;
|
||||
@ -344,7 +343,7 @@ if ($rowid > 0)
|
||||
$sql.= " t.libelle as type, t.cotisation";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
||||
$sql.= " WHERE d.fk_adherent_type = t.rowid ";
|
||||
$sql.= " AND d.entity = ".$conf->entity;
|
||||
$sql.= " AND d.entity IN (".getEntity().")";
|
||||
$sql.= " AND t.rowid = ".$adht->id;
|
||||
if ($sall)
|
||||
{
|
||||
|
||||
@ -222,13 +222,13 @@ foreach ($dirmodels as $reldir)
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
if ($conf->global->PROJECT_ADDON == $classname)
|
||||
if ($conf->global->PROJECT_ADDON == 'mod_'.$classname)
|
||||
{
|
||||
print img_picto($langs->trans("Activated"),'switch_on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value=mod_'.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ if ($id || $ref)
|
||||
$objecttype = 'adherent&categorie';
|
||||
$objectid = isset($id)?$id:(isset($ref)?$ref:'');
|
||||
$dbtablename = 'adherent';
|
||||
$fieldid = isset($ref)?'ref':'rowid';
|
||||
$fieldid = ! empty($ref)?'ref':'rowid';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -464,7 +464,28 @@ else if ($action == 'setconditions' && $user->rights->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
||||
if ($result < 0) dol_print_error($db,$object->error);
|
||||
if ($result < 0)
|
||||
{
|
||||
dol_print_error($db,$object->error);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||
{
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang=GETPOST('lang_id','alpha');
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||
if (! empty($newlang))
|
||||
{
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
|
||||
$ret=$object->fetch($id); // Reload to get new records
|
||||
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setremisepercent' && $user->rights->commande->creer)
|
||||
|
||||
@ -16,9 +16,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* or see http://www.gnu.org/
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@ -12,8 +12,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@ -357,7 +357,11 @@ class Conf
|
||||
$this->product->limit_size=$this->global->PRODUIT_LIMIT_SIZE;
|
||||
|
||||
// conf->theme et $this->css
|
||||
if (empty($this->global->MAIN_THEME)) $this->global->MAIN_THEME="eldy";
|
||||
if (empty($this->global->MAIN_THEME))
|
||||
{
|
||||
if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match('/(epiphany|iceweasel)/i',$_SERVER["HTTP_USER_AGENT"])) $this->global->MAIN_THEME="auguria";
|
||||
else $this->global->MAIN_THEME="eldy";
|
||||
}
|
||||
$this->theme=$this->global->MAIN_THEME;
|
||||
$this->css = "/theme/".$this->theme."/style.css.php";
|
||||
|
||||
@ -414,11 +418,11 @@ class Conf
|
||||
$this->bank->cheque->warning_delay=(isset($this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT)?$this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT:0)*24*60*60;
|
||||
|
||||
// For backward compatibility
|
||||
if (isset($this->product)) $this->produit=$this->product;
|
||||
if (isset($this->facture)) $this->invoice=$this->facture;
|
||||
if (isset($this->commande)) $this->order=$this->commande;
|
||||
if (isset($this->contrat)) $this->contract=$this->contrat;
|
||||
if (isset($this->categorie)) $this->category=$this->categorie;
|
||||
if (isset($this->product)) $this->produit=$this->product;
|
||||
if (isset($this->facture)) $this->invoice=$this->facture;
|
||||
if (isset($this->commande)) $this->order=$this->commande;
|
||||
if (isset($this->contrat)) $this->contract=$this->contrat;
|
||||
if (isset($this->categorie)) $this->category=$this->categorie;
|
||||
|
||||
|
||||
// Define menu manager in setup
|
||||
|
||||
@ -2885,7 +2885,9 @@ class Form
|
||||
* @return int Nb of loaded lines, 0 if already loaded, <0 if KO
|
||||
*/
|
||||
function load_cache_vatrates($country_code)
|
||||
{
|
||||
{
|
||||
global $langs;
|
||||
|
||||
if (count($this->cache_vatrates)) return 0; // Cache deja charge
|
||||
|
||||
$sql = "SELECT DISTINCT t.taux, t.recuperableonly";
|
||||
|
||||
@ -63,7 +63,7 @@ class InfoBox
|
||||
$sql.= " WHERE entity = ".$conf->entity;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::listBoxes get default box list sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class()."::listBoxes get default box list sql=".$sql, LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -130,7 +130,7 @@ class InfoBox
|
||||
{
|
||||
//dol_print_error($db);
|
||||
$this->error=$db->error();
|
||||
dol_syslog(get_class($this)."::listBoxes Error ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class()."::listBoxes Error ".$this->error, LOG_ERR);
|
||||
return array();
|
||||
}
|
||||
|
||||
@ -155,7 +155,7 @@ class InfoBox
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php");
|
||||
|
||||
dol_syslog(get_class($this)."::saveboxorder zone=".$zone." userid=".$userid);
|
||||
dol_syslog(get_class()."::saveboxorder zone=".$zone." userid=".$userid);
|
||||
|
||||
if (! $userid || $userid == 0) return 0;
|
||||
|
||||
@ -182,7 +182,7 @@ class InfoBox
|
||||
$sql.= " AND ".MAIN_DB_PREFIX."boxes.fk_user = ".$userid;
|
||||
$sql.= " AND ".MAIN_DB_PREFIX."boxes.position = ".$zone;
|
||||
|
||||
dol_syslog(get_class($this)."::saveboxorder sql=".$sql);
|
||||
dol_syslog(get_class()."::saveboxorder sql=".$sql);
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
@ -192,7 +192,7 @@ class InfoBox
|
||||
$part=explode(':',$collist);
|
||||
$colonne=$part[0];
|
||||
$list=$part[1];
|
||||
dol_syslog(get_class($this)."::saveboxorder column=".$colonne.' list='.$list);
|
||||
dol_syslog(get_class()."::saveboxorder column=".$colonne.' list='.$list);
|
||||
|
||||
$i=0;
|
||||
$listarray=explode(',',$list);
|
||||
@ -212,7 +212,7 @@ class InfoBox
|
||||
$sql.= " ".$userid;
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog(get_class($this)."::saveboxorder sql=".$sql);
|
||||
dol_syslog(get_class()."::saveboxorder sql=".$sql);
|
||||
$result = $db->query($sql);
|
||||
if ($result < 0)
|
||||
{
|
||||
@ -238,7 +238,7 @@ class InfoBox
|
||||
{
|
||||
$this->error=$db->lasterror();
|
||||
$db->rollback();
|
||||
dol_syslog(get_class($this)."::saveboxorder ".$this->error);
|
||||
dol_syslog(get_class()."::saveboxorder ".$this->error);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2163,7 +2163,7 @@ function dol_print_error($db='',$error='')
|
||||
$syslog.=", msg=".$msg;
|
||||
}
|
||||
}
|
||||
if (empty($dolibarr_main_prod) && $_SERVER['DOCUMENT_ROOT'] && function_exists('xdebug_call_file'))
|
||||
if (empty($dolibarr_main_prod) && $_SERVER['DOCUMENT_ROOT'] && function_exists('xdebug_print_function_stack') && function_exists('xdebug_call_file'))
|
||||
{
|
||||
xdebug_print_function_stack();
|
||||
$out.='<b>XDebug informations:</b>'."<br>\n";
|
||||
|
||||
@ -447,7 +447,8 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
||||
if (! empty($reg[2]) && preg_match('/^@/',$reg[2])) $maskraz=preg_replace('/^@/','',$reg[2]);
|
||||
if (! empty($reg[3]) && preg_match('/^@/',$reg[3])) $maskraz=preg_replace('/^@/','',$reg[3]);
|
||||
if ($maskraz == 0) $maskraz = $conf->global->SOCIETE_FISCAL_MONTH_START;
|
||||
if ($maskraz > 0)
|
||||
//print "maskraz=".$maskraz;
|
||||
if ($maskraz > 0) // A reset is required
|
||||
{
|
||||
if ($maskraz > 12) return 'ErrorBadMaskBadRazMonth';
|
||||
|
||||
@ -476,21 +477,26 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
||||
if (dol_strlen($reg[$posy]) == 2) $yearcomp=sprintf("%02d",date("y",$date)+$yearoffset);
|
||||
if (dol_strlen($reg[$posy]) == 1) $yearcomp=substr(date("y",$date),2,1)+$yearoffset;
|
||||
$sqlwhere='';
|
||||
$sqlwhere.='( (SUBSTRING('.$field.', '.(dol_strlen($reg[1])+1).', '.dol_strlen($reg[2]).") >= '".$yearcomp."'";
|
||||
if ($monthcomp > 1) // Test useless if monthcomp = 1 (or 0 is same as 1)
|
||||
if ($monthcomp > 1) // Test with month is useless if monthcomp = 0 or 1 (0 is same as 1)
|
||||
{
|
||||
if (dol_strlen($reg[$posy]) == 4) $yearcomp1=sprintf("%04d",date("Y",$date)+$yearoffset+1);
|
||||
if (dol_strlen($reg[$posy]) == 2) $yearcomp1=sprintf("%02d",date("y",$date)+$yearoffset+1);
|
||||
|
||||
// FIXME If mask is {mm}{yy}, sqlwhere is wrong here
|
||||
$sqlwhere.=' AND SUBSTRING('.$field.', '.(dol_strlen($reg[1])+dol_strlen($reg[2])+1).', '.dol_strlen($reg[3]).") >= '".$monthcomp."')";
|
||||
$sqlwhere.=' OR SUBSTRING('.$field.', '.(dol_strlen($reg[1])+1).', '.dol_strlen($reg[2]).") >= '".$yearcomp1."' )";
|
||||
$sqlwhere.='(';
|
||||
$sqlwhere.=' (SUBSTRING('.$field.', '.(dol_strlen($reg[1])+1).', '.dol_strlen($reg[2]).") = '".$yearcomp."'";
|
||||
$sqlwhere.=' AND SUBSTRING('.$field.', '.(dol_strlen($reg[1])+dol_strlen($reg[2])+1).', '.dol_strlen($reg[3]).") >= '".str_pad($monthcomp, dol_strlen($reg[3]), '0', STR_PAD_LEFT)."')";
|
||||
$sqlwhere.=' OR';
|
||||
$sqlwhere.=' (SUBSTRING('.$field.', '.(dol_strlen($reg[1])+1).', '.dol_strlen($reg[2]).") = '".$yearcomp1."'";
|
||||
$sqlwhere.=' AND SUBSTRING('.$field.', '.(dol_strlen($reg[1])+dol_strlen($reg[2])+1).', '.dol_strlen($reg[3]).") < '".str_pad($monthcomp, dol_strlen($reg[3]), '0', STR_PAD_LEFT)."') ";
|
||||
$sqlwhere.=')';
|
||||
}
|
||||
else
|
||||
else // reset is done on january
|
||||
{
|
||||
$sqlwhere.=') )';
|
||||
$sqlwhere.='( SUBSTRING('.$field.', '.(dol_strlen($reg[1])+1).', '.dol_strlen($reg[2]).") = '".$yearcomp."' )";
|
||||
}
|
||||
}
|
||||
//print $sqlwhere;
|
||||
//print "sqlwhere=".$sqlwhere."<br>\n";
|
||||
//print "masktri=".$masktri." maskcounter=".$maskcounter." maskraz=".$maskraz." maskoffset=".$maskoffset." yearcomp=".$yearcomp."<br>\n";
|
||||
|
||||
// Define $sqlstring
|
||||
|
||||
@ -241,7 +241,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$nblineFollowDesc = 0;
|
||||
}
|
||||
|
||||
if (($nexY+$nblineFollowDesc) > ($tab_top+$tab_height) && $i < ($nblignes - 1))
|
||||
if ((($nexY+$nblineFollowDesc) > ($tab_top+$tab_height) && $i < ($nblignes - 1)) || (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak))
|
||||
{
|
||||
$this->_tableau($pdf, $tab_top, $tab_height, $nexY, $outputlangs);
|
||||
|
||||
|
||||
@ -350,7 +350,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$tab_top_in_current_page=$tab_top_newpage;
|
||||
$tab_height_in_current_page=$tab_height_newpage;
|
||||
}
|
||||
if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1))
|
||||
if ((($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) || (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak))
|
||||
{
|
||||
if ($pagenb == 1)
|
||||
{
|
||||
|
||||
@ -174,31 +174,31 @@ function don_create($db, $id, $message, $modele, $outputlangs)
|
||||
$file = $modele.".modules.php";
|
||||
if (file_exists($dir.$file))
|
||||
{
|
||||
$classname = $modele;
|
||||
$object=new Don($db);
|
||||
$object->fetch($id);
|
||||
|
||||
|
||||
require_once($dir.$file);
|
||||
|
||||
$obj = new $classname($db);
|
||||
|
||||
$obj->message = $message;
|
||||
$classname = $modele;
|
||||
$module = new $classname($db);
|
||||
|
||||
// We save charset_output to restore it because write_file can change it if needed for
|
||||
// output format that does not support UTF8.
|
||||
$sav_charset_output=$outputlangs->charset_output;
|
||||
if ($obj->write_file($id,$outputlangs) > 0)
|
||||
if ($module->write_file($object,$outputlangs) > 0)
|
||||
{
|
||||
$outputlangs->charset_output=$sav_charset_output;
|
||||
|
||||
// we delete preview files
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||
dol_delete_preview($obj);
|
||||
dol_delete_preview($object);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$outputlangs->charset_output=$sav_charset_output;
|
||||
dol_syslog("Erreur dans don_create");
|
||||
dol_print_error($db,$obj->error);
|
||||
dol_print_error($db,$module->error);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -350,7 +350,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$tab_top_in_current_page=$tab_top_newpage;
|
||||
$tab_height_in_current_page=$tab_height_newpage;
|
||||
}
|
||||
if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1))
|
||||
if ((($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) || (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak))
|
||||
{
|
||||
if ($pagenb == 1)
|
||||
{
|
||||
|
||||
@ -260,7 +260,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$pdf->MultiCell(21, 3, $total_excl_tax, 0, 'R', 0);
|
||||
|
||||
|
||||
if ($nexY > 200 && $i < $nblignes - 1)
|
||||
if (($nexY > 200 && $i < $nblignes - 1) || (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak))
|
||||
{
|
||||
$this->_tableau($pdf, $tab_top, $tab_height, $nexY, $object, $outputlangs);
|
||||
$nexY = $iniY;
|
||||
|
||||
@ -332,7 +332,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$tab_top_in_current_page=$tab_top_newpage;
|
||||
$tab_height_in_current_page=$tab_height_middlepage;
|
||||
}
|
||||
if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1))
|
||||
if ((($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) || (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak))
|
||||
{
|
||||
if ($pagenb == 1)
|
||||
{
|
||||
|
||||
@ -332,7 +332,7 @@ class pdf_jaune extends ModelePDFPropales
|
||||
$tab_top_in_current_page=$tab_top_newpage;
|
||||
$tab_height_in_current_page=$tab_height_middlepage;
|
||||
}
|
||||
if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1))
|
||||
if ((($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) || (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak))
|
||||
{
|
||||
if ($pagenb == 1)
|
||||
{
|
||||
|
||||
@ -76,6 +76,12 @@ if (! $result && ! empty($_SERVER["GATEWAY_INTERFACE"])) // If install not do
|
||||
exit;
|
||||
}
|
||||
|
||||
// Disable php display errors
|
||||
if (! empty($dolibarr_main_prod))
|
||||
{
|
||||
ini_set('display_errors','Off');
|
||||
}
|
||||
|
||||
// Clean parameters
|
||||
$dolibarr_main_data_root=trim($dolibarr_main_data_root);
|
||||
$dolibarr_main_url_root=trim($dolibarr_main_url_root);
|
||||
|
||||
@ -68,7 +68,7 @@ class CommandeFournisseur extends Commande
|
||||
var $cond_reglement_code;
|
||||
var $mode_reglement_id;
|
||||
var $mode_reglement_code;
|
||||
|
||||
|
||||
var $extraparams=array();
|
||||
|
||||
|
||||
@ -168,7 +168,7 @@ class CommandeFournisseur extends Commande
|
||||
$this->note_private = $obj->note_private;
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->modelpdf = $obj->model_pdf;
|
||||
|
||||
|
||||
$this->extraparams = (array) json_decode($obj->extraparams, true);
|
||||
|
||||
$this->db->free($resql);
|
||||
@ -263,7 +263,7 @@ class CommandeFournisseur extends Commande
|
||||
function log($user, $statut, $datelog, $comment='')
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseur_log (datelog, fk_commande, fk_statut, fk_user, comment)";
|
||||
$sql.= " VALUES (".$this->db->idate($datelog).",".$this->id.", ".$statut.", ";
|
||||
$sql.= " VALUES ('".$this->db->idate($datelog)."',".$this->id.", ".$statut.", ";
|
||||
$sql.= $user->id.", ";
|
||||
$sql.= ($comment?"'".$this->db->escape($comment)."'":'null');
|
||||
$sql.= ")";
|
||||
@ -317,7 +317,7 @@ class CommandeFournisseur extends Commande
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX."commande_fournisseur";
|
||||
$sql.= " SET ref='".$num."'";
|
||||
$sql.= ", fk_statut = 1";
|
||||
$sql.= ", date_valid=".$this->db->idate(mktime());
|
||||
$sql.= ", date_valid='".$this->db->idate(mktime())."'";
|
||||
$sql.= ", fk_user_valid = ".$user->id;
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
$sql.= " AND fk_statut = 0";
|
||||
|
||||
@ -100,14 +100,14 @@ else if ($action == 'setremisepercent' && $user->rights->fournisseur->commande->
|
||||
$result = $object->set_remise($user, $_POST['remise_percent']);
|
||||
}
|
||||
|
||||
else if ($action == 'setnote_public' && $user->rights->propale->creer)
|
||||
else if ($action == 'setnote_public' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
||||
if ($result < 0) dol_print_error($db,$object->error);
|
||||
}
|
||||
|
||||
else if ($action == 'setnote' && $user->rights->propale->creer)
|
||||
else if ($action == 'setnote' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
||||
|
||||
@ -300,8 +300,7 @@ print '</td><td width="70%" valign="top" class="notopnoleftnoright">';
|
||||
*/
|
||||
$max=5;
|
||||
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom, s.rowid as socid,";
|
||||
$sql.= " date_cloture as datec";
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.tms, s.nom, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -355,7 +354,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
||||
print '<td>'.dol_print_date($db->jdate($obj->datec)).'</td>';
|
||||
print '<td>'.dol_print_date($db->jdate($obj->tms),'day').'</td>';
|
||||
print '<td align="right">'.$commandestatic->LibStatut($obj->fk_statut,5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
|
||||
@ -35,11 +35,11 @@ $langs->setDefaultLang($setuplang);
|
||||
|
||||
$langs->load("install");
|
||||
|
||||
// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard.
|
||||
if (! isset($force_install_dolibarrlogin)) $force_install_dolibarrlogin='';
|
||||
// Now we load forced value from install.forced.php file.
|
||||
$useforcedwizard=false;
|
||||
if (@file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (@file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
$forcedfile="./install.forced.php";
|
||||
if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php";
|
||||
if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once($forcedfile); }
|
||||
|
||||
dolibarr_install_syslog("Dolibarr install/upgrade process started");
|
||||
|
||||
|
||||
@ -43,10 +43,11 @@ $passroot=isset($_POST["db_pass_root"])?$_POST["db_pass_root"]:"";
|
||||
// Repertoire des pages dolibarr
|
||||
$main_dir=isset($_POST["main_dir"])?trim($_POST["main_dir"]):'';
|
||||
|
||||
// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard.
|
||||
// Now we load forced value from install.forced.php file.
|
||||
$useforcedwizard=false;
|
||||
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
$forcedfile="./install.forced.php";
|
||||
if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php";
|
||||
if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once($forcedfile); }
|
||||
|
||||
dolibarr_install_syslog("--- etape1: Entering etape1.php page");
|
||||
|
||||
@ -379,7 +380,7 @@ if (! $error && $db->connected && $action == "set")
|
||||
$main_force_https = ((GETPOST("main_force_https") && (GETPOST("main_force_https") == "on" || GETPOST("main_force_https") == 1)) ? '1' : '0');
|
||||
|
||||
// Use alternative directory
|
||||
$main_use_alt_dir = ((GETPOST("main_use_alt_dir") && (GETPOST("main_use_alt_dir") == "on" || GETPOST("main_use_alt_dir") == 1)) ? '' : '#');
|
||||
$main_use_alt_dir = ((GETPOST("main_use_alt_dir") && (GETPOST("main_use_alt_dir") == "on" || GETPOST("main_use_alt_dir") == 1)) ? '' : '//');
|
||||
|
||||
// Alternative root directory name
|
||||
$main_alt_dir_name = ((GETPOST("main_alt_dir_name") && GETPOST("main_alt_dir_name") != '') ? GETPOST("main_alt_dir_name") : 'custom');
|
||||
@ -867,10 +868,10 @@ function write_conf_file($conffile)
|
||||
|
||||
// Write params to overwrites default font path
|
||||
fputs($fp,"\n");
|
||||
if (empty($force_dolibarr_font_DOL_DEFAULT_TTF)) { fputs($fp, '#'); $force_dolibarr_font_DOL_DEFAULT_TTF=''; }
|
||||
if (empty($force_dolibarr_font_DOL_DEFAULT_TTF)) { fputs($fp, '//'); $force_dolibarr_font_DOL_DEFAULT_TTF=''; }
|
||||
fputs($fp, '$dolibarr_font_DOL_DEFAULT_TTF=\''.$force_dolibarr_font_DOL_DEFAULT_TTF.'\';');
|
||||
fputs($fp,"\n");
|
||||
if (empty($force_dolibarr_font_DOL_DEFAULT_TTF_BOLD)) { fputs($fp, '#'); $force_dolibarr_font_DOL_DEFAULT_TTF_BOLD=''; }
|
||||
if (empty($force_dolibarr_font_DOL_DEFAULT_TTF_BOLD)) { fputs($fp, '//'); $force_dolibarr_font_DOL_DEFAULT_TTF_BOLD=''; }
|
||||
fputs($fp, '$dolibarr_font_DOL_DEFAULT_TTF_BOLD=\''.$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD.'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
|
||||
@ -52,10 +52,11 @@ if ($dolibarr_main_db_type == "pgsql") $choix=2;
|
||||
if ($dolibarr_main_db_type == "mssql") $choix=3;
|
||||
//if (empty($choix)) dol_print_error('','Database type '.$dolibarr_main_db_type.' not supported into etape2.php page');
|
||||
|
||||
// Init "forced values" to nothing. "forced values" are used after a Doliwamp install wizard.
|
||||
// Now we load forced value from install.forced.php file.
|
||||
$useforcedwizard=false;
|
||||
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
$forcedfile="./install.forced.php";
|
||||
if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php";
|
||||
if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once($forcedfile); }
|
||||
|
||||
dolibarr_install_syslog("--- etape2: Entering etape2.php page");
|
||||
|
||||
|
||||
@ -36,11 +36,11 @@ $langs->setDefaultLang($setuplang);
|
||||
$langs->load("admin");
|
||||
$langs->load("install");
|
||||
|
||||
// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard.
|
||||
if (! isset($force_install_dolibarrlogin)) $force_install_dolibarrlogin='';
|
||||
// Now we load forced value from install.forced.php file.
|
||||
$useforcedwizard=false;
|
||||
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
$forcedfile="./install.forced.php";
|
||||
if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php";
|
||||
if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once($forcedfile); }
|
||||
|
||||
dolibarr_install_syslog("--- etape4: Entering etape4.php page");
|
||||
|
||||
@ -74,7 +74,7 @@ $db=getDoliDBInstance($conf->db->type,$conf->db->host,$conf->db->user,$conf->db-
|
||||
if ($db->ok == 1)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("DolibarrAdminLogin").' :</td><td>';
|
||||
print '<input name="login" value="'.(! empty($_GET["login"])?$_GET["login"]:$force_install_dolibarrlogin).'"></td></tr>';
|
||||
print '<input name="login" value="'.(! empty($_GET["login"])?$_GET["login"]:(isset($force_install_dolibarrlogin)?$force_install_dolibarrlogin:'')).'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Password").' :</td><td>';
|
||||
print '<input type="password" name="pass"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("PasswordAgain").' :</td><td>';
|
||||
@ -106,9 +106,9 @@ if ($db->ok == 1)
|
||||
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
dolibarr_install_syslog("--- install/etape4.php end", LOG_INFO);
|
||||
|
||||
pFooter($err,$setuplang);
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@ -61,9 +61,11 @@ if (! isset($force_install_databasepass)) $force_install_databasepass='';
|
||||
if (! isset($force_install_databaserootlogin)) $force_install_databaserootlogin='';
|
||||
if (! isset($force_install_databaserootpass)) $force_install_databaserootpass='';
|
||||
if (! isset($force_install_lockinstall)) $force_install_lockinstall='';
|
||||
// Now we load forced value from install.forced.php file.
|
||||
$useforcedwizard=false;
|
||||
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
$forcedfile="./install.forced.php";
|
||||
if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php";
|
||||
if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once($forcedfile); }
|
||||
|
||||
dolibarr_install_syslog("--- etape5: Entering etape5.php page", LOG_INFO);
|
||||
|
||||
|
||||
@ -53,14 +53,14 @@ if (! isset($force_install_databaserootlogin)) $force_install_databaserootlogin=
|
||||
if (! isset($force_install_databaserootpass)) $force_install_databaserootpass='';
|
||||
// Now we load forced value from install.forced.php file.
|
||||
$useforcedwizard=false;
|
||||
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
$forcedfile="./install.forced.php";
|
||||
if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php";
|
||||
if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once($forcedfile); }
|
||||
|
||||
dolibarr_install_syslog("Fileconf: Entering fileconf.php page");
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
-- Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
-- Copyright (C) 2012 Sebastian Neuwert <sebastian.neuwert@modula71.de>
|
||||
--
|
||||
-- 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
|
||||
@ -20,7 +21,6 @@
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
--
|
||||
|
||||
--
|
||||
-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors
|
||||
@ -110,8 +110,12 @@ INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, act
|
||||
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (419, 4, 419, '', 0, 'Pais Vasco', 1);
|
||||
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (420, 4, 420, '', 0, 'Otros', 1);
|
||||
|
||||
-- Regions Germany (id country=5)
|
||||
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (501, 5, 501, '', 0, 'Deutschland', 1);
|
||||
|
||||
|
||||
-- Regions Switzerland (id country=6)
|
||||
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (601, 6, 601, '', 1, 'Cantons', 1);
|
||||
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (601, 6, 601, '', 1, 'Cantons', 1);
|
||||
|
||||
-- Regions Tunisia (id country=10)
|
||||
insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (1001,10,1001, '',0,'Ariana');
|
||||
@ -215,4 +219,4 @@ INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, act
|
||||
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23206, 232, 23206, '', 0, 'Insular', 1);
|
||||
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23207, 232, 23207, '', 0, 'Los Llanos', 1);
|
||||
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23208, 232, 23208, '', 0, 'Nor-Oriental', 1);
|
||||
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23209, 232, 23209, '', 0, 'Zuliana', 1);
|
||||
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23209, 232, 23209, '', 0, 'Zuliana', 1);
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
-- Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
-- Copyright (C) 2012 Sebastian Neuwert <sebastian.neuwert@modula71.de>
|
||||
--
|
||||
-- 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
|
||||
@ -20,7 +21,6 @@
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
--
|
||||
|
||||
--
|
||||
-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors
|
||||
@ -325,6 +325,24 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('52', 409, '', 9, 'MELILLA', 'Melilla', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('53', 420, '', 20, 'OTROS', 'Otros', 1);
|
||||
|
||||
-- Provinces Germany (id country=5)
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'BW','BADEN-WÜRTTEMBERG','Baden-Württemberg',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'BY','BAYERN','Bayern',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'BE','BERLIN','Berlin',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'BB','BRANDENBURG','Brandenburg',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'HB','BREMEN','Bremen',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'HH','HAMBURG','Hamburg',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'HE','HESSEN','Hessen',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'MV','MECKLENBURG-VORPOMMERN','Mecklenburg-Vorpommern',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'NI','NIEDERSACHSEN','Niedersachsen',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'NW','NORDRHEIN-WESTFALEN','Nordrhein-Westfalen',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'RP','RHEINLAND-PFALZ','Rheinland-Pfalz',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'SL','SAARLAND','Saarland',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'SN','SACHSEN','Sachsen',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'ST','SACHSEN-ANHALT','Sachsen-Anhalt',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'SH','SCHLESWIG-HOLSTEIN','Schleswig-Holstein',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'TH','THÜRINGEN','Thüringen',1);
|
||||
|
||||
-- Cantons Switzerland (id country=6)
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'AG','ARGOVIE','Argovie',1);
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'AI','APPENZELL RHODES INTERIEURES','Appenzell Rhodes intérieures',1);
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
-- Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
-- Copyright (C) 2012 Sebastian Neuwert <sebastian.neuwert@modula71.de>
|
||||
--
|
||||
-- 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
|
||||
@ -20,7 +21,6 @@
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
--
|
||||
|
||||
--
|
||||
-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors
|
||||
@ -118,10 +118,15 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '209', 'GI
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '210', 'GEIE - Groupement européen d intérêt économique');
|
||||
|
||||
-- Germany
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '500', 'Limited liability corporation (GmbH)');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '501', 'Stock corporation (AG)');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '502', 'Partnerships general or limited (GmbH & CO. KG)');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '503', 'Sole proprietor / Private business');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '500', 'GmbH - Gesellschaft mit beschränkter Haftung');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '501', 'AG - Aktiengesellschaft ');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '502', 'GmbH&Co. KG - Gesellschaft mit beschränkter Haftung & Compagnie Kommanditgesellschaft');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '503', 'Gewerbe - Personengesellschaft');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '504', 'UG - Unternehmergesellschaft -haftungsbeschränkt-');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '505', 'GbR - Gesellschaft des bürgerlichen Rechts');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '506', 'KG - Kommanditgesellschaft');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '507', 'Ltd. - Limited Company');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '508', 'OHG - Offene Handelsgesellschaft');
|
||||
|
||||
-- Italy
|
||||
INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('301',3,'Società semplice',0,1);
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
-- Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
-- Copyright (C) 2012 Sebastian Neuwert <sebastian.neuwert@modula71.de>
|
||||
--
|
||||
-- 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
|
||||
@ -20,7 +21,6 @@
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
--
|
||||
|
||||
--
|
||||
-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors
|
||||
@ -90,9 +90,11 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 1
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 17, 1, '7','0','VAT reduced rate',1);
|
||||
|
||||
-- GERMANY (id country=5)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 51, 5, '19','0','VAT standard rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 52, 5, '7','0','VAT reduced rate', 1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 53, 5, '0','0','VAT Rate 0', 1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 51, 5, '19.0','0','allgemeine Ust.',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 52, 5, '7.0','0','ermäßigte USt.', 1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 53, 5, '0.0','0','keine USt.', 1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 54, 5, '5.5','0','USt. Forst', 0);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 55, 5, '10.7','0','USt. Landwirtschaft', 0);
|
||||
|
||||
-- ICELAND (id country=116)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1161, 116,'25.5','0','VAT standard rate',1);
|
||||
|
||||
@ -59,7 +59,6 @@ insert into llx_const (name, value, type, note, visible) values ('MAIN_MENUFRONT
|
||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENU_SMARTPHONE','eldy_backoffice.php','chaine','Module de gestion de la barre de menu smartphone pour utilisateurs internes',0);
|
||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENUFRONT_SMARTPHONE','eldy_frontoffice.php','chaine','Module de gestion de la barre de menu smartphone pour utilisateurs externes',0);
|
||||
|
||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_THEME','eldy','chaine','Default theme',0);
|
||||
|
||||
--
|
||||
-- Delai tolerance
|
||||
|
||||
@ -56,10 +56,10 @@ class Project extends CommonObject
|
||||
*
|
||||
* @param DoliDB $DB Database handler
|
||||
*/
|
||||
function Project($DB)
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->societe = new Societe($DB);
|
||||
$this->db = $db;
|
||||
$this->societe = new Societe($db);
|
||||
|
||||
$this->statuts_short = array(0 => 'Draft', 1 => 'Validated', 2 => 'Closed');
|
||||
$this->statuts = array(0 => 'Draft', 1 => 'Validated', 2 => 'Closed');
|
||||
@ -439,21 +439,9 @@ class Project extends CommonObject
|
||||
if ($conf->projet->dir_output)
|
||||
{
|
||||
$dir = $conf->projet->dir_output . "/" . $projectref;
|
||||
$file = $conf->projet->dir_output . "/" . $projectref . "/" . $projectref . ".pdf";
|
||||
if (file_exists($file))
|
||||
{
|
||||
dol_delete_preview($this);
|
||||
|
||||
if (!dol_delete_file($file))
|
||||
{
|
||||
$this->error = 'ErrorFailToDeleteFile';
|
||||
$this->db->rollback();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (file_exists($dir))
|
||||
{
|
||||
$res = @dol_delete_dir($dir);
|
||||
$res = @dol_delete_dir_recursive($dir);
|
||||
if (!$res)
|
||||
{
|
||||
$this->error = 'ErrorFailToDeleteDir';
|
||||
@ -477,14 +465,14 @@ class Project extends CommonObject
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
dol_syslog("Project::delete sql=" . $sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this) . "::delete sql=" . $sql, LOG_DEBUG);
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error = $this->db->lasterror();
|
||||
dol_syslog("Project::delete " . $this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this) . "::delete " . $this->error, LOG_ERR);
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010_2012 Regis Houssin <regis@dolibarr.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
|
||||
@ -66,10 +66,9 @@ class Task extends CommonObject
|
||||
*
|
||||
* @param DoliDB $DB Database handler
|
||||
*/
|
||||
function Task($DB)
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db = $DB;
|
||||
return 1;
|
||||
$this->db = $db;
|
||||
}
|
||||
|
||||
|
||||
@ -369,8 +368,30 @@ class Task extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
//Delete associated link file
|
||||
if ($conf->projet->dir_output)
|
||||
{
|
||||
$projectstatic=new Project($this->db);
|
||||
$projectstatic->fetch($this->fk_project);
|
||||
|
||||
$dir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($projectstatic->ref) . '/' . dol_sanitizeFileName($this->id);
|
||||
dol_syslog(get_class($this)."::delete dir=".$dir, LOG_DEBUG);
|
||||
if (file_exists($dir))
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT . "/core/lib/files.lib.php");
|
||||
$res = @dol_delete_dir_recursive($dir);
|
||||
if (!$res)
|
||||
{
|
||||
$this->error = 'ErrorFailToDeleteDir';
|
||||
$this->db->rollback();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -395,6 +416,7 @@ class Task extends CommonObject
|
||||
{
|
||||
$obj=$this->db->fetch_object($resql);
|
||||
if ($obj) $ret=$obj->nb;
|
||||
$this->db->free($resql);
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
@ -914,4 +936,4 @@ class Task extends CommonObject
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 14 KiB |
@ -57,10 +57,10 @@ if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||
if ($id)
|
||||
{
|
||||
// $user est le user qui edite, $_GET["id"] est l'id de l'utilisateur edite
|
||||
$caneditfield=( (($user->id == $id) && $user->rights->user->self->creer)
|
||||
|| (($user->id != $id) && $user->rights->user->user->creer) );
|
||||
$caneditpassword=( (($user->id == $id) && $user->rights->user->self->password)
|
||||
|| (($user->id != $id) && $user->rights->user->user->password) );
|
||||
$caneditfield=((($user->id == $id) && $user->rights->user->self->creer)
|
||||
|| (($user->id != $id) && $user->rights->user->user->creer));
|
||||
$caneditpassword=((($user->id == $id) && $user->rights->user->self->password)
|
||||
|| (($user->id != $id) && $user->rights->user->user->password));
|
||||
}
|
||||
|
||||
//Multicompany in mode transversal
|
||||
|
||||
Loading…
Reference in New Issue
Block a user