diff --git a/COPYRIGHT b/COPYRIGHT index c838353b740..4aee8e37939 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -18,13 +18,13 @@ GeoIP 2004 LGPL 2.1 Yes Sample code to m NuSoap 0.9.5 LGPL 2.1 Yes Library to develop SOAP Web services (not into rpm and deb package) OdtPHP 1.0.1 GPL 2.0 Yes Library to build/edit ODT files PHPExcel 1.7.6 LGPL 2.1 Yes Read/Write XLS files, read ODS files -TCPDF 5.9.098 LGPL 3.0 Yes PDF generation +TCPDF 5.9.156 LGPL 3.0 Yes PDF generation JS libraries: jQuery 1.7.1 GPL and MIT Licence Yes JS library jQuery UI 1.8.17 GPL and MIT Licence Yes JS library plugin UI jQuery Colorpicker 1.1 MIT Licence Yes JS library for color picker for a defined list of colors -jQuery DataTable 1.8.1 BSD Yes JS library for tables output +jQuery DataTables 1.9.1 BSD Yes JS library for tables output jQuery Flot 0.7 MIT Licence Yes JS library to build graph jQuery FileUpload 5.0.3 GPL and MIT Licence Yes JS library to upload files jQuery JCrop 0.9.8 GPL and MIT Licence Yes JS library plugin Crop (to crop images) diff --git a/ChangeLog b/ChangeLog index 3d54d0197c7..33b29d6ea54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,13 +2,23 @@ English Dolibarr ChangeLog -------------------------------------------------------------- + +***** ChangeLog for 3.3 compared to 3.2 ***** +For users: +- New: Add supplier ref on supplier orders. +- New: Can export supplier orders. + +For developers: + + ***** 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: - New: Each user can remove/add its own boxes. +- New: Add signature at end of predefined email text. - New: Can use personalized fields of products/services. - New: Can attach files on social contributions. - New: Show payments terms and conditions onto muscadet template. @@ -61,9 +71,12 @@ For users: - New: Add hidden option MAIN_ADD_PDF_BACKGROUND to add a PDF as background of invoice/order generated PDF. - New: Can convert a product/service into service/product. - New: Show delivery date into proposal template azur. +- New: Support tags into header and footer into ODT templates. - Fix: Can use POS module with several concurrent users. - Fix: Installer don't fails with Mysql version that added a ssl_cypher field. - Fix: Sanitize input parameters. +- Fix: [ bug #368 ] Product list +- Fix: [ bug #370 ] Filter in accountancy -> suppliers_bills For developers: - New: Can add a left menu into an existing top menu or left menu. diff --git a/build/debian/README.howto b/build/debian/README.howto index 6e0c7a75d06..9c3dbc9ad07 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -8,9 +8,7 @@ script to build a package, ready to be distributed, with format .DEB (for Debian, Ubuntu, ...). # To build a debian package, you need first -# apt-get -i debhelper -# apt-get -i dpkg-source -# apt-get -i gpg +# apt-get -i debhelper dpkg-source gpg lintian # This is standard command to work on Debian packaging: @@ -35,7 +33,8 @@ with format .DEB (for Debian, Ubuntu, ...). # dpkg --purge Remove config files and interactive saved answers # # dpkg-buildpackage -us -uc Build a source and binary package - +# +# gdebi package.deb Install a package + dependencies To submit a package to Debian: diff --git a/build/debian/changelog b/build/debian/changelog index 3b1aeb0907f..3e7f7fa5e91 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -1,4 +1,4 @@ -dolibarr (3.2.0+nmu1) unstable; urgency=low +dolibarr (3.3.0+nmu1) unstable; urgency=low * Non-maintainer upload. * New upstream release. diff --git a/build/debian/control b/build/debian/control index 198e93ce8c0..3552ae3e159 100755 --- a/build/debian/control +++ b/build/debian/control @@ -9,13 +9,11 @@ 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, + php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip, libphp-adodb, - libfpdi-php, - libfpdf-tpl-php, 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, diff --git a/build/debian/control.debianbin b/build/debian/control.debianbin index 50217f0b861..39fe764e088 100755 --- a/build/debian/control.debianbin +++ b/build/debian/control.debianbin @@ -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 @@ -27,6 +26,7 @@ Description: Web based software to manage a small company or foundation . Dolibarr was designed to be easy to use. Only features you need are visible, depending on which module were activated. + Most common used modules are: . Customers, Suppliers or Prospects directory, Contacts directory, diff --git a/build/debian/dolibarr.postinst b/build/debian/dolibarr.postinst index 91e3d9346e8..92112e29e50 100644 --- a/build/debian/dolibarr.postinst +++ b/build/debian/dolibarr.postinst @@ -83,8 +83,9 @@ case "$1" in chown -R root:www-data $installconfig chmod -R 660 $installconfig - if [ ! -f $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 @@ -92,18 +93,18 @@ case "$1" in chown -R root:www-data $config else # File already exist. We add params not found. - // Add new params to overwrite path to use shared libraries/fonts - grep -q -c "dolibarr_lib_ADODB_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_lib_FPDI_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || echo "" >> $config - grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_js_CKEDITOR" $config || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY" $config || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY_UI" $config || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY_FLOT" $config || echo "" >> $config + 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 "" >> $config + grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config + grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config + #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config fi diff --git a/build/debian/dolibarr.postrm b/build/debian/dolibarr.postrm index 2aa855176fd..798587317a0 100644 --- a/build/debian/dolibarr.postrm +++ b/build/debian/dolibarr.postrm @@ -3,7 +3,8 @@ # # see: dh_installdeb(1) -set -e +#set -e +set +e # summary of how this script can be called: # * `remove' diff --git a/build/debian/install.forced.php.install b/build/debian/install.forced.php.install index 4e04e5da077..9ecc7ecf550 100755 --- a/build/debian/install.forced.php.install +++ b/build/debian/install.forced.php.install @@ -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'; ?> \ No newline at end of file diff --git a/build/debian/rules b/build/debian/rules index 02af430a9c0..ede492f3004 100755 --- a/build/debian/rules +++ b/build/debian/rules @@ -104,6 +104,7 @@ clean: 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 diff --git a/build/doxygen/dolibarr-doxygen.doxyfile b/build/doxygen/dolibarr-doxygen.doxyfile index 772e3f97a11..690b5daf1a2 100644 --- a/build/doxygen/dolibarr-doxygen.doxyfile +++ b/build/doxygen/dolibarr-doxygen.doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = dolibarr # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 3.2.0 +PROJECT_NUMBER = 3.3.0 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/build/doxygen/jenkins_doxygen.doxyfile b/build/doxygen/jenkins_doxygen.doxyfile index 26628c645a3..749b0a10786 100644 --- a/build/doxygen/jenkins_doxygen.doxyfile +++ b/build/doxygen/jenkins_doxygen.doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = dolibarr # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 3.2.0 +PROJECT_NUMBER = 3.3.0 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index 35db3685573..a1c9ac3c33a 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -17,12 +17,13 @@ ; ----- Change this ----- AppName=DoliWamp ; DoliWamp-x.x.x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta -AppVerName=DoliWamp-3.2.0-alpha +AppVerName=DoliWamp-3.3.0-alpha ; DoliWamp-x.x x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta -OutputBaseFilename=DoliWamp-3.2.0-alpha +OutputBaseFilename=DoliWamp-3.3.0-alpha ; Define full path from wich all relative path are defined ; You must modify this to put here your dolibarr root directory -SourceDir=c:\Documents and Settings\ldestail\git\dolibarr +;SourceDir=C:\Documents and Settings\ldestail\git\dolibarrold +SourceDir=Z:\home\ldestail\git\dolibarrold ; ----- End of change ;OutputManifestFile=build\doliwampbuild.log AppId=doliwamp diff --git a/build/launchpad/README b/build/launchpad/README index c27f3403a5f..cac4aa625b3 100644 --- a/build/launchpad/README +++ b/build/launchpad/README @@ -61,5 +61,25 @@ DEBEMAIL="" sudo pbuilder build /_.dsc +# To get/download package: +Add signing key of the Launchpad repository: +> gpg --keyserver keyserver.ubuntu.com --recv-key A38BF8FD +> sudo apt-key add ~/.gnupg/pubring.gpg + +Add Dolibarr Launchpad repository to your system setup by adding the two lines to /etc/apt/sources.list +For the development snapshot version: +deb http://ppa.launchpad.net/eldy/dolibarr-dev/ubuntu precise main +deb-src http://ppa.launchpad.net/eldy/dolibarr-dev/ubuntu precise main +For the stable version: +deb http://ppa.launchpad.net/eldy/dolibarr-stable/ubuntu precise main +deb-src http://ppa.launchpad.net/eldy/dolibarr-stable/ubuntu precise main + +Update your package cache: +> apt-get update + +Install Dolibarr: +> apt-get install dolibarr + + diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 857a2216652..8f6aadbd010 100644 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -9,7 +9,7 @@ use Cwd; $PROJECT="dolibarr"; $MAJOR="3"; -$MINOR="2"; +$MINOR="3"; $BUILD="0-alpha"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate $RPMSUBVERSION="auto"; # auto use value found into BUILD @@ -38,7 +38,7 @@ $FILENAMEZIP="$PROJECT-$MAJOR.$MINOR.$BUILD"; $FILENAMERPM="$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION"; $FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${BUILD}"; $FILENAMEAPS="$PROJECT-$MAJOR.$MINOR.$BUILD.app"; -$FILENAMEEXEDOLIWAMP="$PROJECT-$MAJOR.$MINOR.$BUILD"; +$FILENAMEEXEDOLIWAMP="DoliWamp-$MAJOR.$MINOR.$BUILD"; if (-d "/usr/src/redhat") { $RPMDIR="/usr/src/redhat"; } # redhat if (-d "/usr/src/RPM") { $RPMDIR="/usr/src/RPM"; } # mandrake @@ -763,8 +763,10 @@ if ($nboftargetok) { print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n"; unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"; - print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCE\\build\\exe\\doliwamp\\doliwamp.iss\"\n"; - $cmd= "iscc.exe \"$SOURCE\\build\\exe\\doliwamp\\doliwamp.iss\""; + $SOURCEBACK=$SOURCE; + $SOURCEBACK =~ s/\//\\/g; + print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n"; + $cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\""; print "$cmd\n"; $ret= `$cmd`; #print "$ret\n"; @@ -772,6 +774,8 @@ if ($nboftargetok) { # Move to final dir print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n"; rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"); + print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n"; + $ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`; next; } } diff --git a/build/makepack-howto.txt b/build/makepack-howto.txt index 219c64f0f0f..44d96f3c109 100644 --- a/build/makepack-howto.txt +++ b/build/makepack-howto.txt @@ -12,7 +12,7 @@ beta version of Dolibarr, step by step. - Update version number with x.x.x in build/doxygen/dolibarr-doxygen.doxyfile - Update version number with x.x.x in build/perl/virtualmin/dolibarr.pl - Update version number with x.x.x-y in build/makepack-dolibarr.pl -- Update version number with x.x.x-y in build/deb/changelog +- Update version number with x.x.x-y in build/debian/changelog - Update version number with x.x.x-y in build/exe/doliwamp/doliwamp.iss - Update version number with x.x.x-y in htdocs/filefunc.inc.php - Update version number with x.x.x-y in htdocs/install/inc.php diff --git a/build/perl/virtualmin/dolibarr.pl b/build/perl/virtualmin/dolibarr.pl index 04391f654d2..b6c42c9997a 100644 --- a/build/perl/virtualmin/dolibarr.pl +++ b/build/perl/virtualmin/dolibarr.pl @@ -30,7 +30,7 @@ return "Regis Houssin"; # script_dolibarr_versions() sub script_dolibarr_versions { -return ( "3.1.0", "3.0.1", "2.9.0" ); +return ( "3.3.0", "3.2.0", "3.1.0", "3.0.1", "2.9.0" ); } sub script_dolibarr_category diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 4d3daf6b097..1efff53ca63 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -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 "" >> $config + grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config + grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config + #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config + grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $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 Jul 31 2011 Laurent Destailleur 3.2.0-0.1.a +* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a - Initial version (#723326) diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index 12afc21fb5e..878e940bef6 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -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 "" >> $config + grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config + grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config + #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config + grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $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 Jul 31 2011 Laurent Destailleur 3.2.0-0.1.a +* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a - Initial version (#723326) diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index dded5f3cc0b..f7dc40294be 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -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 "" >> $config + grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config + grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config + #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config + grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $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 Jul 31 2011 Laurent Destailleur 3.2.0-0.1.a +* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a - Initial version (#723326) diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 0b2a0c9caf7..e5ae1434759 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -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 "" >> $config + grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config + grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config + #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config + grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $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 Jul 31 2011 Laurent Destailleur 3.2.0-0.1.a +* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a - Initial version (#723326) diff --git a/build/rpm/install.forced.php.opensuse b/build/rpm/install.forced.php.opensuse index 3c5d2e2ea24..90c4d6ab182 100755 --- a/build/rpm/install.forced.php.opensuse +++ b/build/rpm/install.forced.php.opensuse @@ -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'; ?> \ No newline at end of file diff --git a/build/zip/zip_exclude.txt b/build/zip/zip_exclude.txt index 1409e7ee9db..15f2aa51dca 100644 --- a/build/zip/zip_exclude.txt +++ b/build/zip/zip_exclude.txt @@ -87,6 +87,4 @@ cvschangelogbuilder_dolibarr* */huitre/* */pdf_huitre.modules.php doxygen_warnings.log -dolibarr_install.log -*/doc_generic_invoice_odt.modules.php -*/htdocs/theme/bureau2crea/* \ No newline at end of file +dolibarr_install.log \ No newline at end of file diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index 0eb11636295..5bf1664f695 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -30,7 +30,7 @@ public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false, $ln= by public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=false, $maxh=0, $valign='T', $fitcell=false) { -* Removed all fonts except dejavu* (greek, arab, persan, romanian, turkish), freemono* (russian), stsongstdlight* (chinese), helvetica* (all other) and useless directories (fonts/utils, docs, cache, images) +* Removed all fonts except dejavu* (used by greek, arab, persan, romanian, turkish), freemono* (russian), stsongstdlight* (chinese), helvetica* (all other) and useless directories (fonts/utils, docs, cache, images) * Replace in tcpdf_config.php define ('K_PATH_CACHE', K_PATH_MAIN.'cache/'); diff --git a/dev/initdata/initdemo.sh b/dev/initdata/initdemo.sh index 739e09cd054..588ed08d6c5 100644 --- a/dev/initdata/initdemo.sh +++ b/dev/initdata/initdemo.sh @@ -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 diff --git a/dev/initdata/mysqldump_dolibarr_3.2.0.sql b/dev/initdata/mysqldump_dolibarr_3.2.0.sql new file mode 100644 index 00000000000..2f37511706f --- /dev/null +++ b/dev/initdata/mysqldump_dolibarr_3.2.0.sql @@ -0,0 +1,6200 @@ +-- MySQL dump 10.13 Distrib 5.1.61, for debian-linux-gnu (i686) +-- +-- Host: localhost Database: dolibarrold +-- ------------------------------------------------------ +-- Server version 5.1.61-0ubuntu0.11.10.1 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `llx_accountingaccount` +-- + +DROP TABLE IF EXISTS `llx_accountingaccount`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_accountingaccount` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_pcg_version` varchar(12) NOT NULL, + `pcg_type` varchar(20) NOT NULL, + `pcg_subtype` varchar(20) NOT NULL, + `label` varchar(128) NOT NULL, + `account_number` varchar(20) NOT NULL, + `account_parent` varchar(20) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_accountingaccount_fk_pcg_version` (`fk_pcg_version`), + CONSTRAINT `fk_accountingaccount_fk_pcg_version` FOREIGN KEY (`fk_pcg_version`) REFERENCES `llx_accountingsystem` (`pcg_version`) +) ENGINE=InnoDB AUTO_INCREMENT=103 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_accountingaccount` +-- + +LOCK TABLES `llx_accountingaccount` WRITE; +/*!40000 ALTER TABLE `llx_accountingaccount` DISABLE KEYS */; +INSERT INTO `llx_accountingaccount` (`rowid`, `fk_pcg_version`, `pcg_type`, `pcg_subtype`, `label`, `account_number`, `account_parent`) VALUES (1,'PCG99-ABREGE','CAPIT','CAPITAL','Capital','101','1'),(2,'PCG99-ABREGE','CAPIT','XXXXXX','Ecarts de réévaluation','105','1'),(3,'PCG99-ABREGE','CAPIT','XXXXXX','Réserve légale','1061','1'),(4,'PCG99-ABREGE','CAPIT','XXXXXX','Réserves statutaires ou contractuelles','1063','1'),(5,'PCG99-ABREGE','CAPIT','XXXXXX','Réserves réglementées','1064','1'),(6,'PCG99-ABREGE','CAPIT','XXXXXX','Autres réserves','1068','1'),(7,'PCG99-ABREGE','CAPIT','XXXXXX','Compte de l\'exploitant','108','1'),(8,'PCG99-ABREGE','CAPIT','XXXXXX','Résultat de l\'exercice','12','1'),(9,'PCG99-ABREGE','CAPIT','XXXXXX','Amortissements dérogatoires','145','1'),(10,'PCG99-ABREGE','CAPIT','XXXXXX','Provision spéciale de réévaluation','146','1'),(11,'PCG99-ABREGE','CAPIT','XXXXXX','Plus-values réinvesties','147','1'),(12,'PCG99-ABREGE','CAPIT','XXXXXX','Autres provisions réglementées','148','1'),(13,'PCG99-ABREGE','CAPIT','XXXXXX','Provisions pour risques et charges','15','1'),(14,'PCG99-ABREGE','CAPIT','XXXXXX','Emprunts et dettes assimilees','16','1'),(15,'PCG99-ABREGE','IMMO','XXXXXX','Immobilisations incorporelles','20','2'),(16,'PCG99-ABREGE','IMMO','XXXXXX','Frais d\'établissement','201','20'),(17,'PCG99-ABREGE','IMMO','XXXXXX','Droit au bail','206','20'),(18,'PCG99-ABREGE','IMMO','XXXXXX','Fonds commercial','207','20'),(19,'PCG99-ABREGE','IMMO','XXXXXX','Autres immobilisations incorporelles','208','20'),(20,'PCG99-ABREGE','IMMO','XXXXXX','Immobilisations corporelles','21','2'),(21,'PCG99-ABREGE','IMMO','XXXXXX','Immobilisations en cours','23','2'),(22,'PCG99-ABREGE','IMMO','XXXXXX','Autres immobilisations financieres','27','2'),(23,'PCG99-ABREGE','IMMO','XXXXXX','Amortissements des immobilisations incorporelles','280','2'),(24,'PCG99-ABREGE','IMMO','XXXXXX','Amortissements des immobilisations corporelles','281','2'),(25,'PCG99-ABREGE','IMMO','XXXXXX','Provisions pour dépréciation des immobilisations incorporelles','290','2'),(26,'PCG99-ABREGE','IMMO','XXXXXX','Provisions pour dépréciation des immobilisations corporelles','291','2'),(27,'PCG99-ABREGE','IMMO','XXXXXX','Provisions pour dépréciation des autres immobilisations financières','297','2'),(28,'PCG99-ABREGE','STOCK','XXXXXX','Matieres premières','31','3'),(29,'PCG99-ABREGE','STOCK','XXXXXX','Autres approvisionnements','32','3'),(30,'PCG99-ABREGE','STOCK','XXXXXX','En-cours de production de biens','33','3'),(31,'PCG99-ABREGE','STOCK','XXXXXX','En-cours de production de services','34','3'),(32,'PCG99-ABREGE','STOCK','XXXXXX','Stocks de produits','35','3'),(33,'PCG99-ABREGE','STOCK','XXXXXX','Stocks de marchandises','37','3'),(34,'PCG99-ABREGE','STOCK','XXXXXX','Provisions pour dépréciation des matières premières','391','3'),(35,'PCG99-ABREGE','STOCK','XXXXXX','Provisions pour dépréciation des autres approvisionnements','392','3'),(36,'PCG99-ABREGE','STOCK','XXXXXX','Provisions pour dépréciation des en-cours de production de biens','393','3'),(37,'PCG99-ABREGE','STOCK','XXXXXX','Provisions pour dépréciation des en-cours de production de services','394','3'),(38,'PCG99-ABREGE','STOCK','XXXXXX','Provisions pour dépréciation des stocks de produits','395','3'),(39,'PCG99-ABREGE','STOCK','XXXXXX','Provisions pour dépréciation des stocks de marchandises','397','3'),(40,'PCG99-ABREGE','TIERS','SUPPLIER','Fournisseurs et Comptes rattachés','400','4'),(41,'PCG99-ABREGE','TIERS','XXXXXX','Fournisseurs débiteurs','409','4'),(42,'PCG99-ABREGE','TIERS','CUSTOMER','Clients et Comptes rattachés','410','4'),(43,'PCG99-ABREGE','TIERS','XXXXXX','Clients créditeurs','419','4'),(44,'PCG99-ABREGE','TIERS','XXXXXX','Personnel','421','4'),(45,'PCG99-ABREGE','TIERS','XXXXXX','Personnel','428','4'),(46,'PCG99-ABREGE','TIERS','XXXXXX','Sécurité sociale et autres organismes sociaux','43','4'),(47,'PCG99-ABREGE','TIERS','XXXXXX','Etat - impôts sur bénéfice','444','4'),(48,'PCG99-ABREGE','TIERS','XXXXXX','Etat - Taxes sur chiffre affaire','445','4'),(49,'PCG99-ABREGE','TIERS','XXXXXX','Autres impôts, taxes et versements assimilés','447','4'),(50,'PCG99-ABREGE','TIERS','XXXXXX','Groupe et associes','45','4'),(51,'PCG99-ABREGE','TIERS','XXXXXX','Associés','455','45'),(52,'PCG99-ABREGE','TIERS','XXXXXX','Débiteurs divers et créditeurs divers','46','4'),(53,'PCG99-ABREGE','TIERS','XXXXXX','Comptes transitoires ou d\'attente','47','4'),(54,'PCG99-ABREGE','TIERS','XXXXXX','Charges à répartir sur plusieurs exercices','481','4'),(55,'PCG99-ABREGE','TIERS','XXXXXX','Charges constatées d\'avance','486','4'),(56,'PCG99-ABREGE','TIERS','XXXXXX','Produits constatés d\'avance','487','4'),(57,'PCG99-ABREGE','TIERS','XXXXXX','Provisions pour dépréciation des comptes de clients','491','4'),(58,'PCG99-ABREGE','TIERS','XXXXXX','Provisions pour dépréciation des comptes de débiteurs divers','496','4'),(59,'PCG99-ABREGE','FINAN','XXXXXX','Valeurs mobilières de placement','50','5'),(60,'PCG99-ABREGE','FINAN','BANK','Banques, établissements financiers et assimilés','51','5'),(61,'PCG99-ABREGE','FINAN','CASH','Caisse','53','5'),(62,'PCG99-ABREGE','FINAN','XXXXXX','Régies d\'avance et accréditifs','54','5'),(63,'PCG99-ABREGE','FINAN','XXXXXX','Virements internes','58','5'),(64,'PCG99-ABREGE','FINAN','XXXXXX','Provisions pour dépréciation des valeurs mobilières de placement','590','5'),(65,'PCG99-ABREGE','CHARGE','PRODUCT','Achats','60','6'),(66,'PCG99-ABREGE','CHARGE','XXXXXX','Variations des stocks','603','60'),(67,'PCG99-ABREGE','CHARGE','SERVICE','Services extérieurs','61','6'),(68,'PCG99-ABREGE','CHARGE','XXXXXX','Autres services extérieurs','62','6'),(69,'PCG99-ABREGE','CHARGE','XXXXXX','Impôts, taxes et versements assimiles','63','6'),(70,'PCG99-ABREGE','CHARGE','XXXXXX','Rémunérations du personnel','641','6'),(71,'PCG99-ABREGE','CHARGE','XXXXXX','Rémunération du travail de l\'exploitant','644','6'),(72,'PCG99-ABREGE','CHARGE','SOCIAL','Charges de sécurité sociale et de prévoyance','645','6'),(73,'PCG99-ABREGE','CHARGE','XXXXXX','Cotisations sociales personnelles de l\'exploitant','646','6'),(74,'PCG99-ABREGE','CHARGE','XXXXXX','Autres charges de gestion courante','65','6'),(75,'PCG99-ABREGE','CHARGE','XXXXXX','Charges financières','66','6'),(76,'PCG99-ABREGE','CHARGE','XXXXXX','Charges exceptionnelles','67','6'),(77,'PCG99-ABREGE','CHARGE','XXXXXX','Dotations aux amortissements et aux provisions','681','6'),(78,'PCG99-ABREGE','CHARGE','XXXXXX','Dotations aux amortissements et aux provisions','686','6'),(79,'PCG99-ABREGE','CHARGE','XXXXXX','Dotations aux amortissements et aux provisions','687','6'),(80,'PCG99-ABREGE','CHARGE','XXXXXX','Participation des salariés aux résultats','691','6'),(81,'PCG99-ABREGE','CHARGE','XXXXXX','Impôts sur les bénéfices','695','6'),(82,'PCG99-ABREGE','CHARGE','XXXXXX','Imposition forfaitaire annuelle des sociétés','697','6'),(83,'PCG99-ABREGE','CHARGE','XXXXXX','Produits','699','6'),(84,'PCG99-ABREGE','PROD','PRODUCT','Ventes de produits finis','701','7'),(85,'PCG99-ABREGE','PROD','SERVICE','Prestations de services','706','7'),(86,'PCG99-ABREGE','PROD','PRODUCT','Ventes de marchandises','707','7'),(87,'PCG99-ABREGE','PROD','PRODUCT','Produits des activités annexes','708','7'),(88,'PCG99-ABREGE','PROD','XXXXXX','Rabais, remises et ristournes accordés par l\'entreprise','709','7'),(89,'PCG99-ABREGE','PROD','XXXXXX','Variation des stocks','713','7'),(90,'PCG99-ABREGE','PROD','XXXXXX','Production immobilisée','72','7'),(91,'PCG99-ABREGE','PROD','XXXXXX','Produits nets partiels sur opérations à long terme','73','7'),(92,'PCG99-ABREGE','PROD','XXXXXX','Subventions d\'exploitation','74','7'),(93,'PCG99-ABREGE','PROD','XXXXXX','Autres produits de gestion courante','75','7'),(94,'PCG99-ABREGE','PROD','XXXXXX','Jetons de présence et rémunérations d\'administrateurs, gérants,...','753','75'),(95,'PCG99-ABREGE','PROD','XXXXXX','Ristournes perçues des coopératives','754','75'),(96,'PCG99-ABREGE','PROD','XXXXXX','Quotes-parts de résultat sur opérations faites en commun','755','75'),(97,'PCG99-ABREGE','PROD','XXXXXX','Produits financiers','76','7'),(98,'PCG99-ABREGE','PROD','XXXXXX','Produits exceptionnels','77','7'),(99,'PCG99-ABREGE','PROD','XXXXXX','Reprises sur amortissements et provisions','781','7'),(100,'PCG99-ABREGE','PROD','XXXXXX','Reprises sur provisions pour risques','786','7'),(101,'PCG99-ABREGE','PROD','XXXXXX','Reprises sur provisions','787','7'),(102,'PCG99-ABREGE','PROD','XXXXXX','Transferts de charges','79','7'); +/*!40000 ALTER TABLE `llx_accountingaccount` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_accountingdebcred` +-- + +DROP TABLE IF EXISTS `llx_accountingdebcred`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_accountingdebcred` ( + `fk_transaction` int(11) NOT NULL, + `fk_account` int(11) NOT NULL, + `amount` double NOT NULL, + `direction` varchar(1) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_accountingdebcred` +-- + +LOCK TABLES `llx_accountingdebcred` WRITE; +/*!40000 ALTER TABLE `llx_accountingdebcred` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_accountingdebcred` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_accountingsystem` +-- + +DROP TABLE IF EXISTS `llx_accountingsystem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_accountingsystem` ( + `pcg_version` varchar(12) NOT NULL, + `fk_pays` int(11) NOT NULL, + `label` varchar(128) NOT NULL, + `datec` varchar(12) NOT NULL, + `fk_author` varchar(20) DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `active` smallint(6) DEFAULT '0', + PRIMARY KEY (`pcg_version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_accountingsystem` +-- + +LOCK TABLES `llx_accountingsystem` WRITE; +/*!40000 ALTER TABLE `llx_accountingsystem` DISABLE KEYS */; +INSERT INTO `llx_accountingsystem` (`pcg_version`, `fk_pays`, `label`, `datec`, `fk_author`, `tms`, `active`) VALUES ('PCG99-ABREGE',1,'The simple accountancy french plan','2011-07-29',NULL,'2011-07-28 22:26:11',0); +/*!40000 ALTER TABLE `llx_accountingsystem` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_accountingtransaction` +-- + +DROP TABLE IF EXISTS `llx_accountingtransaction`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_accountingtransaction` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `label` varchar(128) NOT NULL, + `datec` date NOT NULL, + `fk_author` varchar(20) NOT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_facture` int(11) DEFAULT NULL, + `fk_facture_fourn` int(11) DEFAULT NULL, + `fk_paiement` int(11) DEFAULT NULL, + `fk_paiement_fourn` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_accountingtransaction` +-- + +LOCK TABLES `llx_accountingtransaction` WRITE; +/*!40000 ALTER TABLE `llx_accountingtransaction` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_accountingtransaction` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_actioncomm` +-- + +DROP TABLE IF EXISTS `llx_actioncomm`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_actioncomm` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `ref_ext` varchar(128) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `datep` datetime DEFAULT NULL, + `datep2` datetime DEFAULT NULL, + `datea` datetime DEFAULT NULL, + `datea2` datetime DEFAULT NULL, + `fk_action` int(11) DEFAULT NULL, + `label` varchar(128) NOT NULL, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_user_author` int(11) DEFAULT NULL, + `fk_user_mod` int(11) DEFAULT NULL, + `fk_project` int(11) DEFAULT NULL, + `fk_soc` int(11) DEFAULT NULL, + `fk_contact` int(11) DEFAULT NULL, + `fk_parent` int(11) NOT NULL DEFAULT '0', + `fk_user_action` int(11) DEFAULT NULL, + `fk_user_done` int(11) DEFAULT NULL, + `priority` smallint(6) DEFAULT NULL, + `fulldayevent` smallint(6) NOT NULL DEFAULT '0', + `punctual` smallint(6) NOT NULL DEFAULT '1', + `percent` smallint(6) NOT NULL DEFAULT '0', + `location` varchar(128) DEFAULT NULL, + `durationp` double DEFAULT NULL, + `durationa` double DEFAULT NULL, + `note` text, + `fk_element` int(11) DEFAULT NULL, + `elementtype` varchar(16) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_actioncomm_datea` (`datea`), + KEY `idx_actioncomm_fk_soc` (`fk_soc`), + KEY `idx_actioncomm_fk_contact` (`fk_contact`) +) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_actioncomm` +-- + +LOCK TABLES `llx_actioncomm` WRITE; +/*!40000 ALTER TABLE `llx_actioncomm` DISABLE KEYS */; +INSERT INTO `llx_actioncomm` (`id`, `ref_ext`, `entity`, `datep`, `datep2`, `datea`, `datea2`, `fk_action`, `label`, `datec`, `tms`, `fk_user_author`, `fk_user_mod`, `fk_project`, `fk_soc`, `fk_contact`, `fk_parent`, `fk_user_action`, `fk_user_done`, `priority`, `fulldayevent`, `punctual`, `percent`, `location`, `durationp`, `durationa`, `note`, `fk_element`, `elementtype`) VALUES (1,NULL,1,'2010-07-08 14:21:44','2010-07-08 14:21:44',NULL,NULL,50,'Company AAA and Co added into Dolibarr','2010-07-08 14:21:44','2010-07-08 12:21:44',1,NULL,NULL,1,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Company AAA and Co added into Dolibarr\nAuthor: admin',NULL,NULL),(2,NULL,1,'2010-07-08 14:23:48','2010-07-08 14:23:48',NULL,NULL,50,'Company Belin SARL added into Dolibarr','2010-07-08 14:23:48','2010-07-08 12:23:48',1,NULL,NULL,2,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Company Belin SARL added into Dolibarr\nAuthor: admin',NULL,NULL),(3,NULL,1,'2010-07-08 22:42:12','2010-07-08 22:42:12',NULL,NULL,50,'Company Spanish Comp added into Dolibarr','2010-07-08 22:42:12','2010-07-08 20:42:12',1,NULL,NULL,3,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Company Spanish Comp added into Dolibarr\nAuthor: admin',NULL,NULL),(4,NULL,1,'2010-07-08 22:48:18','2010-07-08 22:48:18',NULL,NULL,50,'Company Prospector Vaalen added into Dolibarr','2010-07-08 22:48:18','2010-07-08 20:48:18',1,NULL,NULL,4,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Company Prospector Vaalen added into Dolibarr\nAuthor: admin',NULL,NULL),(5,NULL,1,'2010-07-08 23:22:57','2010-07-08 23:22:57',NULL,NULL,50,'Company NoCountry Co added into Dolibarr','2010-07-08 23:22:57','2010-07-08 21:22:57',1,NULL,NULL,5,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Company NoCountry Co added into Dolibarr\nAuthor: admin',NULL,NULL),(6,NULL,1,'2010-07-09 00:15:09','2010-07-09 00:15:09',NULL,NULL,50,'Company Swiss customer added into Dolibarr','2010-07-09 00:15:09','2010-07-08 22:15:09',1,NULL,NULL,6,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Company Swiss customer added into Dolibarr\nAuthor: admin',NULL,NULL),(7,NULL,1,'2010-07-09 01:24:26','2010-07-09 01:24:26',NULL,NULL,50,'Company Generic customer added into Dolibarr','2010-07-09 01:24:26','2010-07-08 23:24:26',1,NULL,NULL,7,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Company Generic customer added into Dolibarr\nAuthor: admin',NULL,NULL),(8,NULL,1,'2010-07-10 14:54:27','2010-07-10 14:54:27',NULL,NULL,50,'Société Client salon ajoutée dans Dolibarr','2010-07-10 14:54:27','2010-07-10 12:54:27',1,NULL,NULL,8,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Société Client salon ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL),(9,NULL,1,'2010-07-10 14:54:44','2010-07-10 14:54:44',NULL,NULL,50,'Société Client salon invidivdu ajoutée dans Doliba','2010-07-10 14:54:44','2010-07-10 12:54:44',1,NULL,NULL,9,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Société Client salon invidivdu ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL),(10,NULL,1,'2010-07-10 14:56:10','2010-07-10 14:56:10',NULL,NULL,50,'Facture FA1007-0001 validée dans Dolibarr','2010-07-10 14:56:10','2011-07-18 17:29:22',1,NULL,NULL,9,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice'),(11,NULL,1,'2010-07-10 14:58:53','2010-07-10 14:58:53',NULL,NULL,50,'Facture FA1007-0001 validée dans Dolibarr','2010-07-10 14:58:53','2011-07-18 17:29:22',1,NULL,NULL,9,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice'),(12,NULL,1,'2010-07-10 15:00:55','2010-07-10 15:00:55',NULL,NULL,50,'Facture FA1007-0001 passée à payée dans Dolibarr','2010-07-10 15:00:55','2011-07-18 17:29:22',1,NULL,NULL,9,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr\nAuteur: admin',1,'invoice'),(13,NULL,1,'2010-07-10 15:13:08','2010-07-10 15:13:08',NULL,NULL,50,'Société Smith Vick ajoutée dans Dolibarr','2010-07-10 15:13:08','2010-07-10 13:13:08',1,NULL,NULL,10,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Société Smith Vick ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL),(14,NULL,1,'2010-07-10 15:21:00','2010-07-10 16:21:00',NULL,NULL,5,'RDV avec mon chef','2010-07-10 15:21:48','2010-07-10 13:21:48',1,NULL,NULL,NULL,NULL,0,1,NULL,0,0,1,0,'',3600,NULL,'',NULL,NULL),(15,NULL,1,'2010-07-10 18:18:16','2010-07-10 18:18:16',NULL,NULL,50,'Contrat CONTRAT1 validé dans Dolibarr','2010-07-10 18:18:16','2010-07-10 16:18:16',1,NULL,NULL,2,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Contrat CONTRAT1 validé dans Dolibarr\nAuteur: admin',NULL,NULL),(16,NULL,1,'2010-07-10 18:35:57','2010-07-10 18:35:57',NULL,NULL,50,'Société Mon client ajoutée dans Dolibarr','2010-07-10 18:35:57','2010-07-10 16:35:57',1,NULL,NULL,11,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Société Mon client ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL),(17,NULL,1,'2010-07-11 16:18:08','2010-07-11 16:18:08',NULL,NULL,50,'Société Dupont Alain ajoutée dans Dolibarr','2010-07-11 16:18:08','2010-07-11 14:18:08',1,NULL,NULL,12,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Société Dupont Alain ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL),(18,NULL,1,'2010-07-11 17:11:00','2010-07-11 17:17:00',NULL,NULL,5,'Rendez-vous','2010-07-11 17:11:22','2010-07-11 15:11:22',1,NULL,NULL,NULL,NULL,0,1,NULL,0,0,1,0,'gfgdfgdf',360,NULL,'',NULL,NULL),(19,NULL,1,'2010-07-11 17:13:20','2010-07-11 17:13:20',NULL,NULL,50,'Société Vendeur de chips ajoutée dans Dolibarr','2010-07-11 17:13:20','2010-07-11 15:13:20',1,NULL,NULL,13,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Société Vendeur de chips ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL),(20,NULL,1,'2010-07-11 17:15:42','2010-07-11 17:15:42',NULL,NULL,50,'Commande CF1007-0001 validée','2010-07-11 17:15:42','2010-07-11 15:15:42',1,NULL,NULL,13,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Commande CF1007-0001 validée\nAuteur: admin',NULL,NULL),(21,NULL,1,'2010-07-11 18:47:33','2010-07-11 18:47:33',NULL,NULL,50,'Commande CF1007-0002 validée','2010-07-11 18:47:33','2010-07-11 16:47:33',1,NULL,NULL,1,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Commande CF1007-0002 validée\nAuteur: admin',NULL,NULL),(22,NULL,1,'2010-07-18 11:36:18','2010-07-18 11:36:18',NULL,NULL,50,'Proposition PR1007-0003 validée','2010-07-18 11:36:18','2011-07-18 17:29:22',1,NULL,NULL,4,NULL,0,NULL,1,0,0,1,100,'',NULL,NULL,'Proposition PR1007-0003 validée\nAuteur: admin',3,'propal'),(23,NULL,1,'2011-07-18 20:49:58','2011-07-18 20:49:58',NULL,NULL,50,'Invoice FA1007-0002 validated in Dolibarr','2011-07-18 20:49:58','2011-07-18 18:49:58',1,NULL,NULL,2,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1007-0002 validated in Dolibarr\nAuthor: admin',2,'invoice'),(24,NULL,1,'2011-07-28 01:37:00',NULL,NULL,NULL,1,'Phone call','2011-07-28 01:37:48','2011-07-27 23:37:48',1,NULL,NULL,NULL,2,0,1,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL),(25,NULL,1,'2011-08-01 02:31:24','2011-08-01 02:31:24',NULL,NULL,50,'Company mmm added into Dolibarr','2011-08-01 02:31:24','2011-08-01 00:31:24',1,NULL,NULL,15,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Company mmm added into Dolibarr\nAuthor: admin',15,'societe'),(26,NULL,1,'2011-08-01 02:31:43','2011-08-01 02:31:43',NULL,NULL,50,'Company ppp added into Dolibarr','2011-08-01 02:31:43','2011-08-01 00:31:43',1,NULL,NULL,16,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Company ppp added into Dolibarr\nAuthor: admin',16,'societe'),(27,NULL,1,'2011-08-01 02:41:26','2011-08-01 02:41:26',NULL,NULL,50,'Company aaa added into Dolibarr','2011-08-01 02:41:26','2011-08-01 00:41:26',1,NULL,NULL,17,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Company aaa added into Dolibarr\nAuthor: admin',17,'societe'),(28,NULL,1,'2011-08-01 03:34:11','2011-08-01 03:34:11',NULL,NULL,50,'Invoice FA1108-0003 validated in Dolibarr','2011-08-01 03:34:11','2011-08-01 01:34:11',1,NULL,NULL,7,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0003 validated in Dolibarr\nAuthor: admin',5,'invoice'),(29,NULL,1,'2011-08-01 03:34:11','2011-08-01 03:34:11',NULL,NULL,50,'Invoice FA1108-0003 validated in Dolibarr','2011-08-01 03:34:11','2011-08-01 01:34:11',1,NULL,NULL,7,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0003 changed to paid in Dolibarr\nAuthor: admin',5,'invoice'),(30,NULL,1,'2011-08-06 20:33:54','2011-08-06 20:33:54',NULL,NULL,50,'Invoice FA1108-0004 validated in Dolibarr','2011-08-06 20:33:54','2011-08-06 18:33:54',1,NULL,NULL,7,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0004 validated in Dolibarr\nAuthor: admin',6,'invoice'),(31,NULL,1,'2011-08-06 20:33:54','2011-08-06 20:33:54',NULL,NULL,50,'Invoice FA1108-0004 validated in Dolibarr','2011-08-06 20:33:54','2011-08-06 18:33:54',1,NULL,NULL,7,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0004 changed to paid in Dolibarr\nAuthor: admin',6,'invoice'),(38,NULL,1,'2011-08-08 02:41:55','2011-08-08 02:41:55',NULL,NULL,50,'Invoice FA1108-0005 validated in Dolibarr','2011-08-08 02:41:55','2011-08-08 00:41:55',1,NULL,NULL,2,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0005 validated in Dolibarr\nAuthor: admin',8,'invoice'),(40,NULL,1,'2011-08-08 02:53:40','2011-08-08 02:53:40',NULL,NULL,50,'Invoice FA1108-0005 changed to paid in Dolibarr','2011-08-08 02:53:40','2011-08-08 00:53:40',1,NULL,NULL,2,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr\nAuthor: admin',8,'invoice'),(41,NULL,1,'2011-08-08 02:54:05','2011-08-08 02:54:05',NULL,NULL,50,'Invoice FA1007-0002 changed to paid in Dolibarr','2011-08-08 02:54:05','2011-08-08 00:54:05',1,NULL,NULL,2,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr\nAuthor: admin',2,'invoice'),(42,NULL,1,'2011-08-08 02:55:04','2011-08-08 02:55:04',NULL,NULL,50,'Invoice FA1107-0006 validated in Dolibarr','2011-08-08 02:55:04','2011-08-08 00:55:04',1,NULL,NULL,10,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1107-0006 validated in Dolibarr\nAuthor: admin',3,'invoice'),(43,NULL,1,'2011-08-08 02:55:26','2011-08-08 02:55:26',NULL,NULL,50,'Invoice FA1108-0007 validated in Dolibarr','2011-08-08 02:55:26','2011-08-08 00:55:26',1,NULL,NULL,10,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0007 validated in Dolibarr\nAuthor: admin',9,'invoice'),(44,NULL,1,'2011-08-08 02:55:58','2011-08-08 02:55:58',NULL,NULL,50,'Invoice FA1107-0006 changed to paid in Dolibarr','2011-08-08 02:55:58','2011-08-08 00:55:58',1,NULL,NULL,10,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr\nAuthor: admin',3,'invoice'),(45,NULL,1,'2011-08-08 03:04:22','2011-08-08 03:04:22',NULL,NULL,50,'Order CO1108-0001 validated','2011-08-08 03:04:22','2011-08-08 01:04:22',1,NULL,NULL,1,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CO1108-0001 validated\nAuthor: admin',5,'order'),(46,NULL,1,'2011-08-08 13:59:09','2011-08-08 13:59:09',NULL,NULL,50,'Order CO1107-0002 validated','2011-08-08 13:59:10','2011-08-08 11:59:10',1,NULL,NULL,1,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CO1107-0002 validated\nAuthor: admin',1,'order'),(47,NULL,1,'2011-08-08 14:24:18','2011-08-08 14:24:18',NULL,NULL,50,'Proposal PR1007-0001 validated','2011-08-08 14:24:18','2011-08-08 12:24:18',1,NULL,NULL,2,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposal PR1007-0001 validated\nAuthor: admin',1,'propal'),(48,NULL,1,'2011-08-08 14:24:24','2011-08-08 14:24:24',NULL,NULL,50,'Proposal PR1108-0004 validated','2011-08-08 14:24:24','2011-08-08 12:24:24',1,NULL,NULL,17,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposal PR1108-0004 validated\nAuthor: admin',4,'propal'),(49,NULL,1,'2011-08-08 15:04:37','2011-08-08 15:04:37',NULL,NULL,50,'Order CF1108-0003 validated','2011-08-08 15:04:37','2011-08-08 13:04:37',1,NULL,NULL,17,NULL,0,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CF1108-0003 validated\nAuthor: admin',6,'order_supplier'); +/*!40000 ALTER TABLE `llx_actioncomm` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_adherent` +-- + +DROP TABLE IF EXISTS `llx_adherent`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_adherent` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `entity` int(11) NOT NULL DEFAULT '1', + `ref_ext` varchar(30) DEFAULT NULL, + `civilite` varchar(6) DEFAULT NULL, + `nom` varchar(50) DEFAULT NULL, + `prenom` varchar(50) DEFAULT NULL, + `login` varchar(50) DEFAULT NULL, + `pass` varchar(50) DEFAULT NULL, + `fk_adherent_type` int(11) NOT NULL, + `morphy` varchar(3) NOT NULL, + `societe` varchar(50) DEFAULT NULL, + `fk_soc` int(11) DEFAULT NULL, + `adresse` text, + `cp` varchar(30) DEFAULT NULL, + `ville` varchar(50) DEFAULT NULL, + `fk_departement` int(11) DEFAULT NULL, + `pays` int(11) DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `phone` varchar(30) DEFAULT NULL, + `phone_perso` varchar(30) DEFAULT NULL, + `phone_mobile` varchar(30) DEFAULT NULL, + `naiss` date DEFAULT NULL, + `photo` varchar(255) DEFAULT NULL, + `statut` smallint(6) NOT NULL DEFAULT '0', + `public` smallint(6) NOT NULL DEFAULT '0', + `datefin` datetime DEFAULT NULL, + `note` text, + `datevalid` datetime DEFAULT NULL, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_user_author` int(11) DEFAULT NULL, + `fk_user_mod` int(11) DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_adherent_login` (`login`,`entity`), + UNIQUE KEY `uk_adherent_fk_soc` (`fk_soc`), + KEY `idx_adherent_fk_adherent_type` (`fk_adherent_type`), + CONSTRAINT `adherent_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), + CONSTRAINT `fk_adherent_adherent_type` FOREIGN KEY (`fk_adherent_type`) REFERENCES `llx_adherent_type` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_adherent` +-- + +LOCK TABLES `llx_adherent` WRITE; +/*!40000 ALTER TABLE `llx_adherent` DISABLE KEYS */; +INSERT INTO `llx_adherent` (`rowid`, `entity`, `ref_ext`, `civilite`, `nom`, `prenom`, `login`, `pass`, `fk_adherent_type`, `morphy`, `societe`, `fk_soc`, `adresse`, `cp`, `ville`, `fk_departement`, `pays`, `email`, `phone`, `phone_perso`, `phone_mobile`, `naiss`, `photo`, `statut`, `public`, `datefin`, `note`, `datevalid`, `datec`, `tms`, `fk_user_author`, `fk_user_mod`, `fk_user_valid`, `import_key`) VALUES (1,1,NULL,NULL,'Smith','Vick','vsmith','vsx1n8tf',2,'phy',NULL,10,NULL,NULL,NULL,NULL,102,'vsmith@email.com',NULL,NULL,NULL,'1960-07-07',NULL,1,0,NULL,NULL,'2010-07-10 15:12:56','2010-07-08 23:50:00','2010-07-10 13:13:08',1,1,1,NULL),(2,1,NULL,NULL,'Dupont','Alain','adupont','sng2bdf6',2,'phy',NULL,12,NULL,NULL,NULL,NULL,1,'toto@aa.com',NULL,NULL,NULL,'1972-07-08',NULL,1,1,'2013-07-17 00:00:00',NULL,'2010-07-10 15:03:32','2010-07-10 15:03:09','2010-07-18 10:20:33',1,1,1,NULL),(3,1,NULL,NULL,'john','doe','john','8bs6gty5',2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,1,'johndoe@email.com',NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,'2011-07-18 21:28:00','2011-07-18 21:10:09','2011-07-18 19:28:00',1,1,1,NULL),(4,1,NULL,NULL,'smith','smith','Smith','s6hjp10f',2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,11,'smith@email.com',NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,'2011-07-18 21:27:52','2011-07-18 21:27:44','2011-07-18 19:27:52',1,1,1,NULL); +/*!40000 ALTER TABLE `llx_adherent` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_adherent_extrafields` +-- + +DROP TABLE IF EXISTS `llx_adherent_extrafields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_adherent_extrafields` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_object` int(11) NOT NULL, + `zzz` varchar(125) DEFAULT NULL, + `aaa` varchar(255) DEFAULT NULL, + `sssss` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_adherent_options` (`fk_object`), + KEY `idx_adherent_extrafields` (`fk_object`) +) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_adherent_extrafields` +-- + +LOCK TABLES `llx_adherent_extrafields` WRITE; +/*!40000 ALTER TABLE `llx_adherent_extrafields` DISABLE KEYS */; +INSERT INTO `llx_adherent_extrafields` (`rowid`, `tms`, `fk_object`, `zzz`, `aaa`, `sssss`, `import_key`) VALUES (2,'2011-06-19 12:03:23',12,'aaa',NULL,NULL,NULL),(3,'2011-06-19 14:19:32',13,NULL,NULL,NULL,NULL),(8,'2011-06-19 18:08:09',7,'zzz',NULL,NULL,NULL),(34,'2011-06-22 10:06:51',14,'moo',NULL,NULL,NULL),(37,'2011-06-22 10:43:55',16,'z',NULL,NULL,NULL),(40,'2011-06-22 10:55:37',17,NULL,NULL,NULL,NULL),(41,'2011-06-22 10:56:07',18,'l',NULL,NULL,NULL),(43,'2011-06-23 07:40:56',19,NULL,NULL,NULL,NULL),(44,'2011-06-26 18:13:20',20,'gdfgdf',NULL,NULL,NULL),(46,'2011-06-26 19:29:23',22,'gdfgdf',NULL,NULL,NULL),(47,'2011-07-03 16:17:56',23,NULL,NULL,NULL,NULL),(48,'2011-07-03 16:21:05',24,NULL,NULL,NULL,NULL),(49,'2011-07-03 16:30:54',25,NULL,NULL,NULL,NULL),(50,'2011-07-03 16:48:13',26,NULL,NULL,NULL,NULL),(51,'2011-07-03 16:51:36',27,NULL,NULL,NULL,NULL),(52,'2011-07-03 16:53:37',28,NULL,NULL,NULL,NULL),(53,'2011-07-03 16:54:24',29,NULL,NULL,NULL,NULL),(54,'2011-07-05 08:21:35',30,NULL,NULL,NULL,NULL),(55,'2011-07-05 08:26:15',31,NULL,NULL,NULL,NULL),(59,'2011-07-13 11:18:55',46,NULL,NULL,NULL,NULL),(61,'2011-07-13 11:50:36',47,NULL,NULL,NULL,NULL),(62,'2011-07-18 19:10:09',3,NULL,NULL,NULL,NULL),(63,'2011-07-18 19:27:44',4,NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `llx_adherent_extrafields` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_adherent_options` +-- + +DROP TABLE IF EXISTS `llx_adherent_options`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_adherent_options` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_member` int(11) NOT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_adherent_options` (`fk_member`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_adherent_options` +-- + +LOCK TABLES `llx_adherent_options` WRITE; +/*!40000 ALTER TABLE `llx_adherent_options` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_adherent_options` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_adherent_options_label` +-- + +DROP TABLE IF EXISTS `llx_adherent_options_label`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_adherent_options_label` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(64) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `label` varchar(255) NOT NULL, + `type` varchar(8) DEFAULT NULL, + `size` int(11) DEFAULT '0', + `pos` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_adherent_options_label` +-- + +LOCK TABLES `llx_adherent_options_label` WRITE; +/*!40000 ALTER TABLE `llx_adherent_options_label` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_adherent_options_label` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_adherent_type` +-- + +DROP TABLE IF EXISTS `llx_adherent_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_adherent_type` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `entity` int(11) NOT NULL DEFAULT '1', + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `statut` smallint(6) NOT NULL DEFAULT '0', + `libelle` varchar(50) NOT NULL, + `cotisation` varchar(3) NOT NULL DEFAULT 'yes', + `vote` varchar(3) NOT NULL DEFAULT 'yes', + `note` text, + `mail_valid` text, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_adherent_type_libelle` (`libelle`,`entity`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_adherent_type` +-- + +LOCK TABLES `llx_adherent_type` WRITE; +/*!40000 ALTER TABLE `llx_adherent_type` DISABLE KEYS */; +INSERT INTO `llx_adherent_type` (`rowid`, `entity`, `tms`, `statut`, `libelle`, `cotisation`, `vote`, `note`, `mail_valid`) VALUES (1,1,'2010-07-08 21:41:55',1,'Board members','1','1','','
'),(2,1,'2010-07-08 21:41:43',1,'Standard members','1','0','','
'); +/*!40000 ALTER TABLE `llx_adherent_type` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_advanced_extrafields` +-- + +DROP TABLE IF EXISTS `llx_advanced_extrafields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_advanced_extrafields` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `entity` int(11) NOT NULL DEFAULT '1', + `elementtype` varchar(64) NOT NULL, + `name` varchar(64) NOT NULL, + `label` varchar(64) NOT NULL, + `format` varchar(8) NOT NULL, + `fieldsize` int(11) DEFAULT NULL, + `maxlength` int(11) DEFAULT NULL, + `options` varchar(255) DEFAULT NULL, + `rang` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_advanced_extrafields_name` (`elementtype`,`entity`,`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_advanced_extrafields` +-- + +LOCK TABLES `llx_advanced_extrafields` WRITE; +/*!40000 ALTER TABLE `llx_advanced_extrafields` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_advanced_extrafields` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_advanced_extrafields_options` +-- + +DROP TABLE IF EXISTS `llx_advanced_extrafields_options`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_advanced_extrafields_options` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_extrafields` int(11) NOT NULL, + `value` varchar(255) NOT NULL, + `rang` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_advanced_extrafields_options_fk_advanced_extrafields` (`fk_extrafields`), + CONSTRAINT `fk_advanced_extrafields_options_fk_advanced_extrafields` FOREIGN KEY (`fk_extrafields`) REFERENCES `llx_advanced_extrafields` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_advanced_extrafields_options` +-- + +LOCK TABLES `llx_advanced_extrafields_options` WRITE; +/*!40000 ALTER TABLE `llx_advanced_extrafields_options` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_advanced_extrafields_options` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_advanced_extrafields_values` +-- + +DROP TABLE IF EXISTS `llx_advanced_extrafields_values`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_advanced_extrafields_values` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `entity` int(11) NOT NULL DEFAULT '1', + `datec` datetime DEFAULT NULL, + `datem` datetime DEFAULT NULL, + `fk_element` int(11) NOT NULL, + `fk_extrafields` int(11) NOT NULL, + `value` varchar(255) DEFAULT NULL, + `fk_user_create` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_advanced_extrafields_values_fk_advanced_extrafields` (`fk_extrafields`,`entity`), + CONSTRAINT `fk_advanced_extrafields_values_fk_advanced_extrafields` FOREIGN KEY (`fk_extrafields`) REFERENCES `llx_advanced_extrafields` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_advanced_extrafields_values` +-- + +LOCK TABLES `llx_advanced_extrafields_values` WRITE; +/*!40000 ALTER TABLE `llx_advanced_extrafields_values` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_advanced_extrafields_values` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_bank` +-- + +DROP TABLE IF EXISTS `llx_bank`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_bank` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `datev` date DEFAULT NULL, + `dateo` date DEFAULT NULL, + `amount` double(24,8) NOT NULL DEFAULT '0.00000000', + `label` varchar(255) DEFAULT NULL, + `fk_account` int(11) DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `fk_user_rappro` int(11) DEFAULT NULL, + `fk_type` varchar(6) DEFAULT NULL, + `num_releve` varchar(50) DEFAULT NULL, + `num_chq` varchar(50) DEFAULT NULL, + `rappro` tinyint(4) DEFAULT '0', + `note` text, + `fk_bordereau` int(11) DEFAULT '0', + `banque` varchar(255) DEFAULT NULL, + `emetteur` varchar(255) DEFAULT NULL, + `author` varchar(40) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_bank_datev` (`datev`), + KEY `idx_bank_dateo` (`dateo`), + KEY `idx_bank_fk_account` (`fk_account`), + KEY `idx_bank_rappro` (`rappro`) +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_bank` +-- + +LOCK TABLES `llx_bank` WRITE; +/*!40000 ALTER TABLE `llx_bank` DISABLE KEYS */; +INSERT INTO `llx_bank` (`rowid`, `datec`, `datev`, `dateo`, `amount`, `label`, `fk_account`, `fk_user_author`, `fk_user_rappro`, `fk_type`, `num_releve`, `num_chq`, `rappro`, `note`, `fk_bordereau`, `banque`, `emetteur`, `author`) VALUES (1,'2010-07-08 23:56:14','2010-07-08','2010-07-08',2000.00000000,'(Initial balance)',1,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(2,'2010-07-09 00:00:24','2010-07-09','2010-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(3,'2010-07-10 13:33:42','2010-07-10','2010-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(4,'2010-07-10 14:59:41','2010-07-10','2010-07-10',0.02000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,'Client salon invidivdu',NULL),(5,'2011-07-18 20:50:24','2011-07-08','2011-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL),(6,'2011-07-18 20:50:47','2011-07-08','2011-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(8,'2011-08-01 03:34:11','2011-08-01','2011-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,NULL,'CB',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(10,'2011-08-05 20:38:30','2011-08-05','2011-08-05',-1.00000000,'(SocialContributionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(11,'2011-08-05 20:38:44','2011-08-05','2011-08-05',-9.00000000,'(SocialContributionPayment)',1,1,NULL,'TIP',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(12,'2011-08-05 23:11:37','2011-08-05','2011-08-05',-10.00000000,'(SocialContributionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(13,'2011-08-06 20:33:54','2011-08-06','2011-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(14,'2011-08-08 02:53:40','2011-08-08','2011-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(15,'2011-08-08 02:55:58','2011-08-08','2011-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,NULL,'TIP',NULL,NULL,0,NULL,0,NULL,NULL,NULL); +/*!40000 ALTER TABLE `llx_bank` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_bank_account` +-- + +DROP TABLE IF EXISTS `llx_bank_account`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_bank_account` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `ref` varchar(12) NOT NULL, + `label` varchar(30) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `bank` varchar(60) DEFAULT NULL, + `code_banque` varchar(7) DEFAULT NULL, + `code_guichet` varchar(6) DEFAULT NULL, + `number` varchar(255) DEFAULT NULL, + `cle_rib` varchar(5) DEFAULT NULL, + `bic` varchar(11) DEFAULT NULL, + `iban_prefix` varchar(34) DEFAULT NULL, + `country_iban` varchar(2) DEFAULT NULL, + `cle_iban` varchar(2) DEFAULT NULL, + `domiciliation` varchar(255) DEFAULT NULL, + `fk_departement` int(11) DEFAULT NULL, + `fk_pays` int(11) NOT NULL, + `proprio` varchar(60) DEFAULT NULL, + `adresse_proprio` varchar(255) DEFAULT NULL, + `courant` smallint(6) NOT NULL DEFAULT '0', + `clos` smallint(6) NOT NULL DEFAULT '0', + `rappro` smallint(6) DEFAULT '1', + `url` varchar(128) DEFAULT NULL, + `account_number` varchar(8) DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, + `min_allowed` int(11) DEFAULT '0', + `min_desired` int(11) DEFAULT '0', + `comment` text, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_bank_account_label` (`label`,`entity`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_bank_account` +-- + +LOCK TABLES `llx_bank_account` WRITE; +/*!40000 ALTER TABLE `llx_bank_account` DISABLE KEYS */; +INSERT INTO `llx_bank_account` (`rowid`, `datec`, `tms`, `ref`, `label`, `entity`, `bank`, `code_banque`, `code_guichet`, `number`, `cle_rib`, `bic`, `iban_prefix`, `country_iban`, `cle_iban`, `domiciliation`, `fk_departement`, `fk_pays`, `proprio`, `adresse_proprio`, `courant`, `clos`, `rappro`, `url`, `account_number`, `currency_code`, `min_allowed`, `min_desired`, `comment`) VALUES (1,'2010-07-08 23:56:14','2010-07-08 21:56:14','SWIBAC','Swiss bank account',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,181,6,NULL,NULL,1,0,1,NULL,'','EUR',1500,1500,'
'),(2,'2010-07-09 00:00:24','2010-07-08 22:00:24','SWIBAC2','Swiss bank account 2',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,179,6,NULL,NULL,1,1,1,NULL,'','EUR',200,400,'
'),(3,'2010-07-10 13:33:42','2010-07-10 11:33:42','ACCOUNTCASH','Account for cash',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,1,NULL,NULL,2,0,1,NULL,'','EUR',0,0,'
'); +/*!40000 ALTER TABLE `llx_bank_account` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_bank_categ` +-- + +DROP TABLE IF EXISTS `llx_bank_categ`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_bank_categ` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `label` varchar(255) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_bank_categ` +-- + +LOCK TABLES `llx_bank_categ` WRITE; +/*!40000 ALTER TABLE `llx_bank_categ` DISABLE KEYS */; +INSERT INTO `llx_bank_categ` (`rowid`, `label`, `entity`) VALUES (1,'Bank category one',1),(2,'Bank category two',1); +/*!40000 ALTER TABLE `llx_bank_categ` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_bank_class` +-- + +DROP TABLE IF EXISTS `llx_bank_class`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_bank_class` ( + `lineid` int(11) NOT NULL, + `fk_categ` int(11) NOT NULL, + UNIQUE KEY `uk_bank_class_lineid` (`lineid`,`fk_categ`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_bank_class` +-- + +LOCK TABLES `llx_bank_class` WRITE; +/*!40000 ALTER TABLE `llx_bank_class` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_bank_class` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_bank_url` +-- + +DROP TABLE IF EXISTS `llx_bank_url`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_bank_url` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_bank` int(11) DEFAULT NULL, + `url_id` int(11) DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `type` varchar(20) NOT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_bank_url` (`fk_bank`,`type`) +) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_bank_url` +-- + +LOCK TABLES `llx_bank_url` WRITE; +/*!40000 ALTER TABLE `llx_bank_url` DISABLE KEYS */; +INSERT INTO `llx_bank_url` (`rowid`, `fk_bank`, `url_id`, `url`, `label`, `type`) VALUES (1,4,1,'/dolibarrnew/compta/paiement/fiche.php?id=','(paiement)','payment'),(2,4,9,'/dolibarrnew/compta/fiche.php?socid=','Client salon invidivdu','company'),(3,5,2,'/compta/paiement/fiche.php?id=','(paiement)','payment'),(4,5,2,'/comm/fiche.php?socid=','Belin SARL','company'),(5,6,3,'/compta/paiement/fiche.php?id=','(paiement)','payment'),(6,6,2,'/comm/fiche.php?socid=','Belin SARL','company'),(9,8,5,'/compta/paiement/fiche.php?id=','(paiement)','payment'),(10,8,7,'/comm/fiche.php?socid=','Generic customer','company'),(17,12,4,'/compta/payment_sc/fiche.php?id=','(paiement)','payment_sc'),(18,12,4,'/compta/charges.php?id=','Assurance Chomage (fff)','sc'),(19,13,6,'/dolibarrnew/compta/paiement/fiche.php?id=','(paiement)','payment'),(20,13,7,'/dolibarrnew/comm/fiche.php?socid=','Generic customer','company'),(21,14,8,'/compta/paiement/fiche.php?id=','(paiement)','payment'),(22,14,2,'/comm/fiche.php?socid=','Belin SARL','company'),(23,15,9,'/compta/paiement/fiche.php?id=','(paiement)','payment'),(24,15,10,'/comm/fiche.php?socid=','Smith Vick','company'); +/*!40000 ALTER TABLE `llx_bank_url` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_bookmark` +-- + +DROP TABLE IF EXISTS `llx_bookmark`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_bookmark` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_soc` int(11) DEFAULT NULL, + `fk_user` int(11) NOT NULL, + `dateb` datetime DEFAULT NULL, + `url` varchar(128) NOT NULL, + `target` varchar(16) DEFAULT NULL, + `title` varchar(64) DEFAULT NULL, + `favicon` varchar(24) DEFAULT NULL, + `position` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_bookmark_url` (`fk_user`,`url`), + UNIQUE KEY `uk_bookmark_title` (`fk_user`,`title`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_bookmark` +-- + +LOCK TABLES `llx_bookmark` WRITE; +/*!40000 ALTER TABLE `llx_bookmark` DISABLE KEYS */; +INSERT INTO `llx_bookmark` (`rowid`, `fk_soc`, `fk_user`, `dateb`, `url`, `target`, `title`, `favicon`, `position`) VALUES (1,NULL,0,'2010-07-09 01:29:03','http://wiki.dolibarr.org','1','Online documentation','none',1),(2,NULL,0,'2010-07-09 01:30:15','http://www.dolibarr.org','1','Official portal','none',2),(3,NULL,0,'2010-07-09 01:30:53','http://www.dolistore.com','1','DoliStore','none',10),(4,NULL,0,'2010-07-09 01:31:35','http://asso.dolibarr.org/index.php/Main_Page','1','The foundation','none',0); +/*!40000 ALTER TABLE `llx_bookmark` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_bordereau_cheque` +-- + +DROP TABLE IF EXISTS `llx_bordereau_cheque`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_bordereau_cheque` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime NOT NULL, + `date_bordereau` date DEFAULT NULL, + `number` varchar(16) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `amount` double(24,8) NOT NULL, + `nbcheque` smallint(6) NOT NULL, + `fk_bank_account` int(11) DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `note` text, + `statut` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_bordereau_cheque` (`number`,`entity`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_bordereau_cheque` +-- + +LOCK TABLES `llx_bordereau_cheque` WRITE; +/*!40000 ALTER TABLE `llx_bordereau_cheque` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_bordereau_cheque` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_boxes` +-- + +DROP TABLE IF EXISTS `llx_boxes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_boxes` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `box_id` int(11) NOT NULL, + `position` smallint(6) NOT NULL, + `box_order` varchar(3) NOT NULL, + `fk_user` int(11) NOT NULL DEFAULT '0', + `maxline` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_boxes` (`box_id`,`position`,`fk_user`), + KEY `idx_boxes_boxid` (`box_id`), + KEY `idx_boxes_fk_user` (`fk_user`), + CONSTRAINT `fk_boxes_box_id` FOREIGN KEY (`box_id`) REFERENCES `llx_boxes_def` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_boxes` +-- + +LOCK TABLES `llx_boxes` WRITE; +/*!40000 ALTER TABLE `llx_boxes` DISABLE KEYS */; +INSERT INTO `llx_boxes` (`rowid`, `box_id`, `position`, `box_order`, `fk_user`, `maxline`) VALUES (12,20,0,'A03',0,NULL),(73,21,0,'A01',0,NULL),(80,21,0,'A01',1,NULL),(81,20,0,'B01',1,NULL); +/*!40000 ALTER TABLE `llx_boxes` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_boxes_def` +-- + +DROP TABLE IF EXISTS `llx_boxes_def`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_boxes_def` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `file` varchar(200) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `note` varchar(130) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_boxes_def` (`file`,`entity`,`note`) +) ENGINE=InnoDB AUTO_INCREMENT=235 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_boxes_def` +-- + +LOCK TABLES `llx_boxes_def` WRITE; +/*!40000 ALTER TABLE `llx_boxes_def` DISABLE KEYS */; +INSERT INTO `llx_boxes_def` (`rowid`, `file`, `entity`, `tms`, `note`) VALUES (20,'box_actions.php',1,'2010-07-08 11:29:29',NULL),(21,'box_bookmarks.php',1,'2010-07-08 11:30:03',NULL),(87,'box_produits.php',1,'2011-07-18 17:30:24',NULL),(182,'box_clients.php',1,'2011-08-05 20:40:20',NULL),(183,'box_prospect.php',1,'2011-08-05 20:40:20',NULL),(184,'box_contacts.php',1,'2011-08-05 20:40:20',NULL),(185,'box_propales.php',1,'2011-08-05 20:40:22',NULL),(186,'box_commandes.php',1,'2011-08-05 20:40:25',NULL),(187,'box_contracts.php',1,'2011-08-05 20:40:27',NULL),(188,'box_services_vendus.php',1,'2011-08-05 20:40:27',NULL),(191,'box_factures_imp.php',1,'2011-08-05 20:40:33',NULL),(192,'box_factures.php',1,'2011-08-05 20:40:33',NULL),(193,'box_comptes.php',1,'2011-08-05 20:40:34',NULL),(197,'box_fournisseurs.php',1,'2011-08-05 20:40:42',NULL),(198,'box_factures_fourn_imp.php',1,'2011-08-05 20:40:42',NULL),(199,'box_factures_fourn.php',1,'2011-08-05 20:40:42',NULL); +/*!40000 ALTER TABLE `llx_boxes_def` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_bt_namemap` +-- + +DROP TABLE IF EXISTS `llx_bt_namemap`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_bt_namemap` ( + `info_hash` char(40) NOT NULL DEFAULT '', + `filename` varchar(250) NOT NULL DEFAULT '', + `url` varchar(250) NOT NULL DEFAULT '', + `size` bigint(20) unsigned NOT NULL, + `pubDate` varchar(25) NOT NULL DEFAULT '', + PRIMARY KEY (`info_hash`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_bt_namemap` +-- + +LOCK TABLES `llx_bt_namemap` WRITE; +/*!40000 ALTER TABLE `llx_bt_namemap` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_bt_namemap` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_bt_speedlimit` +-- + +DROP TABLE IF EXISTS `llx_bt_speedlimit`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_bt_speedlimit` ( + `uploaded` bigint(25) NOT NULL DEFAULT '0', + `total_uploaded` bigint(30) NOT NULL DEFAULT '0', + `started` bigint(25) NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_bt_speedlimit` +-- + +LOCK TABLES `llx_bt_speedlimit` WRITE; +/*!40000 ALTER TABLE `llx_bt_speedlimit` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_bt_speedlimit` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_bt_summary` +-- + +DROP TABLE IF EXISTS `llx_bt_summary`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_bt_summary` ( + `info_hash` char(40) NOT NULL DEFAULT '', + `dlbytes` bigint(20) unsigned NOT NULL DEFAULT '0', + `seeds` int(10) unsigned NOT NULL DEFAULT '0', + `leechers` int(10) unsigned NOT NULL DEFAULT '0', + `finished` int(10) unsigned NOT NULL DEFAULT '0', + `lastcycle` int(10) unsigned NOT NULL DEFAULT '0', + `lastSpeedCycle` int(10) unsigned NOT NULL DEFAULT '0', + `speed` bigint(20) unsigned NOT NULL DEFAULT '0', + `piecelength` int(11) NOT NULL DEFAULT '-1', + `numpieces` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`info_hash`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_bt_summary` +-- + +LOCK TABLES `llx_bt_summary` WRITE; +/*!40000 ALTER TABLE `llx_bt_summary` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_bt_summary` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_bt_timestamps` +-- + +DROP TABLE IF EXISTS `llx_bt_timestamps`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_bt_timestamps` ( + `info_hash` char(40) NOT NULL, + `sequence` int(10) unsigned NOT NULL AUTO_INCREMENT, + `bytes` bigint(20) unsigned NOT NULL, + `delta` smallint(5) unsigned NOT NULL, + PRIMARY KEY (`sequence`), + KEY `sorting` (`info_hash`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_bt_timestamps` +-- + +LOCK TABLES `llx_bt_timestamps` WRITE; +/*!40000 ALTER TABLE `llx_bt_timestamps` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_bt_timestamps` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_bt_webseedfiles` +-- + +DROP TABLE IF EXISTS `llx_bt_webseedfiles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_bt_webseedfiles` ( + `info_hash` char(40) DEFAULT NULL, + `filename` char(250) NOT NULL DEFAULT '', + `startpiece` int(11) NOT NULL DEFAULT '0', + `endpiece` int(11) NOT NULL DEFAULT '0', + `startpieceoffset` int(11) NOT NULL DEFAULT '0', + `fileorder` int(11) NOT NULL DEFAULT '0', + UNIQUE KEY `fileseq` (`info_hash`,`fileorder`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_bt_webseedfiles` +-- + +LOCK TABLES `llx_bt_webseedfiles` WRITE; +/*!40000 ALTER TABLE `llx_bt_webseedfiles` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_bt_webseedfiles` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_action_trigger` +-- + +DROP TABLE IF EXISTS `llx_c_action_trigger`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_action_trigger` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(32) NOT NULL, + `label` varchar(128) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `elementtype` varchar(16) NOT NULL, + `rang` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_action_trigger_code` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_action_trigger` +-- + +LOCK TABLES `llx_c_action_trigger` WRITE; +/*!40000 ALTER TABLE `llx_c_action_trigger` DISABLE KEYS */; +INSERT INTO `llx_c_action_trigger` (`rowid`, `code`, `label`, `description`, `elementtype`, `rang`) VALUES (1,'FICHEINTER_VALIDATE','Validation fiche intervention','Executed when a intervention is validated','ficheinter',18),(2,'BILL_VALIDATE','Validation facture client','Executed when a customer invoice is approved','facture',6),(3,'ORDER_SUPPLIER_APPROVE','Approbation commande fournisseur','Executed when a supplier order is approved','order_supplier',11),(4,'ORDER_SUPPLIER_REFUSE','Refus commande fournisseur','Executed when a supplier order is refused','order_supplier',12),(5,'ORDER_VALIDATE','Validation commande client','Executed when a customer order is validated','commande',4),(6,'PROPAL_VALIDATE','Validation proposition client','Executed when a commercial proposal is validated','propal',2),(7,'WITHDRAW_TRANSMIT','Transmission prélèvement','Executed when a withdrawal is transmited','withdraw',25),(8,'WITHDRAW_CREDIT','Créditer prélèvement','Executed when a withdrawal is credited','withdraw',26),(9,'WITHDRAW_EMIT','Emission prélèvement','Executed when a withdrawal is emited','withdraw',27),(10,'COMPANY_CREATE','Third party created','Executed when a third party is created','societe',1),(11,'CONTRACT_VALIDATE','Contract validated','Executed when a contract is validated','contrat',17),(12,'PROPAL_SENTBYMAIL','Commercial proposal sent by mail','Executed when a commercial proposal is sent by mail','propal',3),(13,'ORDER_SENTBYMAIL','Customer order sent by mail','Executed when a customer order is sent by mail ','commande',5),(14,'BILL_PAYED','Customer invoice payed','Executed when a customer invoice is payed','facture',7),(15,'BILL_CANCEL','Customer invoice canceled','Executed when a customer invoice is conceled','facture',8),(16,'BILL_SENTBYMAIL','Customer invoice sent by mail','Executed when a customer invoice is sent by mail','facture',9),(17,'ORDER_SUPPLIER_VALIDATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',10),(18,'ORDER_SUPPLIER_SENTBYMAIL','Supplier order sent by mail','Executed when a supplier order is sent by mail','order_supplier',13),(19,'BILL_SUPPLIER_VALIDATE','Supplier invoice validated','Executed when a supplier invoice is validated','invoice_supplier',14),(20,'BILL_SUPPLIER_PAYED','Supplier invoice payed','Executed when a supplier invoice is payed','invoice_supplier',15),(21,'BILL_SUPPLIER_SENTBYMAIL','Supplier invoice sent by mail','Executed when a supplier invoice is sent by mail','invoice_supplier',16),(22,'SHIPPING_VALIDATE','Shipping validated','Executed when a shipping is validated','shipping',19),(23,'SHIPPING_SENTBYMAIL','Shipping sent by mail','Executed when a shipping is sent by mail','shipping',20),(24,'MEMBER_VALIDATE','Member validated','Executed when a member is validated','member',21),(25,'MEMBER_SUBSCRIPTION','Member subscribed','Executed when a member is subscribed','member',22),(26,'MEMBER_RESILIATE','Member resiliated','Executed when a member is resiliated','member',23),(27,'MEMBER_DELETE','Member deleted','Executed when a member is deleted','member',24); +/*!40000 ALTER TABLE `llx_c_action_trigger` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_actioncomm` +-- + +DROP TABLE IF EXISTS `llx_c_actioncomm`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_actioncomm` ( + `id` int(11) NOT NULL, + `code` varchar(12) NOT NULL, + `type` varchar(10) NOT NULL DEFAULT 'system', + `libelle` varchar(48) NOT NULL, + `module` varchar(16) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + `todo` tinyint(4) DEFAULT NULL, + `position` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_actioncomm` +-- + +LOCK TABLES `llx_c_actioncomm` WRITE; +/*!40000 ALTER TABLE `llx_c_actioncomm` DISABLE KEYS */; +INSERT INTO `llx_c_actioncomm` (`id`, `code`, `type`, `libelle`, `module`, `active`, `todo`, `position`) VALUES (1,'AC_TEL','system','Phone call',NULL,1,NULL,2),(2,'AC_FAX','system','Send Fax',NULL,1,NULL,3),(3,'AC_PROP','system','Send commercial proposal by email','propal',1,NULL,10),(4,'AC_EMAIL','system','Send Email',NULL,1,NULL,4),(5,'AC_RDV','system','Rendez-vous',NULL,1,NULL,1),(8,'AC_COM','system','Send customer order by email','order',1,NULL,8),(9,'AC_FAC','system','Send customer invoice by email','invoice',1,NULL,6),(10,'AC_SHIP','system','Send shipping by email','shipping',1,NULL,11),(30,'AC_SUP_ORD','system','Send supplier order by email','order_supplier',1,NULL,9),(31,'AC_SUP_INV','system','Send supplier invoice by email','invoice_supplier',1,NULL,7),(50,'AC_OTH','system','Other',NULL,1,NULL,5); +/*!40000 ALTER TABLE `llx_c_actioncomm` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_availability` +-- + +DROP TABLE IF EXISTS `llx_c_availability`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_availability` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(30) NOT NULL, + `label` varchar(60) NOT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_c_availability` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_availability` +-- + +LOCK TABLES `llx_c_availability` WRITE; +/*!40000 ALTER TABLE `llx_c_availability` DISABLE KEYS */; +INSERT INTO `llx_c_availability` (`rowid`, `code`, `label`, `active`) VALUES (1,'AV_NOW','Immediate',1),(2,'AV_1W','1 week',1),(3,'AV_2W','2 weeks',1),(4,'AV_3W','3 weeks',1); +/*!40000 ALTER TABLE `llx_c_availability` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_barcode_type` +-- + +DROP TABLE IF EXISTS `llx_c_barcode_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_barcode_type` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(16) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `libelle` varchar(50) NOT NULL, + `coder` varchar(16) NOT NULL, + `example` varchar(16) NOT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_barcode_type` +-- + +LOCK TABLES `llx_c_barcode_type` WRITE; +/*!40000 ALTER TABLE `llx_c_barcode_type` DISABLE KEYS */; +INSERT INTO `llx_c_barcode_type` (`rowid`, `code`, `entity`, `libelle`, `coder`, `example`) VALUES (1,'EAN8',1,'EAN8','0','1234567'),(2,'EAN13',1,'EAN13','0','123456789012'),(3,'UPC',1,'UPC','0','123456789012'),(4,'ISBN',1,'ISBN','0','123456789'),(5,'C39',1,'Code 39','0','1234567890'),(6,'C128',1,'Code 128','0','ABCD1234567890'); +/*!40000 ALTER TABLE `llx_c_barcode_type` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_chargesociales` +-- + +DROP TABLE IF EXISTS `llx_c_chargesociales`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_chargesociales` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `libelle` varchar(80) DEFAULT NULL, + `deductible` smallint(6) NOT NULL DEFAULT '0', + `active` tinyint(4) NOT NULL DEFAULT '1', + `code` varchar(12) NOT NULL, + `fk_pays` int(11) NOT NULL DEFAULT '1', + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=231 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_chargesociales` +-- + +LOCK TABLES `llx_c_chargesociales` WRITE; +/*!40000 ALTER TABLE `llx_c_chargesociales` DISABLE KEYS */; +INSERT INTO `llx_c_chargesociales` (`id`, `libelle`, `deductible`, `active`, `code`, `fk_pays`, `module`) VALUES (1,'Allocations familiales',1,1,'TAXFAM',1,NULL),(2,'CSG Deductible',1,1,'TAXCSGD',1,NULL),(3,'CSG/CRDS NON Deductible',0,1,'TAXCSGND',1,NULL),(10,'Taxe apprentissage',0,1,'TAXAPP',1,NULL),(11,'Taxe professionnelle',0,1,'TAXPRO',1,NULL),(12,'Cotisation foncière des entreprises',0,1,'TAXCFE',1,NULL),(13,'Cotisation sur la valeur ajoutée des entreprises',0,1,'TAXCVAE',1,NULL),(20,'Impots locaux/fonciers',0,1,'TAXFON',1,NULL),(25,'Impots revenus',0,1,'TAXREV',1,NULL),(30,'Assurance Sante',0,1,'TAXSECU',1,NULL),(40,'Mutuelle',0,1,'TAXMUT',1,NULL),(50,'Assurance vieillesse',0,1,'TAXRET',1,NULL),(60,'Assurance Chomage',0,1,'TAXCHOM',1,NULL),(201,'ONSS',1,1,'TAXBEONSS',2,NULL),(210,'Precompte professionnel',1,1,'TAXBEPREPRO',2,NULL),(220,'Prime d\'existence',1,1,'TAXBEPRIEXI',2,NULL),(230,'Precompte immobilier',1,1,'TAXBEPREIMMO',2,NULL); +/*!40000 ALTER TABLE `llx_c_chargesociales` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_civilite` +-- + +DROP TABLE IF EXISTS `llx_c_civilite`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_civilite` ( + `rowid` int(11) NOT NULL, + `code` varchar(6) NOT NULL, + `civilite` varchar(50) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_civilite` +-- + +LOCK TABLES `llx_c_civilite` WRITE; +/*!40000 ALTER TABLE `llx_c_civilite` DISABLE KEYS */; +INSERT INTO `llx_c_civilite` (`rowid`, `code`, `civilite`, `active`, `module`) VALUES (1,'MME','Madame',1,NULL),(3,'MR','Monsieur',1,NULL),(5,'MLE','Mademoiselle',1,NULL),(7,'MTRE','Maître',1,NULL),(8,'DR','Docteur',1,NULL); +/*!40000 ALTER TABLE `llx_c_civilite` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_currencies` +-- + +DROP TABLE IF EXISTS `llx_c_currencies`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_currencies` ( + `code_iso` varchar(3) NOT NULL, + `label` varchar(64) NOT NULL, + `unicode` varchar(32) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`code_iso`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_currencies` +-- + +LOCK TABLES `llx_c_currencies` WRITE; +/*!40000 ALTER TABLE `llx_c_currencies` DISABLE KEYS */; +INSERT INTO `llx_c_currencies` (`code_iso`, `label`, `unicode`, `active`) VALUES ('AED','United Arab Emirates Dirham',NULL,1),('AFN','Afghanistan Afghani','[1547]',1),('ALL','Albania Lek','[76,101,107]',1),('ANG','Netherlands Antilles Guilder','[402]',1),('ARP','Pesos argentins',NULL,0),('ARS','Argentino Peso','[36]',1),('ATS','Shiliing autrichiens',NULL,0),('AUD','Australia Dollar','[36]',1),('AWG','Aruba Guilder','[402]',1),('AZN','Azerbaijan New Manat','[1084,1072,1085]',1),('BAM','Bosnia and Herzegovina Convertible Marka','[75,77]',1),('BBD','Barbados Dollar','[36]',1),('BEF','Francs belges',NULL,0),('BGN','Bulgaria Lev','[1083,1074]',1),('BMD','Bermuda Dollar','[36]',1),('BND','Brunei Darussalam Dollar','[36]',1),('BOB','Bolivia Boliviano','[36,98]',1),('BRL','Brazil Real','[82,36]',1),('BSD','Bahamas Dollar','[36]',1),('BWP','Botswana Pula','[80]',1),('BYR','Belarus Ruble','[112,46]',1),('BZD','Belize Dollar','[66,90,36]',1),('CAD','Canada Dollar','[36]',1),('CHF','Switzerland Franc','[67,72,70]',1),('CLP','Chile Peso','[36]',1),('CNY','China Yuan Renminbi','[165]',1),('COP','Colombia Peso','[36]',1),('CRC','Costa Rica Colon','[8353]',1),('CUP','Cuba Peso','[8369]',1),('CZK','Czech Republic Koruna','[75,269]',1),('DEM','Deutsch mark',NULL,0),('DKK','Denmark Krone','[107,114]',1),('DOP','Dominican Republic Peso','[82,68,36]',1),('DZD','Algeria Dinar',NULL,1),('EEK','Estonia Kroon','[107,114]',1),('EGP','Egypt Pound','[163]',1),('ESP','Pesete',NULL,0),('EUR','Euro Member Countries','[8364]',1),('FIM','Mark finlandais',NULL,0),('FJD','Fiji Dollar','[36]',1),('FKP','Falkland Islands (Malvinas) Pound','[163]',1),('FRF','Francs francais',NULL,0),('GBP','United Kingdom Pound','[163]',1),('GGP','Guernsey Pound','[163]',1),('GHC','Ghana Cedis','[162]',1),('GIP','Gibraltar Pound','[163]',1),('GRD','Drachme (grece)',NULL,0),('GTQ','Guatemala Quetzal','[81]',1),('GYD','Guyana Dollar','[36]',1),('HKD','Hong Kong Dollar','[36]',1),('HNL','Honduras Lempira','[76]',1),('HRK','Croatia Kuna','[107,110]',1),('HUF','Hungary Forint','[70,116]',1),('IDR','Indonesia Rupiah','[82,112]',1),('IEP','Livres irlandaises',NULL,0),('ILS','Israel Shekel','[8362]',1),('IMP','Isle of Man Pound','[163]',1),('INR','India Rupee',NULL,1),('IRR','Iran Rial','[65020]',1),('ISK','Iceland Krona','[107,114]',1),('ITL','Lires',NULL,0),('JEP','Jersey Pound','[163]',1),('JMD','Jamaica Dollar','[74,36]',1),('JPY','Japan Yen','[165]',1),('KGS','Kyrgyzstan Som','[1083,1074]',1),('KHR','Cambodia Riel','[6107]',1),('KPW','Korea (North) Won','[8361]',1),('KRW','Korea (South) Won','[8361]',1),('KYD','Cayman Islands Dollar','[36]',1),('KZT','Kazakhstan Tenge','[1083,1074]',1),('LAK','Laos Kip','[8365]',1),('LBP','Lebanon Pound','[163]',1),('LKR','Sri Lanka Rupee','[8360]',1),('LRD','Liberia Dollar','[36]',1),('LTL','Lithuania Litas','[76,116]',1),('LUF','Francs luxembourgeois',NULL,0),('LVL','Latvia Lat','[76,115]',1),('MAD','Morocco Dirham',NULL,1),('MKD','Macedonia Denar','[1076,1077,1085]',1),('MNT','Mongolia Tughrik','[8366]',1),('MRO','Mauritania Ouguiya',NULL,1),('MUR','Mauritius Rupee','[8360]',1),('MXN','Mexico Peso','[36]',1),('MXP','Pesos Mexicans',NULL,0),('MYR','Malaysia Ringgit','[82,77]',1),('MZN','Mozambique Metical','[77,84]',1),('NAD','Namibia Dollar','[36]',1),('NGN','Nigeria Naira','[8358]',1),('NIO','Nicaragua Cordoba','[67,36]',1),('NLG','Florins',NULL,0),('NOK','Norway Krone','[107,114]',1),('NPR','Nepal Rupee','[8360]',1),('NZD','New Zealand Dollar','[36]',1),('OMR','Oman Rial','[65020]',1),('PAB','Panama Balboa','[66,47,46]',1),('PEN','Peru Nuevo Sol','[83,47,46]',1),('PHP','Philippines Peso','[8369]',1),('PKR','Pakistan Rupee','[8360]',1),('PLN','Poland Zloty','[122,322]',1),('PTE','Escudos',NULL,0),('PYG','Paraguay Guarani','[71,115]',1),('QAR','Qatar Riyal','[65020]',1),('RON','Romania New Leu','[108,101,105]',1),('RSD','Serbia Dinar','[1044,1080,1085,46]',1),('RUB','Russia Ruble','[1088,1091,1073]',1),('SAR','Saudi Arabia Riyal','[65020]',1),('SBD','Solomon Islands Dollar','[36]',1),('SCR','Seychelles Rupee','[8360]',1),('SEK','Sweden Krona','[107,114]',1),('SGD','Singapore Dollar','[36]',1),('SHP','Saint Helena Pound','[163]',1),('SKK','Couronnes slovaques',NULL,0),('SOS','Somalia Shilling','[83]',1),('SRD','Suriname Dollar','[36]',1),('SUR','Rouble',NULL,0),('SVC','El Salvador Colon','[36]',1),('SYP','Syria Pound','[163]',1),('THB','Thailand Baht','[3647]',1),('TND','Tunisia Dinar',NULL,1),('TRL','Turkey Lira','[84,76]',1),('TRY','Turkey Lira','[8356]',1),('TTD','Trinidad and Tobago Dollar','[84,84,36]',1),('TVD','Tuvalu Dollar','[36]',1),('TWD','Taiwan New Dollar','[78,84,36]',1),('UAH','Ukraine Hryvna','[8372]',1),('USD','United States Dollar','[36]',1),('UYU','Uruguay Peso','[36,85]',1),('UZS','Uzbekistan Som','[1083,1074]',1),('VEF','Venezuela Bolivar Fuerte','[66,115]',1),('VND','Viet Nam Dong','[8363]',1),('XAF','Communaute Financiere Africaine (BEAC) CFA Franc',NULL,1),('XCD','East Caribbean Dollar','[36]',1),('XEU','Ecus',NULL,0),('XOF','Communaute Financiere Africaine (BCEAO) Franc',NULL,1),('YER','Yemen Rial','[65020]',1),('ZAR','South Africa Rand','[82]',1),('ZWD','Zimbabwe Dollar','[90,36]',1); +/*!40000 ALTER TABLE `llx_c_currencies` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_departements` +-- + +DROP TABLE IF EXISTS `llx_c_departements`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_departements` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code_departement` varchar(6) NOT NULL, + `fk_region` int(11) DEFAULT NULL, + `cheflieu` varchar(50) DEFAULT NULL, + `tncc` int(11) DEFAULT NULL, + `ncc` varchar(50) DEFAULT NULL, + `nom` varchar(50) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_departements` (`code_departement`,`fk_region`), + KEY `idx_departements_fk_region` (`fk_region`) +) ENGINE=InnoDB AUTO_INCREMENT=1061 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_departements` +-- + +LOCK TABLES `llx_c_departements` WRITE; +/*!40000 ALTER TABLE `llx_c_departements` DISABLE KEYS */; +INSERT INTO `llx_c_departements` (`rowid`, `code_departement`, `fk_region`, `cheflieu`, `tncc`, `ncc`, `nom`, `active`) VALUES (1,'0',0,'0',0,'-','-',1),(2,'01',82,'01053',5,'AIN','Ain',1),(3,'02',22,'02408',5,'AISNE','Aisne',1),(4,'03',83,'03190',5,'ALLIER','Allier',1),(5,'04',93,'04070',4,'ALPES-DE-HAUTE-PROVENCE','Alpes-de-Haute-Provence',1),(6,'05',93,'05061',4,'HAUTES-ALPES','Hautes-Alpes',1),(7,'06',93,'06088',4,'ALPES-MARITIMES','Alpes-Maritimes',1),(8,'07',82,'07186',5,'ARDECHE','Ardèche',1),(9,'08',21,'08105',4,'ARDENNES','Ardennes',1),(10,'09',73,'09122',5,'ARIEGE','Ariège',1),(11,'10',21,'10387',5,'AUBE','Aube',1),(12,'11',91,'11069',5,'AUDE','Aude',1),(13,'12',73,'12202',5,'AVEYRON','Aveyron',1),(14,'13',93,'13055',4,'BOUCHES-DU-RHONE','Bouches-du-Rhône',1),(15,'14',25,'14118',2,'CALVADOS','Calvados',1),(16,'15',83,'15014',2,'CANTAL','Cantal',1),(17,'16',54,'16015',3,'CHARENTE','Charente',1),(18,'17',54,'17300',3,'CHARENTE-MARITIME','Charente-Maritime',1),(19,'18',24,'18033',2,'CHER','Cher',1),(20,'19',74,'19272',3,'CORREZE','Corrèze',1),(21,'2A',94,'2A004',3,'CORSE-DU-SUD','Corse-du-Sud',1),(22,'2B',94,'2B033',3,'HAUTE-CORSE','Haute-Corse',1),(23,'21',26,'21231',3,'COTE-D\'OR','Côte-d\'Or',1),(24,'22',53,'22278',4,'COTES-D\'ARMOR','Côtes-d\'Armor',1),(25,'23',74,'23096',3,'CREUSE','Creuse',1),(26,'24',72,'24322',3,'DORDOGNE','Dordogne',1),(27,'25',43,'25056',2,'DOUBS','Doubs',1),(28,'26',82,'26362',3,'DROME','Drôme',1),(29,'27',23,'27229',5,'EURE','Eure',1),(30,'28',24,'28085',1,'EURE-ET-LOIR','Eure-et-Loir',1),(31,'29',53,'29232',2,'FINISTERE','Finistère',1),(32,'30',91,'30189',2,'GARD','Gard',1),(33,'31',73,'31555',3,'HAUTE-GARONNE','Haute-Garonne',1),(34,'32',73,'32013',2,'GERS','Gers',1),(35,'33',72,'33063',3,'GIRONDE','Gironde',1),(36,'34',91,'34172',5,'HERAULT','Hérault',1),(37,'35',53,'35238',1,'ILLE-ET-VILAINE','Ille-et-Vilaine',1),(38,'36',24,'36044',5,'INDRE','Indre',1),(39,'37',24,'37261',1,'INDRE-ET-LOIRE','Indre-et-Loire',1),(40,'38',82,'38185',5,'ISERE','Isère',1),(41,'39',43,'39300',2,'JURA','Jura',1),(42,'40',72,'40192',4,'LANDES','Landes',1),(43,'41',24,'41018',0,'LOIR-ET-CHER','Loir-et-Cher',1),(44,'42',82,'42218',3,'LOIRE','Loire',1),(45,'43',83,'43157',3,'HAUTE-LOIRE','Haute-Loire',1),(46,'44',52,'44109',3,'LOIRE-ATLANTIQUE','Loire-Atlantique',1),(47,'45',24,'45234',2,'LOIRET','Loiret',1),(48,'46',73,'46042',2,'LOT','Lot',1),(49,'47',72,'47001',0,'LOT-ET-GARONNE','Lot-et-Garonne',1),(50,'48',91,'48095',3,'LOZERE','Lozère',1),(51,'49',52,'49007',0,'MAINE-ET-LOIRE','Maine-et-Loire',1),(52,'50',25,'50502',3,'MANCHE','Manche',1),(53,'51',21,'51108',3,'MARNE','Marne',1),(54,'52',21,'52121',3,'HAUTE-MARNE','Haute-Marne',1),(55,'53',52,'53130',3,'MAYENNE','Mayenne',1),(56,'54',41,'54395',0,'MEURTHE-ET-MOSELLE','Meurthe-et-Moselle',1),(57,'55',41,'55029',3,'MEUSE','Meuse',1),(58,'56',53,'56260',2,'MORBIHAN','Morbihan',1),(59,'57',41,'57463',3,'MOSELLE','Moselle',1),(60,'58',26,'58194',3,'NIEVRE','Nièvre',1),(61,'59',31,'59350',2,'NORD','Nord',1),(62,'60',22,'60057',5,'OISE','Oise',1),(63,'61',25,'61001',5,'ORNE','Orne',1),(64,'62',31,'62041',2,'PAS-DE-CALAIS','Pas-de-Calais',1),(65,'63',83,'63113',2,'PUY-DE-DOME','Puy-de-Dôme',1),(66,'64',72,'64445',4,'PYRENEES-ATLANTIQUES','Pyrénées-Atlantiques',1),(67,'65',73,'65440',4,'HAUTES-PYRENEES','Hautes-Pyrénées',1),(68,'66',91,'66136',4,'PYRENEES-ORIENTALES','Pyrénées-Orientales',1),(69,'67',42,'67482',2,'BAS-RHIN','Bas-Rhin',1),(70,'68',42,'68066',2,'HAUT-RHIN','Haut-Rhin',1),(71,'69',82,'69123',2,'RHONE','Rhône',1),(72,'70',43,'70550',3,'HAUTE-SAONE','Haute-Saône',1),(73,'71',26,'71270',0,'SAONE-ET-LOIRE','Saône-et-Loire',1),(74,'72',52,'72181',3,'SARTHE','Sarthe',1),(75,'73',82,'73065',3,'SAVOIE','Savoie',1),(76,'74',82,'74010',3,'HAUTE-SAVOIE','Haute-Savoie',1),(77,'75',11,'75056',0,'PARIS','Paris',1),(78,'76',23,'76540',3,'SEINE-MARITIME','Seine-Maritime',1),(79,'77',11,'77288',0,'SEINE-ET-MARNE','Seine-et-Marne',1),(80,'78',11,'78646',4,'YVELINES','Yvelines',1),(81,'79',54,'79191',4,'DEUX-SEVRES','Deux-Sèvres',1),(82,'80',22,'80021',3,'SOMME','Somme',1),(83,'81',73,'81004',2,'TARN','Tarn',1),(84,'82',73,'82121',0,'TARN-ET-GARONNE','Tarn-et-Garonne',1),(85,'83',93,'83137',2,'VAR','Var',1),(86,'84',93,'84007',0,'VAUCLUSE','Vaucluse',1),(87,'85',52,'85191',3,'VENDEE','Vendée',1),(88,'86',54,'86194',3,'VIENNE','Vienne',1),(89,'87',74,'87085',3,'HAUTE-VIENNE','Haute-Vienne',1),(90,'88',41,'88160',4,'VOSGES','Vosges',1),(91,'89',26,'89024',5,'YONNE','Yonne',1),(92,'90',43,'90010',0,'TERRITOIRE DE BELFORT','Territoire de Belfort',1),(93,'91',11,'91228',5,'ESSONNE','Essonne',1),(94,'92',11,'92050',4,'HAUTS-DE-SEINE','Hauts-de-Seine',1),(95,'93',11,'93008',3,'SEINE-SAINT-DENIS','Seine-Saint-Denis',1),(96,'94',11,'94028',2,'VAL-DE-MARNE','Val-de-Marne',1),(97,'95',11,'95500',2,'VAL-D\'OISE','Val-d\'Oise',1),(98,'971',1,'97105',3,'GUADELOUPE','Guadeloupe',1),(99,'972',2,'97209',3,'MARTINIQUE','Martinique',1),(100,'973',3,'97302',3,'GUYANE','Guyane',1),(101,'974',4,'97411',3,'REUNION','Réunion',1),(102,'01',201,'',1,'ANVERS','Anvers',1),(103,'02',203,'',3,'BRUXELLES-CAPITALE','Bruxelles-Capitale',1),(104,'03',202,'',2,'BRABANT-WALLON','Brabant-Wallon',1),(105,'04',201,'',1,'BRABANT-FLAMAND','Brabant-Flamand',1),(106,'05',201,'',1,'FLANDRE-OCCIDENTALE','Flandre-Occidentale',1),(107,'06',201,'',1,'FLANDRE-ORIENTALE','Flandre-Orientale',1),(108,'07',202,'',2,'HAINAUT','Hainaut',1),(109,'08',201,'',2,'LIEGE','Liège',1),(110,'09',202,'',1,'LIMBOURG','Limbourg',1),(111,'10',202,'',2,'LUXEMBOURG','Luxembourg',1),(112,'11',201,'',2,'NAMUR','Namur',1),(113,'NSW',2801,'',1,'','New South Wales',1),(114,'VIC',2801,'',1,'','Victoria',1),(115,'QLD',2801,'',1,'','Queensland',1),(116,'SA',2801,'',1,'','South Australia',1),(117,'ACT',2801,'',1,'','Australia Capital Territory',1),(118,'TAS',2801,'',1,'','Tasmania',1),(119,'WA',2801,'',1,'','Western Australia',1),(120,'NT',2801,'',1,'','Northern Territory',1),(121,'01',419,'',19,'PAIS VASCO','País Vasco',1),(122,'02',404,'',4,'ALBACETE','Albacete',1),(123,'03',411,'',11,'ALICANTE','Alicante',1),(124,'04',401,'',1,'ALMERIA','Almería',1),(125,'05',403,'',3,'AVILA','Avila',1),(126,'06',412,'',12,'BADAJOZ','Badajoz',1),(127,'07',414,'',14,'ISLAS BALEARES','Islas Baleares',1),(128,'08',406,'',6,'BARCELONA','Barcelona',1),(129,'09',403,'',8,'BURGOS','Burgos',1),(130,'10',412,'',12,'CACERES','Cáceres',1),(131,'11',401,'',1,'CADIz','Cádiz',1),(132,'12',411,'',11,'CASTELLON','Castellón',1),(133,'13',404,'',4,'CIUDAD REAL','Ciudad Real',1),(134,'14',401,'',1,'CORDOBA','Córdoba',1),(135,'15',413,'',13,'LA CORUÑA','La Coruña',1),(136,'16',404,'',4,'CUENCA','Cuenca',1),(137,'17',406,'',6,'GERONA','Gerona',1),(138,'18',401,'',1,'GRANADA','Granada',1),(139,'19',404,'',4,'GUADALAJARA','Guadalajara',1),(140,'20',419,'',19,'GUIPUZCOA','Guipúzcoa',1),(141,'21',401,'',1,'HUELVA','Huelva',1),(142,'22',402,'',2,'HUESCA','Huesca',1),(143,'23',401,'',1,'JAEN','Jaén',1),(144,'24',403,'',3,'LEON','León',1),(145,'25',406,'',6,'LERIDA','Lérida',1),(146,'26',415,'',15,'LA RIOJA','La Rioja',1),(147,'27',413,'',13,'LUGO','Lugo',1),(148,'28',416,'',16,'MADRID','Madrid',1),(149,'29',401,'',1,'MALAGA','Málaga',1),(150,'30',417,'',17,'MURCIA','Murcia',1),(151,'31',408,'',8,'NAVARRA','Navarra',1),(152,'32',413,'',13,'ORENSE','Orense',1),(153,'33',418,'',18,'ASTURIAS','Asturias',1),(154,'34',403,'',3,'PALENCIA','Palencia',1),(155,'35',405,'',5,'LAS PALMAS','Las Palmas',1),(156,'36',413,'',13,'PONTEVEDRA','Pontevedra',1),(157,'37',403,'',3,'SALAMANCA','Salamanca',1),(158,'38',405,'',5,'STA. CRUZ DE TENERIFE','Sta. Cruz de Tenerife',1),(159,'39',410,'',10,'CANTABRIA','Cantabria',1),(160,'40',403,'',3,'SEGOVIA','Segovia',1),(161,'41',401,'',1,'SEVILLA','Sevilla',1),(162,'42',403,'',3,'SORIA','Soria',1),(163,'43',406,'',6,'TARRAGONA','Tarragona',1),(164,'44',402,'',2,'TERUEL','Teruel',1),(165,'45',404,'',5,'TOLEDO','Toledo',1),(166,'46',411,'',11,'VALENCIA','Valencia',1),(167,'47',403,'',3,'VALLADOLID','Valladolid',1),(168,'48',419,'',19,'VIZCAYA','Vizcaya',1),(169,'49',403,'',3,'ZAMORA','Zamora',1),(170,'50',402,'',1,'ZARAGOZA','Zaragoza',1),(171,'51',407,'',7,'CEUTA','Ceuta',1),(172,'52',409,'',9,'MELILLA','Melilla',1),(173,'53',420,'',20,'OTROS','Otros',1),(174,'AG',601,NULL,NULL,'ARGOVIE','Argovie',1),(175,'AI',601,NULL,NULL,'APPENZELL RHODES INTERIEURES','Appenzell Rhodes intérieures',1),(176,'AR',601,NULL,NULL,'APPENZELL RHODES EXTERIEURES','Appenzell Rhodes extérieures',1),(177,'BE',601,NULL,NULL,'BERNE','Berne',1),(178,'BL',601,NULL,NULL,'BALE CAMPAGNE','Bâle Campagne',1),(179,'BS',601,NULL,NULL,'BALE VILLE','Bâle Ville',1),(180,'FR',601,NULL,NULL,'FRIBOURG','Fribourg',1),(181,'GE',601,NULL,NULL,'GENEVE','Genève',1),(182,'GL',601,NULL,NULL,'GLARIS','Glaris',1),(183,'GR',601,NULL,NULL,'GRISONS','Grisons',1),(184,'JU',601,NULL,NULL,'JURA','Jura',1),(185,'LU',601,NULL,NULL,'LUCERNE','Lucerne',1),(186,'NE',601,NULL,NULL,'NEUCHATEL','Neuchâtel',1),(187,'NW',601,NULL,NULL,'NIDWALD','Nidwald',1),(188,'OW',601,NULL,NULL,'OBWALD','Obwald',1),(189,'SG',601,NULL,NULL,'SAINT-GALL','Saint-Gall',1),(190,'SH',601,NULL,NULL,'SCHAFFHOUSE','Schaffhouse',1),(191,'SO',601,NULL,NULL,'SOLEURE','Soleure',1),(192,'SZ',601,NULL,NULL,'SCHWYZ','Schwyz',1),(193,'TG',601,NULL,NULL,'THURGOVIE','Thurgovie',1),(194,'TI',601,NULL,NULL,'TESSIN','Tessin',1),(195,'UR',601,NULL,NULL,'URI','Uri',1),(196,'VD',601,NULL,NULL,'VAUD','Vaud',1),(197,'VS',601,NULL,NULL,'VALAIS','Valais',1),(198,'ZG',601,NULL,NULL,'ZUG','Zug',1),(199,'ZH',601,NULL,NULL,'ZURICH','Zürich',1),(200,'AL',1101,'',0,'ALABAMA','Alabama',1),(201,'AK',1101,'',0,'ALASKA','Alaska',1),(202,'AZ',1101,'',0,'ARIZONA','Arizona',1),(203,'AR',1101,'',0,'ARKANSAS','Arkansas',1),(204,'CA',1101,'',0,'CALIFORNIA','California',1),(205,'CO',1101,'',0,'COLORADO','Colorado',1),(206,'CT',1101,'',0,'CONNECTICUT','Connecticut',1),(207,'DE',1101,'',0,'DELAWARE','Delaware',1),(208,'FL',1101,'',0,'FLORIDA','Florida',1),(209,'GA',1101,'',0,'GEORGIA','Georgia',1),(210,'HI',1101,'',0,'HAWAII','Hawaii',1),(211,'ID',1101,'',0,'IDAHO','Idaho',1),(212,'IL',1101,'',0,'ILLINOIS','Illinois',1),(213,'IN',1101,'',0,'INDIANA','Indiana',1),(214,'IA',1101,'',0,'IOWA','Iowa',1),(215,'KS',1101,'',0,'KANSAS','Kansas',1),(216,'KY',1101,'',0,'KENTUCKY','Kentucky',1),(217,'LA',1101,'',0,'LOUISIANA','Louisiana',1),(218,'ME',1101,'',0,'MAINE','Maine',1),(219,'MD',1101,'',0,'MARYLAND','Maryland',1),(220,'MA',1101,'',0,'MASSACHUSSETTS','Massachusetts',1),(221,'MI',1101,'',0,'MICHIGAN','Michigan',1),(222,'MN',1101,'',0,'MINNESOTA','Minnesota',1),(223,'MS',1101,'',0,'MISSISSIPPI','Mississippi',1),(224,'MO',1101,'',0,'MISSOURI','Missouri',1),(225,'MT',1101,'',0,'MONTANA','Montana',1),(226,'NE',1101,'',0,'NEBRASKA','Nebraska',1),(227,'NV',1101,'',0,'NEVADA','Nevada',1),(228,'NH',1101,'',0,'NEW HAMPSHIRE','New Hampshire',1),(229,'NJ',1101,'',0,'NEW JERSEY','New Jersey',1),(230,'NM',1101,'',0,'NEW MEXICO','New Mexico',1),(231,'NY',1101,'',0,'NEW YORK','New York',1),(232,'NC',1101,'',0,'NORTH CAROLINA','North Carolina',1),(233,'ND',1101,'',0,'NORTH DAKOTA','North Dakota',1),(234,'OH',1101,'',0,'OHIO','Ohio',1),(235,'OK',1101,'',0,'OKLAHOMA','Oklahoma',1),(236,'OR',1101,'',0,'OREGON','Oregon',1),(237,'PA',1101,'',0,'PENNSYLVANIA','Pennsylvania',1),(238,'RI',1101,'',0,'RHODE ISLAND','Rhode Island',1),(239,'SC',1101,'',0,'SOUTH CAROLINA','South Carolina',1),(240,'SD',1101,'',0,'SOUTH DAKOTA','South Dakota',1),(241,'TN',1101,'',0,'TENNESSEE','Tennessee',1),(242,'TX',1101,'',0,'TEXAS','Texas',1),(243,'UT',1101,'',0,'UTAH','Utah',1),(244,'VT',1101,'',0,'VERMONT','Vermont',1),(245,'VA',1101,'',0,'VIRGINIA','Virginia',1),(246,'WA',1101,'',0,'WASHINGTON','Washington',1),(247,'WV',1101,'',0,'WEST VIRGINIA','West Virginia',1),(248,'WI',1101,'',0,'WISCONSIN','Wisconsin',1),(249,'WY',1101,'',0,'WYOMING','Wyoming',1),(250,'SS',8601,NULL,NULL,NULL,'San Salvador',1),(251,'SA',8603,NULL,NULL,NULL,'Santa Ana',1),(252,'AH',8603,NULL,NULL,NULL,'Ahuachapan',1),(253,'SO',8603,NULL,NULL,NULL,'Sonsonate',1),(254,'US',8602,NULL,NULL,NULL,'Usulutan',1),(255,'SM',8602,NULL,NULL,NULL,'San Miguel',1),(256,'MO',8602,NULL,NULL,NULL,'Morazan',1),(257,'LU',8602,NULL,NULL,NULL,'La Union',1),(258,'LL',8601,NULL,NULL,NULL,'La Libertad',1),(259,'CH',8601,NULL,NULL,NULL,'Chalatenango',1),(260,'CA',8601,NULL,NULL,NULL,'Cabañas',1),(261,'LP',8601,NULL,NULL,NULL,'La Paz',1),(262,'SV',8601,NULL,NULL,NULL,'San Vicente',1),(263,'CU',8601,NULL,NULL,NULL,'Cuscatlan',1),(264,'2301',2301,'',0,'CATAMARCA','Catamarca',1),(265,'2302',2301,'',0,'JUJUY','Jujuy',1),(266,'2303',2301,'',0,'TUCAMAN','Tucamán',1),(267,'2304',2301,'',0,'SANTIAGO DEL ESTERO','Santiago del Estero',1),(268,'2305',2301,'',0,'SALTA','Salta',1),(269,'2306',2302,'',0,'CHACO','Chaco',1),(270,'2307',2302,'',0,'CORRIENTES','Corrientes',1),(271,'2308',2302,'',0,'ENTRE RIOS','Entre Ríos',1),(272,'2309',2302,'',0,'FORMOSA MISIONES','Formosa Misiones',1),(273,'2310',2302,'',0,'SANTA FE','Santa Fe',1),(274,'2311',2303,'',0,'LA RIOJA','La Rioja',1),(275,'2312',2303,'',0,'MENDOZA','Mendoza',1),(276,'2313',2303,'',0,'SAN JUAN','San Juan',1),(277,'2314',2303,'',0,'SAN LUIS','San Luis',1),(278,'2315',2304,'',0,'CORDOBA','Córdoba',1),(279,'2316',2304,'',0,'BUENOS AIRES','Buenos Aires',1),(280,'2317',2304,'',0,'CABA','Caba',1),(281,'2318',2305,'',0,'LA PAMPA','La Pampa',1),(282,'2319',2305,'',0,'NEUQUEN','Neuquén',1),(283,'2320',2305,'',0,'RIO NEGRO','Río Negro',1),(284,'2321',2305,'',0,'CHUBUT','Chubut',1),(285,'2322',2305,'',0,'SANTA CRUZ','Santa Cruz',1),(286,'2323',2305,'',0,'TIERRA DEL FUEGO','Tierra del Fuego',1),(287,'2324',2305,'',0,'ISLAS MALVINAS','Islas Malvinas',1),(288,'2325',2305,'',0,'ANTARTIDA','Antártida',1),(289,'AN',11701,NULL,0,'AN','Andaman & Nicobar',1),(290,'AP',11701,NULL,0,'AP','Andhra Pradesh',1),(291,'AR',11701,NULL,0,'AR','Arunachal Pradesh',1),(292,'AS',11701,NULL,0,'AS','Assam',1),(293,'BR',11701,NULL,0,'BR','Bihar',1),(294,'CG',11701,NULL,0,'CG','Chattisgarh',1),(295,'CH',11701,NULL,0,'CH','Chandigarh',1),(296,'DD',11701,NULL,0,'DD','Daman & Diu',1),(297,'DL',11701,NULL,0,'DL','Delhi',1),(298,'DN',11701,NULL,0,'DN','Dadra and Nagar Haveli',1),(299,'GA',11701,NULL,0,'GA','Goa',1),(300,'GJ',11701,NULL,0,'GJ','Gujarat',1),(301,'HP',11701,NULL,0,'HP','Himachal Pradesh',1),(302,'HR',11701,NULL,0,'HR','Haryana',1),(303,'JH',11701,NULL,0,'JH','Jharkhand',1),(304,'JK',11701,NULL,0,'JK','Jammu & Kashmir',1),(305,'KA',11701,NULL,0,'KA','Karnataka',1),(306,'KL',11701,NULL,0,'KL','Kerala',1),(307,'LD',11701,NULL,0,'LD','Lakshadweep',1),(308,'MH',11701,NULL,0,'MH','Maharashtra',1),(309,'ML',11701,NULL,0,'ML','Meghalaya',1),(310,'MN',11701,NULL,0,'MN','Manipur',1),(311,'MP',11701,NULL,0,'MP','Madhya Pradesh',1),(312,'MZ',11701,NULL,0,'MZ','Mizoram',1),(313,'NL',11701,NULL,0,'NL','Nagaland',1),(314,'OR',11701,NULL,0,'OR','Orissa',1),(315,'PB',11701,NULL,0,'PB','Punjab',1),(316,'PY',11701,NULL,0,'PY','Puducherry',1),(317,'RJ',11701,NULL,0,'RJ','Rajasthan',1),(318,'SK',11701,NULL,0,'SK','Sikkim',1),(319,'TN',11701,NULL,0,'TN','Tamil Nadu',1),(320,'TR',11701,NULL,0,'TR','Tripura',1),(321,'UL',11701,NULL,0,'UL','Uttarakhand',1),(322,'UP',11701,NULL,0,'UP','Uttar Pradesh',1),(323,'WB',11701,NULL,0,'WB','West Bengal',1),(374,'151',6715,'',0,'151','Arica',1),(375,'152',6715,'',0,'152','Parinacota',1),(376,'011',6701,'',0,'011','Iquique',1),(377,'014',6701,'',0,'014','Tamarugal',1),(378,'021',6702,'',0,'021','Antofagasa',1),(379,'022',6702,'',0,'022','El Loa',1),(380,'023',6702,'',0,'023','Tocopilla',1),(381,'031',6703,'',0,'031','Copiapó',1),(382,'032',6703,'',0,'032','Chañaral',1),(383,'033',6703,'',0,'033','Huasco',1),(384,'041',6704,'',0,'041','Elqui',1),(385,'042',6704,'',0,'042','Choapa',1),(386,'043',6704,'',0,'043','Limarí',1),(387,'051',6705,'',0,'051','Valparaíso',1),(388,'052',6705,'',0,'052','Isla de Pascua',1),(389,'053',6705,'',0,'053','Los Andes',1),(390,'054',6705,'',0,'054','Petorca',1),(391,'055',6705,'',0,'055','Quillota',1),(392,'056',6705,'',0,'056','San Antonio',1),(393,'057',6705,'',0,'057','San Felipe de Aconcagua',1),(394,'058',6705,'',0,'058','Marga Marga',1),(395,'061',6706,'',0,'061','Cachapoal',1),(396,'062',6706,'',0,'062','Cardenal Caro',1),(397,'063',6706,'',0,'063','Colchagua',1),(398,'071',6707,'',0,'071','Talca',1),(399,'072',6707,'',0,'072','Cauquenes',1),(400,'073',6707,'',0,'073','Curicó',1),(401,'074',6707,'',0,'074','Linares',1),(402,'081',6708,'',0,'081','Concepción',1),(403,'082',6708,'',0,'082','Arauco',1),(404,'083',6708,'',0,'083','Biobío',1),(405,'084',6708,'',0,'084','Ñuble',1),(406,'091',6709,'',0,'091','Cautín',1),(407,'092',6709,'',0,'092','Malleco',1),(408,'141',6714,'',0,'141','Valdivia',1),(409,'142',6714,'',0,'142','Ranco',1),(410,'101',6710,'',0,'101','Llanquihue',1),(411,'102',6710,'',0,'102','Chiloé',1),(412,'103',6710,'',0,'103','Osorno',1),(413,'104',6710,'',0,'104','Palena',1),(414,'111',6711,'',0,'111','Coihaique',1),(415,'112',6711,'',0,'112','Aisén',1),(416,'113',6711,'',0,'113','Capitán Prat',1),(417,'114',6711,'',0,'114','General Carrera',1),(418,'121',6712,'',0,'121','Magallanes',1),(419,'122',6712,'',0,'122','Antártica Chilena',1),(420,'123',6712,'',0,'123','Tierra del Fuego',1),(421,'124',6712,'',0,'124','Última Esperanza',1),(422,'131',6713,'',0,'131','Santiago',1),(423,'132',6713,'',0,'132','Cordillera',1),(424,'133',6713,'',0,'133','Chacabuco',1),(425,'134',6713,'',0,'134','Maipo',1),(426,'135',6713,'',0,'135','Melipilla',1),(427,'136',6713,'',0,'136','Talagante',1),(428,'DIF',15401,'',0,'DIF','Distrito Federal',1),(429,'AGS',15401,'',0,'AGS','Aguascalientes',1),(430,'BCN',15401,'',0,'BCN','Baja California Norte',1),(431,'BCS',15401,'',0,'BCS','Baja California Sur',1),(432,'CAM',15401,'',0,'CAM','Campeche',1),(433,'CHP',15401,'',0,'CHP','Chiapas',1),(434,'CHI',15401,'',0,'CHI','Chihuahua',1),(435,'COA',15401,'',0,'COA','Coahuila',1),(436,'COL',15401,'',0,'COL','Colima',1),(437,'DUR',15401,'',0,'DUR','Durango',1),(438,'GTO',15401,'',0,'GTO','Guanajuato',1),(439,'GRO',15401,'',0,'GRO','Guerrero',1),(440,'HGO',15401,'',0,'HGO','Hidalgo',1),(441,'JAL',15401,'',0,'JAL','Jalisco',1),(442,'MEX',15401,'',0,'MEX','México',1),(443,'MIC',15401,'',0,'MIC','Michoacán de Ocampo',1),(444,'MOR',15401,'',0,'MOR','Morelos',1),(445,'NAY',15401,'',0,'NAY','Nayarit',1),(446,'NLE',15401,'',0,'NLE','Nuevo León',1),(447,'OAX',15401,'',0,'OAX','Oaxaca',1),(448,'PUE',15401,'',0,'PUE','Puebla',1),(449,'QRO',15401,'',0,'QRO','Querétaro',1),(451,'ROO',15401,'',0,'ROO','Quintana Roo',1),(452,'SLP',15401,'',0,'SLP','San Luis Potosí',1),(453,'SIN',15401,'',0,'SIN','Sinaloa',1),(454,'SON',15401,'',0,'SON','Sonora',1),(455,'TAB',15401,'',0,'TAB','Tabasco',1),(456,'TAM',15401,'',0,'TAM','Tamaulipas',1),(457,'TLX',15401,'',0,'TLX','Tlaxcala',1),(458,'VER',15401,'',0,'VER','Veracruz',1),(459,'YUC',15401,'',0,'YUC','Yucatán',1),(460,'ZAC',15401,'',0,'ZAC','Zacatecas',1),(461,'ANT',7001,'',0,'ANT','Antioquia',1),(462,'BOL',7001,'',0,'BOL','Bolívar',1),(463,'BOY',7001,'',0,'BOY','Boyacá',1),(464,'CAL',7001,'',0,'CAL','Caldas',1),(465,'CAU',7001,'',0,'CAU','Cauca',1),(466,'CUN',7001,'',0,'CUN','Cundinamarca',1),(467,'HUI',7001,'',0,'HUI','Huila',1),(468,'LAG',7001,'',0,'LAG','La Guajira',1),(469,'MET',7001,'',0,'MET','Meta',1),(470,'NAR',7001,'',0,'NAR','Nariño',1),(471,'NDS',7001,'',0,'NDS','Norte de Santander',1),(472,'SAN',7001,'',0,'SAN','Santander',1),(473,'SUC',7001,'',0,'SUC','Sucre',1),(474,'TOL',7001,'',0,'TOL','Tolima',1),(475,'VAC',7001,'',0,'VAC','Valle del Cauca',1),(476,'RIS',7001,'',0,'RIS','Risalda',1),(477,'ATL',7001,'',0,'ATL','Atlántico',1),(478,'COR',7001,'',0,'COR','Córdoba',1),(479,'SAP',7001,'',0,'SAP','San Andrés, Providencia y Santa Catalina',1),(480,'ARA',7001,'',0,'ARA','Arauca',1),(481,'CAS',7001,'',0,'CAS','Casanare',1),(482,'AMA',7001,'',0,'AMA','Amazonas',1),(483,'CAQ',7001,'',0,'CAQ','Caquetá',1),(484,'CHO',7001,'',0,'CHO','Chocó',1),(485,'GUA',7001,'',0,'GUA','Guainía',1),(486,'GUV',7001,'',0,'GUV','Guaviare',1),(487,'PUT',7001,'',0,'PUT','Putumayo',1),(488,'QUI',7001,'',0,'QUI','Quindío',1),(489,'VAU',7001,'',0,'VAU','Vaupés',1),(490,'BOG',7001,'',0,'BOG','Bogotá',1),(491,'VID',7001,'',0,'VID','Vichada',1),(492,'CES',7001,'',0,'CES','Cesar',1),(493,'MAG',7001,'',0,'MAG','Magdalena',1),(494,'AT',11401,'',0,'AT','Atlántida',1),(495,'CH',11401,'',0,'CH','Choluteca',1),(496,'CL',11401,'',0,'CL','Colón',1),(497,'CM',11401,'',0,'CM','Comayagua',1),(498,'CO',11401,'',0,'CO','Copán',1),(499,'CR',11401,'',0,'CR','Cortés',1),(500,'EP',11401,'',0,'EP','El Paraíso',1),(501,'FM',11401,'',0,'FM','Francisco Morazán',1),(502,'GD',11401,'',0,'GD','Gracias a Dios',1),(503,'IN',11401,'',0,'IN','Intibucá',1),(504,'IB',11401,'',0,'IB','Islas de la Bahía',1),(505,'LP',11401,'',0,'LP','La Paz',1),(506,'LM',11401,'',0,'LM','Lempira',1),(507,'OC',11401,'',0,'OC','Ocotepeque',1),(508,'OL',11401,'',0,'OL','Olancho',1),(509,'SB',11401,'',0,'SB','Santa Bárbara',1),(510,'VL',11401,'',0,'VL','Valle',1),(511,'YO',11401,'',0,'YO','Yoro',1),(512,'DC',11401,'',0,'DC','Distrito Central',1),(652,'CC',4601,'Oistins',0,'CC','Christ Church',1),(655,'SA',4601,'Greenland',0,'SA','Saint Andrew',1),(656,'SG',4601,'Bulkeley',0,'SG','Saint George',1),(657,'JA',4601,'Holetown',0,'JA','Saint James',1),(658,'SJ',4601,'Four Roads',0,'SJ','Saint John',1),(659,'SB',4601,'Bathsheba',0,'SB','Saint Joseph',1),(660,'SL',4601,'Crab Hill',0,'SL','Saint Lucy',1),(661,'SM',4601,'Bridgetown',0,'SM','Saint Michael',1),(662,'SP',4601,'Speightstown',0,'SP','Saint Peter',1),(663,'SC',4601,'Crane',0,'SC','Saint Philip',1),(664,'ST',4601,'Hillaby',0,'ST','Saint Thomas',1),(777,'AG',315,NULL,NULL,NULL,'AGRIGENTO',1),(778,'AL',312,NULL,NULL,NULL,'ALESSANDRIA',1),(779,'AN',310,NULL,NULL,NULL,'ANCONA',1),(780,'AO',319,NULL,NULL,NULL,'AOSTA',1),(781,'AR',316,NULL,NULL,NULL,'AREZZO',1),(782,'AP',310,NULL,NULL,NULL,'ASCOLI PICENO',1),(783,'AT',312,NULL,NULL,NULL,'ASTI',1),(784,'AV',304,NULL,NULL,NULL,'AVELLINO',1),(785,'BA',313,NULL,NULL,NULL,'BARI',1),(786,'BT',313,NULL,NULL,NULL,'BARLETTA-ANDRIA-TRANI',1),(787,'BL',320,NULL,NULL,NULL,'BELLUNO',1),(788,'BN',304,NULL,NULL,NULL,'BENEVENTO',1),(789,'BG',309,NULL,NULL,NULL,'BERGAMO',1),(790,'BI',312,NULL,NULL,NULL,'BIELLA',1),(791,'BO',305,NULL,NULL,NULL,'BOLOGNA',1),(792,'BZ',317,NULL,NULL,NULL,'BOLZANO',1),(793,'BS',309,NULL,NULL,NULL,'BRESCIA',1),(794,'BR',313,NULL,NULL,NULL,'BRINDISI',1),(795,'CA',314,NULL,NULL,NULL,'CAGLIARI',1),(796,'CL',315,NULL,NULL,NULL,'CALTANISSETTA',1),(797,'CB',311,NULL,NULL,NULL,'CAMPOBASSO',1),(798,'CI',314,NULL,NULL,NULL,'CARBONIA-IGLESIAS',1),(799,'CE',304,NULL,NULL,NULL,'CASERTA',1),(800,'CT',315,NULL,NULL,NULL,'CATANIA',1),(801,'CZ',303,NULL,NULL,NULL,'CATANZARO',1),(802,'CH',301,NULL,NULL,NULL,'CHIETI',1),(803,'CO',309,NULL,NULL,NULL,'COMO',1),(804,'CS',303,NULL,NULL,NULL,'COSENZA',1),(805,'CR',309,NULL,NULL,NULL,'CREMONA',1),(806,'KR',303,NULL,NULL,NULL,'CROTONE',1),(807,'CN',312,NULL,NULL,NULL,'CUNEO',1),(808,'EN',315,NULL,NULL,NULL,'ENNA',1),(809,'FM',310,NULL,NULL,NULL,'FERMO',1),(810,'FE',305,NULL,NULL,NULL,'FERRARA',1),(811,'FI',316,NULL,NULL,NULL,'FIRENZE',1),(812,'FG',313,NULL,NULL,NULL,'FOGGIA',1),(813,'FC',305,NULL,NULL,NULL,'FORLI-CESENA',1),(814,'FR',307,NULL,NULL,NULL,'FROSINONE',1),(815,'GE',308,NULL,NULL,NULL,'GENOVA',1),(816,'GO',306,NULL,NULL,NULL,'GORIZIA',1),(817,'GR',316,NULL,NULL,NULL,'GROSSETO',1),(818,'IM',308,NULL,NULL,NULL,'IMPERIA',1),(819,'IS',311,NULL,NULL,NULL,'ISERNIA',1),(820,'SP',308,NULL,NULL,NULL,'LA SPEZIA',1),(821,'AQ',301,NULL,NULL,NULL,'L AQUILA',1),(822,'LT',307,NULL,NULL,NULL,'LATINA',1),(823,'LE',313,NULL,NULL,NULL,'LECCE',1),(824,'LC',309,NULL,NULL,NULL,'LECCO',1),(825,'LI',314,NULL,NULL,NULL,'LIVORNO',1),(826,'LO',309,NULL,NULL,NULL,'LODI',1),(827,'LU',316,NULL,NULL,NULL,'LUCCA',1),(828,'MC',310,NULL,NULL,NULL,'MACERATA',1),(829,'MN',309,NULL,NULL,NULL,'MANTOVA',1),(830,'MS',316,NULL,NULL,NULL,'MASSA-CARRARA',1),(831,'MT',302,NULL,NULL,NULL,'MATERA',1),(832,'VS',314,NULL,NULL,NULL,'MEDIO CAMPIDANO',1),(833,'ME',315,NULL,NULL,NULL,'MESSINA',1),(834,'MI',309,NULL,NULL,NULL,'MILANO',1),(835,'MB',309,NULL,NULL,NULL,'MONZA e BRIANZA',1),(836,'MO',305,NULL,NULL,NULL,'MODENA',1),(837,'NA',304,NULL,NULL,NULL,'NAPOLI',1),(838,'NO',312,NULL,NULL,NULL,'NOVARA',1),(839,'NU',314,NULL,NULL,NULL,'NUORO',1),(840,'OG',314,NULL,NULL,NULL,'OGLIASTRA',1),(841,'OT',314,NULL,NULL,NULL,'OLBIA-TEMPIO',1),(842,'OR',314,NULL,NULL,NULL,'ORISTANO',1),(843,'PD',320,NULL,NULL,NULL,'PADOVA',1),(844,'PA',315,NULL,NULL,NULL,'PALERMO',1),(845,'PR',305,NULL,NULL,NULL,'PARMA',1),(846,'PV',309,NULL,NULL,NULL,'PAVIA',1),(847,'PG',318,NULL,NULL,NULL,'PERUGIA',1),(848,'PU',310,NULL,NULL,NULL,'PESARO e URBINO',1),(849,'PE',301,NULL,NULL,NULL,'PESCARA',1),(850,'PC',305,NULL,NULL,NULL,'PIACENZA',1),(851,'PI',316,NULL,NULL,NULL,'PISA',1),(852,'PT',316,NULL,NULL,NULL,'PISTOIA',1),(853,'PN',306,NULL,NULL,NULL,'PORDENONE',1),(854,'PZ',302,NULL,NULL,NULL,'POTENZA',1),(855,'PO',316,NULL,NULL,NULL,'PRATO',1),(856,'RG',315,NULL,NULL,NULL,'RAGUSA',1),(857,'RA',305,NULL,NULL,NULL,'RAVENNA',1),(858,'RC',303,NULL,NULL,NULL,'REGGIO CALABRIA',1),(859,'RE',305,NULL,NULL,NULL,'REGGIO NELL EMILIA',1),(860,'RI',307,NULL,NULL,NULL,'RIETI',1),(861,'RN',305,NULL,NULL,NULL,'RIMINI',1),(862,'RM',307,NULL,NULL,NULL,'ROMA',1),(863,'RO',320,NULL,NULL,NULL,'ROVIGO',1),(864,'SA',304,NULL,NULL,NULL,'SALERNO',1),(865,'SS',314,NULL,NULL,NULL,'SASSARI',1),(866,'SV',308,NULL,NULL,NULL,'SAVONA',1),(867,'SI',316,NULL,NULL,NULL,'SIENA',1),(868,'SR',315,NULL,NULL,NULL,'SIRACUSA',1),(869,'SO',309,NULL,NULL,NULL,'SONDRIO',1),(870,'TA',313,NULL,NULL,NULL,'TARANTO',1),(871,'TE',301,NULL,NULL,NULL,'TERAMO',1),(872,'TR',318,NULL,NULL,NULL,'TERNI',1),(873,'TO',312,NULL,NULL,NULL,'TORINO',1),(874,'TP',315,NULL,NULL,NULL,'TRAPANI',1),(875,'TN',317,NULL,NULL,NULL,'TRENTO',1),(876,'TV',320,NULL,NULL,NULL,'TREVISO',1),(877,'TS',306,NULL,NULL,NULL,'TRIESTE',1),(878,'UD',306,NULL,NULL,NULL,'UDINE',1),(879,'VA',309,NULL,NULL,NULL,'VARESE',1),(880,'VE',320,NULL,NULL,NULL,'VENEZIA',1),(881,'VB',312,NULL,NULL,NULL,'VERBANO-CUSIO-OSSOLA',1),(882,'VC',312,NULL,NULL,NULL,'VERCELLI',1),(883,'VR',320,NULL,NULL,NULL,'VERONA',1),(884,'VV',303,NULL,NULL,NULL,'VIBO VALENTIA',1),(885,'VI',320,NULL,NULL,NULL,'VICENZA',1),(886,'VT',307,NULL,NULL,NULL,'VITERBO',1),(1036,'VE-L',23201,'',0,'VE-L','Mérida',1),(1037,'VE-T',23201,'',0,'VE-T','Trujillo',1),(1038,'VE-E',23201,'',0,'VE-E','Barinas',1),(1039,'VE-M',23202,'',0,'VE-M','Miranda',1),(1040,'VE-W',23202,'',0,'VE-W','Vargas',1),(1041,'VE-A',23202,'',0,'VE-A','Distrito Capital',1),(1042,'VE-D',23203,'',0,'VE-D','Aragua',1),(1043,'VE-G',23203,'',0,'VE-G','Carabobo',1),(1044,'VE-I',23204,'',0,'VE-I','Falcón',1),(1045,'VE-K',23204,'',0,'VE-K','Lara',1),(1046,'VE-U',23204,'',0,'VE-U','Yaracuy',1),(1047,'VE-F',23205,'',0,'VE-F','Bolívar',1),(1048,'VE-X',23205,'',0,'VE-X','Amazonas',1),(1049,'VE-Y',23205,'',0,'VE-Y','Delta Amacuro',1),(1050,'VE-O',23206,'',0,'VE-O','Nueva Esparta',1),(1051,'VE-Z',23206,'',0,'VE-Z','Dependencias Federales',1),(1052,'VE-C',23207,'',0,'VE-C','Apure',1),(1053,'VE-J',23207,'',0,'VE-J','Guárico',1),(1054,'VE-H',23207,'',0,'VE-H','Cojedes',1),(1055,'VE-P',23207,'',0,'VE-P','Portuguesa',1),(1056,'VE-B',23208,'',0,'VE-B','Anzoátegui',1),(1057,'VE-N',23208,'',0,'VE-N','Monagas',1),(1058,'VE-R',23208,'',0,'VE-R','Sucre',1),(1059,'VE-V',23209,'',0,'VE-V','Zulia',1),(1060,'VE-S',23209,'',0,'VE-S','Táchira',1); +/*!40000 ALTER TABLE `llx_c_departements` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_ecotaxe` +-- + +DROP TABLE IF EXISTS `llx_c_ecotaxe`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_ecotaxe` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(64) NOT NULL, + `libelle` varchar(255) DEFAULT NULL, + `price` double(24,8) DEFAULT NULL, + `organization` varchar(255) DEFAULT NULL, + `fk_pays` int(11) NOT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_c_ecotaxe` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_ecotaxe` +-- + +LOCK TABLES `llx_c_ecotaxe` WRITE; +/*!40000 ALTER TABLE `llx_c_ecotaxe` DISABLE KEYS */; +INSERT INTO `llx_c_ecotaxe` (`rowid`, `code`, `libelle`, `price`, `organization`, `fk_pays`, `active`) VALUES (1,'ER-A-A','Materiels electriques < 0,2kg',0.01000000,'ERP',1,1),(2,'ER-A-B','Materiels electriques >= 0,2 kg et < 0,5 kg',0.03000000,'ERP',1,1),(3,'ER-A-C','Materiels electriques >= 0,5 kg et < 1 kg',0.04000000,'ERP',1,1),(4,'ER-A-D','Materiels electriques >= 1 kg et < 2 kg',0.13000000,'ERP',1,1),(5,'ER-A-E','Materiels electriques >= 2 kg et < 4kg',0.21000000,'ERP',1,1),(6,'ER-A-F','Materiels electriques >= 4 kg et < 8 kg',0.42000000,'ERP',1,1),(7,'ER-A-G','Materiels electriques >= 8 kg et < 15 kg',0.84000000,'ERP',1,1),(8,'ER-A-H','Materiels electriques >= 15 kg et < 20 kg',1.25000000,'ERP',1,1),(9,'ER-A-I','Materiels electriques >= 20 kg et < 30 kg',1.88000000,'ERP',1,1),(10,'ER-A-J','Materiels electriques >= 30 kg',3.34000000,'ERP',1,1),(11,'ER-M-1','TV, Moniteurs < 9kg',0.84000000,'ERP',1,1),(12,'ER-M-2','TV, Moniteurs >= 9kg et < 15kg',1.67000000,'ERP',1,1),(13,'ER-M-3','TV, Moniteurs >= 15kg et < 30kg',3.34000000,'ERP',1,1),(14,'ER-M-4','TV, Moniteurs >= 30 kg',6.69000000,'ERP',1,1),(15,'EC-A-A','Materiels electriques 0,2 kg max',0.00840000,'Ecologic',1,1),(16,'EC-A-B','Materiels electriques 0,21 kg min - 0,50 kg max',0.02500000,'Ecologic',1,1),(17,'EC-A-C','Materiels electriques 0,51 kg min - 1 kg max',0.04000000,'Ecologic',1,1),(18,'EC-A-D','Materiels electriques 1,01 kg min - 2,5 kg max',0.13000000,'Ecologic',1,1),(19,'EC-A-E','Materiels electriques 2,51 kg min - 4 kg max',0.21000000,'Ecologic',1,1),(20,'EC-A-F','Materiels electriques 4,01 kg min - 8 kg max',0.42000000,'Ecologic',1,1),(21,'EC-A-G','Materiels electriques 8,01 kg min - 12 kg max',0.63000000,'Ecologic',1,1),(22,'EC-A-H','Materiels electriques 12,01 kg min - 20 kg max',1.05000000,'Ecologic',1,1),(23,'EC-A-I','Materiels electriques 20,01 kg min',1.88000000,'Ecologic',1,1),(24,'EC-M-1','TV, Moniteurs 9 kg max',0.84000000,'Ecologic',1,1),(25,'EC-M-2','TV, Moniteurs 9,01 kg min - 18 kg max',1.67000000,'Ecologic',1,1),(26,'EC-M-3','TV, Moniteurs 18,01 kg min - 36 kg max',3.34000000,'Ecologic',1,1),(27,'EC-M-4','TV, Moniteurs 36,01 kg min',6.69000000,'Ecologic',1,1),(28,'ES-M-1','TV, Moniteurs <= 20 pouces',0.84000000,'Eco-systemes',1,1),(29,'ES-M-2','TV, Moniteurs > 20 pouces et <= 32 pouces',3.34000000,'Eco-systemes',1,1),(30,'ES-M-3','TV, Moniteurs > 32 pouces et autres grands ecrans',6.69000000,'Eco-systemes',1,1),(31,'ES-A-A','Ordinateur fixe, Audio home systems (HIFI), elements hifi separes',0.84000000,'Eco-systemes',1,1),(32,'ES-A-B','Ordinateur portable, CD-RCR, VCR, lecteurs et enregistreurs DVD, instruments de musique et caisses de resonance, haut parleurs...',0.25000000,'Eco-systemes',1,1),(33,'ES-A-C','Imprimante, photocopieur, telecopieur',0.42000000,'Eco-systemes',1,1),(34,'ES-A-D','Accessoires, clavier, souris, PDA, imprimante photo, appareil photo, gps, telephone, repondeur, telephone sans fil, modem, telecommande, casque, camescope, baladeur mp3, radio portable, radio K7 et CD portable, radio reveil',0.08400000,'Eco-systemes',1,1),(35,'ES-A-E','GSM',0.00840000,'Eco-systemes',1,1),(36,'ES-A-F','Jouets et equipements de loisirs et de sports < 0,5 kg',0.04200000,'Eco-systemes',1,1),(37,'ES-A-G','Jouets et equipements de loisirs et de sports > 0,5 kg',0.17000000,'Eco-systemes',1,1),(38,'ES-A-H','Jouets et equipements de loisirs et de sports > 10 kg',1.25000000,'Eco-systemes',1,1); +/*!40000 ALTER TABLE `llx_c_ecotaxe` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_effectif` +-- + +DROP TABLE IF EXISTS `llx_c_effectif`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_effectif` ( + `id` int(11) NOT NULL, + `code` varchar(12) NOT NULL, + `libelle` varchar(30) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_effectif` +-- + +LOCK TABLES `llx_c_effectif` WRITE; +/*!40000 ALTER TABLE `llx_c_effectif` DISABLE KEYS */; +INSERT INTO `llx_c_effectif` (`id`, `code`, `libelle`, `active`, `module`) VALUES (0,'EF0','-',1,NULL),(1,'EF1-5','1 - 5',1,NULL),(2,'EF6-10','6 - 10',1,NULL),(3,'EF11-50','11 - 50',1,NULL),(4,'EF51-100','51 - 100',1,NULL),(5,'EF100-500','100 - 500',1,NULL),(6,'EF500-','> 500',1,NULL); +/*!40000 ALTER TABLE `llx_c_effectif` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_field_list` +-- + +DROP TABLE IF EXISTS `llx_c_field_list`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_field_list` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `element` varchar(64) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `name` varchar(32) NOT NULL, + `alias` varchar(32) NOT NULL, + `title` varchar(32) NOT NULL, + `align` varchar(6) DEFAULT 'left', + `sort` tinyint(4) NOT NULL DEFAULT '1', + `search` tinyint(4) NOT NULL DEFAULT '0', + `enabled` varchar(255) DEFAULT '1', + `rang` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_field_list` +-- + +LOCK TABLES `llx_c_field_list` WRITE; +/*!40000 ALTER TABLE `llx_c_field_list` DISABLE KEYS */; +INSERT INTO `llx_c_field_list` (`rowid`, `tms`, `element`, `entity`, `name`, `alias`, `title`, `align`, `sort`, `search`, `enabled`, `rang`) VALUES (1,'2011-02-06 11:18:30','product_default',1,'p.ref','ref','Ref','left',1,1,'1',1),(2,'2011-02-06 11:18:30','product_default',1,'p.label','label','Label','left',1,1,'1',2),(3,'2011-02-06 11:18:30','product_default',1,'p.barcode','barcode','BarCode','center',1,1,'$conf->barcode->enabled',3),(4,'2011-02-06 11:18:30','product_default',1,'p.tms','datem','DateModification','center',1,0,'1',4),(5,'2011-02-06 11:18:30','product_default',1,'p.price','price','SellingPriceHT','right',1,0,'1',5),(6,'2011-02-06 11:18:30','product_default',1,'p.price_ttc','price_ttc','SellingPriceTTC','right',1,0,'1',6),(7,'2011-02-06 11:18:30','product_default',1,'p.stock','stock','Stock','right',0,0,'$conf->stock->enabled',7),(8,'2011-02-06 11:18:30','product_default',1,'p.envente','status','Status','right',1,0,'1',8); +/*!40000 ALTER TABLE `llx_c_field_list` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_forme_juridique` +-- + +DROP TABLE IF EXISTS `llx_c_forme_juridique`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_forme_juridique` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` int(11) NOT NULL, + `fk_pays` int(11) NOT NULL, + `libelle` varchar(255) DEFAULT NULL, + `isvatexempted` tinyint(4) NOT NULL DEFAULT '0', + `active` tinyint(4) NOT NULL DEFAULT '1', + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_c_forme_juridique` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=100014 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_forme_juridique` +-- + +LOCK TABLES `llx_c_forme_juridique` WRITE; +/*!40000 ALTER TABLE `llx_c_forme_juridique` DISABLE KEYS */; +INSERT INTO `llx_c_forme_juridique` (`rowid`, `code`, `fk_pays`, `libelle`, `isvatexempted`, `active`, `module`) VALUES (399,0,0,'-',0,1,NULL),(400,2301,23,'Monotributista',0,1,NULL),(401,2302,23,'Sociedad Civil',0,1,NULL),(402,2303,23,'Sociedades Comerciales',0,1,NULL),(403,2304,23,'Sociedades de Hecho',0,1,NULL),(404,2305,23,'Sociedades Irregulares',0,1,NULL),(405,2306,23,'Sociedad Colectiva',0,1,NULL),(406,2307,23,'Sociedad en Comandita Simple',0,1,NULL),(407,2308,23,'Sociedad de Capital e Industria',0,1,NULL),(408,2309,23,'Sociedad Accidental o en participación',0,1,NULL),(409,2310,23,'Sociedad de Responsabilidad Limitada',0,1,NULL),(410,2311,23,'Sociedad Anónima',0,1,NULL),(411,2312,23,'Sociedad Anónima con Participación Estatal Mayoritaria',0,1,NULL),(412,2313,23,'Sociedad en Comandita por Acciones (arts. 315 a 324, LSC)',0,1,NULL),(413,11,1,'Artisan Commerçant (EI)',0,1,NULL),(414,12,1,'Commerçant (EI)',0,1,NULL),(415,13,1,'Artisan (EI)',0,1,NULL),(416,14,1,'Officier public ou ministériel',0,1,NULL),(417,15,1,'Profession libérale (EI)',0,1,NULL),(418,16,1,'Exploitant agricole',0,1,NULL),(419,17,1,'Agent commercial',0,1,NULL),(420,18,1,'Associé Gérant de société',0,1,NULL),(421,19,1,'Personne physique',0,1,NULL),(422,21,1,'Indivision',0,1,NULL),(423,22,1,'Société créée de fait',0,1,NULL),(424,23,1,'Société en participation',0,1,NULL),(425,27,1,'Paroisse hors zone concordataire',0,1,NULL),(426,29,1,'Groupement de droit privé non doté de la personnalité morale',0,1,NULL),(427,31,1,'Personne morale de droit étranger, immatriculée au RCS',0,1,NULL),(428,32,1,'Personne morale de droit étranger, non immatriculée au RCS',0,1,NULL),(429,35,1,'Régime auto-entrepreneur',0,1,NULL),(430,41,1,'Établissement public ou régie à caractère industriel ou commercial',0,1,NULL),(431,51,1,'Société coopérative commerciale particulière',0,1,NULL),(432,52,1,'Société en nom collectif',0,1,NULL),(433,53,1,'Société en commandite',0,1,NULL),(434,54,1,'Société à responsabilité limitée (SARL)',0,1,NULL),(435,55,1,'Société anonyme à conseil d administration',0,1,NULL),(436,56,1,'Société anonyme à directoire',0,1,NULL),(437,57,1,'Société par actions simplifiée',0,1,NULL),(438,58,1,'Entreprise Unipersonnelle à Responsabilité Limitée (EURL)',0,1,NULL),(439,61,1,'Caisse d\'épargne et de prévoyance',0,1,NULL),(440,62,1,'Groupement d\'intérêt économique (GIE)',0,1,NULL),(441,63,1,'Société coopérative agricole',0,1,NULL),(442,64,1,'Société non commerciale d assurances',0,1,NULL),(443,65,1,'Société civile',0,1,NULL),(444,69,1,'Personnes de droit privé inscrites au RCS',0,1,NULL),(445,71,1,'Administration de l état',0,1,NULL),(446,72,1,'Collectivité territoriale',0,1,NULL),(447,73,1,'Établissement public administratif',0,1,NULL),(448,74,1,'Personne morale de droit public administratif',0,1,NULL),(449,81,1,'Organisme gérant régime de protection social à adhésion obligatoire',0,1,NULL),(450,82,1,'Organisme mutualiste',0,1,NULL),(451,83,1,'Comité d entreprise',0,1,NULL),(452,84,1,'Organisme professionnel',0,1,NULL),(453,85,1,'Organisme de retraite à adhésion non obligatoire',0,1,NULL),(454,91,1,'Syndicat de propriétaires',0,1,NULL),(455,92,1,'Association loi 1901 ou assimilé',0,1,NULL),(456,93,1,'Fondation',0,1,NULL),(457,99,1,'Personne morale de droit privé',0,1,NULL),(458,200,2,'Indépendant',0,1,NULL),(459,201,2,'SPRL - Société à responsabilité limitée',0,1,NULL),(460,202,2,'SA - Société Anonyme',0,1,NULL),(461,203,2,'SCRL - Société coopérative à responsabilité limitée',0,1,NULL),(462,204,2,'ASBL - Association sans but Lucratif',0,1,NULL),(463,205,2,'SCRI - Société coopérative à responsabilité illimitée',0,1,NULL),(464,206,2,'SCS - Société en commandite simple',0,1,NULL),(465,207,2,'SCA - Société en commandite par action',0,1,NULL),(466,208,2,'SNC - Société en nom collectif',0,1,NULL),(467,209,2,'GIE - Groupement d intérêt économique',0,1,NULL),(468,210,2,'GEIE - Groupement européen d intérêt économique',0,1,NULL),(469,500,5,'Limited liability corporation (GmbH)',0,1,NULL),(470,501,5,'Stock corporation (AG)',0,1,NULL),(471,502,5,'Partnerships general or limited (GmbH & CO. KG)',0,1,NULL),(472,503,5,'Sole proprietor / Private business',0,1,NULL),(473,301,3,'Società semplice',0,1,NULL),(474,302,3,'Società in nome collettivo s.n.c.',0,1,NULL),(475,303,3,'Società in accomandita semplice s.a.s.',0,1,NULL),(476,304,3,'Società per azioni s.p.a.',0,1,NULL),(477,305,3,'Società a responsabilità limitata s.r.l.',0,1,NULL),(478,306,3,'Società in accomandita per azioni s.a.p.a.',0,1,NULL),(479,307,3,'Società cooperativa',0,1,NULL),(480,308,3,'Società consortile',0,1,NULL),(481,309,3,'Società europea',0,1,NULL),(482,310,3,'Società cooperativa europea',0,1,NULL),(483,311,3,'Società unipersonale',0,1,NULL),(484,312,3,'Società di professionisti',0,1,NULL),(485,313,3,'Società di fatto',0,1,NULL),(486,314,3,'Società occulta',0,1,NULL),(487,315,3,'Società apparente',0,1,NULL),(488,316,3,'Impresa individuale ',0,1,NULL),(489,317,3,'Impresa coniugale',0,1,NULL),(490,318,3,'Impresa familiare',0,1,NULL),(491,600,6,'Raison Individuelle',0,1,NULL),(492,601,6,'Société Simple',0,1,NULL),(493,602,6,'Société en nom collectif',0,1,NULL),(494,603,6,'Société en commandite',0,1,NULL),(495,604,6,'Société anonyme (SA)',0,1,NULL),(496,605,6,'Société en commandite par actions',0,1,NULL),(497,606,6,'Société à responsabilité limitée (SARL)',0,1,NULL),(498,607,6,'Société coopérative',0,1,NULL),(499,608,6,'Association',0,1,NULL),(500,609,6,'Fondation',0,1,NULL),(501,700,7,'Sole Trader',0,1,NULL),(502,701,7,'Partnership',0,1,NULL),(503,702,7,'Private Limited Company by shares (LTD)',0,1,NULL),(504,703,7,'Public Limited Company',0,1,NULL),(505,704,7,'Workers Cooperative',0,1,NULL),(506,705,7,'Limited Liability Partnership',0,1,NULL),(507,706,7,'Franchise',0,1,NULL),(508,1000,10,'Société à responsabilité limitée (SARL)',0,1,NULL),(509,1001,10,'Société en Nom Collectif (SNC)',0,1,NULL),(510,1002,10,'Société en Commandite Simple (SCS)',0,1,NULL),(511,1003,10,'société en participation',0,1,NULL),(512,1004,10,'Société Anonyme (SA)',0,1,NULL),(513,1005,10,'Société Unipersonnelle à Responsabilité Limitée (SUARL)',0,1,NULL),(514,1006,10,'Groupement d\'intérêt économique (GEI)',0,1,NULL),(515,1007,10,'Groupe de sociétés',0,1,NULL),(516,401,4,'Empresario Individual',0,1,NULL),(517,402,4,'Comunidad de Bienes',0,1,NULL),(518,403,4,'Sociedad Civil',0,1,NULL),(519,404,4,'Sociedad Colectiva',0,1,NULL),(520,405,4,'Sociedad Limitada',0,1,NULL),(521,406,4,'Sociedad Anónima',0,1,NULL),(522,407,4,'Sociedad Comandataria por Acciones',0,1,NULL),(523,408,4,'Sociedad Comandataria Simple',0,1,NULL),(524,409,4,'Sociedad Laboral',0,1,NULL),(525,410,4,'Sociedad Cooperativa',0,1,NULL),(526,411,4,'Sociedad de Garantía Recíproca',0,1,NULL),(527,412,4,'Entidad de Capital-Riesgo',0,1,NULL),(528,413,4,'Agrupación de Interés Económico',0,1,NULL),(529,414,4,'Sociedad de Inversión Mobiliaria',0,1,NULL),(530,415,4,'Agrupación sin Ánimo de Lucro',0,1,NULL),(531,15201,152,'Mauritius Private Company Limited By Shares',0,1,NULL),(532,15202,152,'Mauritius Company Limited By Guarantee',0,1,NULL),(533,15203,152,'Mauritius Public Company Limited By Shares',0,1,NULL),(534,15204,152,'Mauritius Foreign Company',0,1,NULL),(535,15205,152,'Mauritius GBC1 (Offshore Company)',0,1,NULL),(536,15206,152,'Mauritius GBC2 (International Company)',0,1,NULL),(537,15207,152,'Mauritius General Partnership',0,1,NULL),(538,15208,152,'Mauritius Limited Partnership',0,1,NULL),(539,15209,152,'Mauritius Sole Proprietorship',0,1,NULL),(540,15210,152,'Mauritius Trusts',0,1,NULL),(541,15401,154,'Sociedad en nombre colectivo',0,1,NULL),(542,15402,154,'Sociedad en comandita simple',0,1,NULL),(543,15403,154,'Sociedad de responsabilidad limitada',0,1,NULL),(544,15404,154,'Sociedad anónima',0,1,NULL),(545,15405,154,'Sociedad en comandita por acciones',0,1,NULL),(546,15406,154,'Sociedad cooperativa',0,1,NULL),(100001,100001,1,'Etudiant',0,0,'cabinetmed'),(100002,100002,1,'Retraité',0,0,'cabinetmed'),(100003,100003,1,'Artisan',0,0,'cabinetmed'),(100004,100004,1,'Femme de ménage',0,0,'cabinetmed'),(100005,100005,1,'Professeur',0,0,'cabinetmed'),(100006,100006,1,'Profession libérale',0,0,'cabinetmed'),(100007,100007,1,'Informaticien',0,0,'cabinetmed'); +/*!40000 ALTER TABLE `llx_c_forme_juridique` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_input_method` +-- + +DROP TABLE IF EXISTS `llx_c_input_method`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_input_method` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(30) DEFAULT NULL, + `libelle` varchar(60) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_c_methode_commande_fournisseur` (`code`), + UNIQUE KEY `uk_c_input_method` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_input_method` +-- + +LOCK TABLES `llx_c_input_method` WRITE; +/*!40000 ALTER TABLE `llx_c_input_method` DISABLE KEYS */; +INSERT INTO `llx_c_input_method` (`rowid`, `code`, `libelle`, `active`, `module`) VALUES (1,'OrderByMail','Courrier',1,NULL),(2,'OrderByFax','Fax',1,NULL),(3,'OrderByEMail','EMail',1,NULL),(4,'OrderByPhone','Téléphone',1,NULL),(5,'OrderByWWW','En ligne',1,NULL); +/*!40000 ALTER TABLE `llx_c_input_method` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_input_reason` +-- + +DROP TABLE IF EXISTS `llx_c_input_reason`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_input_reason` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(30) NOT NULL, + `label` varchar(60) NOT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_c_input_reason` (`code`) +) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_input_reason` +-- + +LOCK TABLES `llx_c_input_reason` WRITE; +/*!40000 ALTER TABLE `llx_c_input_reason` DISABLE KEYS */; +INSERT INTO `llx_c_input_reason` (`rowid`, `code`, `label`, `active`, `module`) VALUES (1,'SRC_INTE','Web site',1,NULL),(2,'SRC_CAMP_MAIL','Mailing campaign',1,NULL),(3,'SRC_CAMP_PHO','Phone campaign',1,NULL),(4,'SRC_CAMP_FAX','Fax campaign',1,NULL),(5,'SRC_COMM','Commercial contact',1,NULL),(6,'SRC_SHOP','Shop contact',1,NULL),(7,'SRC_CAMP_EMAIL','EMailing campaign',1,NULL); +/*!40000 ALTER TABLE `llx_c_input_reason` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_methode_commande_fournisseur` +-- + +DROP TABLE IF EXISTS `llx_c_methode_commande_fournisseur`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_methode_commande_fournisseur` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(30) DEFAULT NULL, + `libelle` varchar(60) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_c_methode_commande_fournisseur` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_methode_commande_fournisseur` +-- + +LOCK TABLES `llx_c_methode_commande_fournisseur` WRITE; +/*!40000 ALTER TABLE `llx_c_methode_commande_fournisseur` DISABLE KEYS */; +INSERT INTO `llx_c_methode_commande_fournisseur` (`rowid`, `code`, `libelle`, `active`) VALUES (1,'OrderByMail','Courrier',1),(2,'OrderByFax','Fax',1),(3,'OrderByEMail','EMail',1),(4,'OrderByPhone','Téléphone',1),(5,'OrderByWWW','En ligne',1); +/*!40000 ALTER TABLE `llx_c_methode_commande_fournisseur` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_paiement` +-- + +DROP TABLE IF EXISTS `llx_c_paiement`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_paiement` ( + `id` int(11) NOT NULL, + `code` varchar(6) NOT NULL, + `libelle` varchar(30) DEFAULT NULL, + `type` smallint(6) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_paiement` +-- + +LOCK TABLES `llx_c_paiement` WRITE; +/*!40000 ALTER TABLE `llx_c_paiement` DISABLE KEYS */; +INSERT INTO `llx_c_paiement` (`id`, `code`, `libelle`, `type`, `active`, `module`) VALUES (0,'','-',3,1,NULL),(1,'TIP','TIP',2,1,NULL),(2,'VIR','Virement',2,1,NULL),(3,'PRE','Prélèvement',2,1,NULL),(4,'LIQ','Espèces',2,1,NULL),(6,'CB','Carte Bancaire',2,1,NULL),(7,'CHQ','Chèque',2,1,NULL),(50,'VAD','Paiement en ligne',2,0,NULL),(51,'TRA','Traite',2,0,NULL),(52,'LCR','LCR',2,0,NULL),(53,'FAC','Factor',2,0,NULL),(54,'PRO','Proforma',2,0,NULL); +/*!40000 ALTER TABLE `llx_c_paiement` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_paper_format` +-- + +DROP TABLE IF EXISTS `llx_c_paper_format`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_paper_format` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(16) NOT NULL, + `label` varchar(50) NOT NULL, + `width` float(6,2) DEFAULT '0.00', + `height` float(6,2) DEFAULT '0.00', + `unit` varchar(5) NOT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=226 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_paper_format` +-- + +LOCK TABLES `llx_c_paper_format` WRITE; +/*!40000 ALTER TABLE `llx_c_paper_format` DISABLE KEYS */; +INSERT INTO `llx_c_paper_format` (`rowid`, `code`, `label`, `width`, `height`, `unit`, `active`, `module`) VALUES (1,'4A0','Format 4A0',1682.00,2378.00,'mm',1,NULL),(2,'2A0','Format 2A0',1189.00,1682.00,'mm',1,NULL),(3,'A0','Format A0',840.00,1189.00,'mm',1,NULL),(4,'A1','Format A1',594.00,840.00,'mm',1,NULL),(5,'A2','Format A2',420.00,594.00,'mm',1,NULL),(6,'A3','Format A3',297.00,420.00,'mm',1,NULL),(7,'A4','Format A4',210.00,297.00,'mm',1,NULL),(8,'A5','Format A5',148.00,210.00,'mm',1,NULL),(9,'A6','Format A6',105.00,148.00,'mm',1,NULL),(100,'USLetter','Format Letter (A)',216.00,279.00,'mm',1,NULL),(105,'USLegal','Format Legal',216.00,356.00,'mm',1,NULL),(110,'USExecutive','Format Executive',190.00,254.00,'mm',1,NULL),(115,'USLedger','Format Ledger/Tabloid (B)',279.00,432.00,'mm',1,NULL),(200,'Canadian P1','Format Canadian P1',560.00,860.00,'mm',1,NULL),(205,'Canadian P2','Format Canadian P2',430.00,560.00,'mm',1,NULL),(210,'Canadian P3','Format Canadian P3',280.00,430.00,'mm',1,NULL),(215,'Canadian P4','Format Canadian P4',215.00,280.00,'mm',1,NULL),(220,'Canadian P5','Format Canadian P5',140.00,215.00,'mm',1,NULL),(225,'Canadian P6','Format Canadian P6',107.00,140.00,'mm',1,NULL); +/*!40000 ALTER TABLE `llx_c_paper_format` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_payment_term` +-- + +DROP TABLE IF EXISTS `llx_c_payment_term`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_payment_term` ( + `rowid` int(11) NOT NULL, + `code` varchar(16) DEFAULT NULL, + `sortorder` smallint(6) DEFAULT NULL, + `active` tinyint(4) DEFAULT '1', + `libelle` varchar(255) DEFAULT NULL, + `libelle_facture` text, + `fdm` tinyint(4) DEFAULT NULL, + `nbjour` smallint(6) DEFAULT NULL, + `decalage` smallint(6) DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_payment_term` +-- + +LOCK TABLES `llx_c_payment_term` WRITE; +/*!40000 ALTER TABLE `llx_c_payment_term` DISABLE KEYS */; +INSERT INTO `llx_c_payment_term` (`rowid`, `code`, `sortorder`, `active`, `libelle`, `libelle_facture`, `fdm`, `nbjour`, `decalage`, `module`) VALUES (1,'RECEP',1,1,'A réception','Réception de facture',0,0,NULL,NULL),(2,'30D',2,1,'30 jours','Réglement à 30 jours',0,30,NULL,NULL),(3,'30DENDMONTH',3,1,'30 jours fin de mois','Réglement à 30 jours fin de mois',1,30,NULL,NULL),(4,'60D',4,1,'60 jours','Réglement à 60 jours',0,60,NULL,NULL),(5,'60DENDMONTH',5,1,'60 jours fin de mois','Réglement à 60 jours fin de mois',1,60,NULL,NULL); +/*!40000 ALTER TABLE `llx_c_payment_term` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_pays` +-- + +DROP TABLE IF EXISTS `llx_c_pays`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_pays` ( + `rowid` int(11) NOT NULL, + `code` varchar(2) NOT NULL, + `code_iso` varchar(3) DEFAULT NULL, + `libelle` varchar(50) NOT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_c_pays_code` (`code`), + UNIQUE KEY `idx_c_pays_libelle` (`libelle`), + UNIQUE KEY `idx_c_pays_code_iso` (`code_iso`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_pays` +-- + +LOCK TABLES `llx_c_pays` WRITE; +/*!40000 ALTER TABLE `llx_c_pays` DISABLE KEYS */; +INSERT INTO `llx_c_pays` (`rowid`, `code`, `code_iso`, `libelle`, `active`) VALUES (0,'',NULL,'-',1),(1,'FR',NULL,'France',1),(2,'BE',NULL,'Belgium',1),(3,'IT',NULL,'Italy',1),(4,'ES',NULL,'Spain',1),(5,'DE',NULL,'Germany',1),(6,'CH',NULL,'Suisse',1),(7,'GB',NULL,'United Kingdow',1),(8,'IE',NULL,'Irland',1),(9,'CN',NULL,'China',1),(10,'TN',NULL,'Tunisie',1),(11,'US',NULL,'United States',1),(12,'MA',NULL,'Maroc',1),(13,'DZ',NULL,'Algérie',1),(14,'CA',NULL,'Canada',1),(15,'TG',NULL,'Togo',1),(16,'GA',NULL,'Gabon',1),(17,'NL',NULL,'Nerderland',1),(18,'HU',NULL,'Hongrie',1),(19,'RU',NULL,'Russia',1),(20,'SE',NULL,'Sweden',1),(21,'CI',NULL,'Côte d\'Ivoire',1),(22,'SN',NULL,'Sénégal',1),(23,'AR',NULL,'Argentine',1),(24,'CM',NULL,'Cameroun',1),(25,'PT',NULL,'Portugal',1),(26,'SA',NULL,'Arabie Saoudite',1),(27,'MC',NULL,'Monaco',1),(28,'AU',NULL,'Australia',1),(29,'SG',NULL,'Singapour',1),(30,'AF',NULL,'Afghanistan',1),(31,'AX',NULL,'Iles Aland',1),(32,'AL',NULL,'Albanie',1),(33,'AS',NULL,'Samoa américaines',1),(34,'AD',NULL,'Andorre',1),(35,'AO',NULL,'Angola',1),(36,'AI',NULL,'Anguilla',1),(37,'AQ',NULL,'Antarctique',1),(38,'AG',NULL,'Antigua-et-Barbuda',1),(39,'AM',NULL,'Arménie',1),(40,'AW',NULL,'Aruba',1),(41,'AT',NULL,'Autriche',1),(42,'AZ',NULL,'Azerbaïdjan',1),(43,'BS',NULL,'Bahamas',1),(44,'BH',NULL,'Bahreïn',1),(45,'BD',NULL,'Bangladesh',1),(46,'BB',NULL,'Barbade',1),(47,'BY',NULL,'Biélorussie',1),(48,'BZ',NULL,'Belize',1),(49,'BJ',NULL,'Bénin',1),(50,'BM',NULL,'Bermudes',1),(51,'BT',NULL,'Bhoutan',1),(52,'BO',NULL,'Bolivie',1),(53,'BA',NULL,'Bosnie-Herzégovine',1),(54,'BW',NULL,'Botswana',1),(55,'BV',NULL,'Ile Bouvet',1),(56,'BR',NULL,'Brésil',1),(57,'IO',NULL,'Territoire britannique de l\'Océan Indien',1),(58,'BN',NULL,'Brunei',1),(59,'BG',NULL,'Bulgarie',1),(60,'BF',NULL,'Burkina Faso',1),(61,'BI',NULL,'Burundi',1),(62,'KH',NULL,'Cambodge',1),(63,'CV',NULL,'Cap-Vert',1),(64,'KY',NULL,'Iles Cayman',1),(65,'CF',NULL,'République centrafricaine',1),(66,'TD',NULL,'Tchad',1),(67,'CL',NULL,'Chili',1),(68,'CX',NULL,'Ile Christmas',1),(69,'CC',NULL,'Iles des Cocos (Keeling)',1),(70,'CO',NULL,'Colombie',1),(71,'KM',NULL,'Comores',1),(72,'CG',NULL,'Congo',1),(73,'CD',NULL,'République démocratique du Congo',1),(74,'CK',NULL,'Iles Cook',1),(75,'CR',NULL,'Costa Rica',1),(76,'HR',NULL,'Croatie',1),(77,'CU',NULL,'Cuba',1),(78,'CY',NULL,'Chypre',1),(79,'CZ',NULL,'République Tchèque',1),(80,'DK',NULL,'Danemark',1),(81,'DJ',NULL,'Djibouti',1),(82,'DM',NULL,'Dominique',1),(83,'DO',NULL,'République Dominicaine',1),(84,'EC',NULL,'Equateur',1),(85,'EG',NULL,'Egypte',1),(86,'SV',NULL,'Salvador',1),(87,'GQ',NULL,'Guinée Equatoriale',1),(88,'ER',NULL,'Erythrée',1),(89,'EE',NULL,'Estonie',1),(90,'ET',NULL,'Ethiopie',1),(91,'FK',NULL,'Iles Falkland',1),(92,'FO',NULL,'Iles Féroé',1),(93,'FJ',NULL,'Iles Fidji',1),(94,'FI',NULL,'Finlande',1),(95,'GF',NULL,'Guyane française',1),(96,'PF',NULL,'Polynésie française',1),(97,'TF',NULL,'Terres australes françaises',1),(98,'GM',NULL,'Gambie',1),(99,'GE',NULL,'Géorgie',1),(100,'GH',NULL,'Ghana',1),(101,'GI',NULL,'Gibraltar',1),(102,'GR',NULL,'Grèce',1),(103,'GL',NULL,'Groenland',1),(104,'GD',NULL,'Grenade',1),(105,'GP',NULL,'Guadeloupe',1),(106,'GU',NULL,'Guam',1),(107,'GT',NULL,'Guatemala',1),(108,'GN',NULL,'Guinée',1),(109,'GW',NULL,'Guinée-Bissao',1),(110,'GY',NULL,'Guyana',1),(111,'HT',NULL,'Haiti',1),(112,'HM',NULL,'Iles Heard et McDonald',1),(113,'VA',NULL,'Saint-Siège (Vatican)',1),(114,'HN',NULL,'Honduras',1),(115,'HK',NULL,'Hong Kong',1),(116,'IS',NULL,'Islande',1),(117,'IN',NULL,'India',1),(118,'ID',NULL,'Indonésie',1),(119,'IR',NULL,'Iran',1),(120,'IQ',NULL,'Iraq',1),(121,'IL',NULL,'Israel',1),(122,'JM',NULL,'Jamaïque',1),(123,'JP',NULL,'Japon',1),(124,'JO',NULL,'Jordanie',1),(125,'KZ',NULL,'Kazakhstan',1),(126,'KE',NULL,'Kenya',1),(127,'KI',NULL,'Kiribati',1),(128,'KP',NULL,'Corée du Nord',1),(129,'KR',NULL,'Corée du Sud',1),(130,'KW',NULL,'Koweït',1),(131,'KG',NULL,'Kirghizistan',1),(132,'LA',NULL,'Laos',1),(133,'LV',NULL,'Lettonie',1),(134,'LB',NULL,'Liban',1),(135,'LS',NULL,'Lesotho',1),(136,'LR',NULL,'Liberia',1),(137,'LY',NULL,'Libye',1),(138,'LI',NULL,'Liechtenstein',1),(139,'LT',NULL,'Lituanie',1),(140,'LU',NULL,'Luxembourg',1),(141,'MO',NULL,'Macao',1),(142,'MK',NULL,'ex-République yougoslave de Macédoine',1),(143,'MG',NULL,'Madagascar',1),(144,'MW',NULL,'Malawi',1),(145,'MY',NULL,'Malaisie',1),(146,'MV',NULL,'Maldives',1),(147,'ML',NULL,'Mali',1),(148,'MT',NULL,'Malte',1),(149,'MH',NULL,'Iles Marshall',1),(150,'MQ',NULL,'Martinique',1),(151,'MR',NULL,'Mauritanie',1),(152,'MU',NULL,'Maurice',1),(153,'YT',NULL,'Mayotte',1),(154,'MX',NULL,'Mexique',1),(155,'FM',NULL,'Micronésie',1),(156,'MD',NULL,'Moldavie',1),(157,'MN',NULL,'Mongolie',1),(158,'MS',NULL,'Monserrat',1),(159,'MZ',NULL,'Mozambique',1),(160,'MM',NULL,'Birmanie (Myanmar)',1),(161,'NA',NULL,'Namibie',1),(162,'NR',NULL,'Nauru',1),(163,'NP',NULL,'Népal',1),(164,'AN',NULL,'Antilles néerlandaises',1),(165,'NC',NULL,'Nouvelle-Calédonie',1),(166,'NZ',NULL,'Nouvelle-Zélande',1),(167,'NI',NULL,'Nicaragua',1),(168,'NE',NULL,'Niger',1),(169,'NG',NULL,'Nigeria',1),(170,'NU',NULL,'Nioué',1),(171,'NF',NULL,'Ile Norfolk',1),(172,'MP',NULL,'Mariannes du Nord',1),(173,'NO',NULL,'Norvège',1),(174,'OM',NULL,'Oman',1),(175,'PK',NULL,'Pakistan',1),(176,'PW',NULL,'Palaos',1),(177,'PS',NULL,'territoire Palestinien Occupé',1),(178,'PA',NULL,'Panama',1),(179,'PG',NULL,'Papouasie-Nouvelle-Guinée',1),(180,'PY',NULL,'Paraguay',1),(181,'PE',NULL,'Pérou',1),(182,'PH',NULL,'Philippines',1),(183,'PN',NULL,'Iles Pitcairn',1),(184,'PL',NULL,'Pologne',1),(185,'PR',NULL,'Porto Rico',1),(186,'QA',NULL,'Qatar',1),(187,'RE',NULL,'Réunion',1),(188,'RO',NULL,'Roumanie',1),(189,'RW',NULL,'Rwanda',1),(190,'SH',NULL,'Sainte-Hélène',1),(191,'KN',NULL,'Saint-Christophe-et-Niévès',1),(192,'LC',NULL,'Sainte-Lucie',1),(193,'PM',NULL,'Saint-Pierre-et-Miquelon',1),(194,'VC',NULL,'Saint-Vincent-et-les-Grenadines',1),(195,'WS',NULL,'Samoa',1),(196,'SM',NULL,'Saint-Marin',1),(197,'ST',NULL,'Sao Tomé-et-Principe',1),(198,'RS',NULL,'Serbie',1),(199,'SC',NULL,'Seychelles',1),(200,'SL',NULL,'Sierra Leone',1),(201,'SK',NULL,'Slovaquie',1),(202,'SI',NULL,'Slovénie',1),(203,'SB',NULL,'Iles Salomon',1),(204,'SO',NULL,'Somalie',1),(205,'ZA',NULL,'Afrique du Sud',1),(206,'GS',NULL,'Iles Géorgie du Sud et Sandwich du Sud',1),(207,'LK',NULL,'Sri Lanka',1),(208,'SD',NULL,'Soudan',1),(209,'SR',NULL,'Suriname',1),(210,'SJ',NULL,'Iles Svalbard et Jan Mayen',1),(211,'SZ',NULL,'Swaziland',1),(212,'SY',NULL,'Syrie',1),(213,'TW',NULL,'Taïwan',1),(214,'TJ',NULL,'Tadjikistan',1),(215,'TZ',NULL,'Tanzanie',1),(216,'TH',NULL,'Thaïlande',1),(217,'TL',NULL,'Timor Oriental',1),(218,'TK',NULL,'Tokélaou',1),(219,'TO',NULL,'Tonga',1),(220,'TT',NULL,'Trinité-et-Tobago',1),(221,'TR',NULL,'Turquie',1),(222,'TM',NULL,'Turkménistan',1),(223,'TC',NULL,'Iles Turks-et-Caicos',1),(224,'TV',NULL,'Tuvalu',1),(225,'UG',NULL,'Ouganda',1),(226,'UA',NULL,'Ukraine',1),(227,'AE',NULL,'Émirats arabes unis',1),(228,'UM',NULL,'Iles mineures éloignées des États-Unis',1),(229,'UY',NULL,'Uruguay',1),(230,'UZ',NULL,'Ouzbékistan',1),(231,'VU',NULL,'Vanuatu',1),(232,'VE',NULL,'Vénézuela',1),(233,'VN',NULL,'Viêt Nam',1),(234,'VG',NULL,'Iles Vierges britanniques',1),(235,'VI',NULL,'Iles Vierges américaines',1),(236,'WF',NULL,'Wallis-et-Futuna',1),(237,'EH',NULL,'Sahara occidental',1),(238,'YE',NULL,'Yémen',1),(239,'ZM',NULL,'Zambie',1),(240,'ZW',NULL,'Zimbabwe',1),(241,'GG',NULL,'Guernesey',1),(242,'IM',NULL,'Ile de Man',1),(243,'JE',NULL,'Jersey',1),(244,'ME',NULL,'Monténégro',1),(245,'BL',NULL,'Saint-Barthélemy',1),(246,'MF',NULL,'Saint-Martin',1); +/*!40000 ALTER TABLE `llx_c_pays` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_propalst` +-- + +DROP TABLE IF EXISTS `llx_c_propalst`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_propalst` ( + `id` smallint(6) NOT NULL, + `code` varchar(12) NOT NULL, + `label` varchar(30) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_propalst` +-- + +LOCK TABLES `llx_c_propalst` WRITE; +/*!40000 ALTER TABLE `llx_c_propalst` DISABLE KEYS */; +INSERT INTO `llx_c_propalst` (`id`, `code`, `label`, `active`) VALUES (0,'PR_DRAFT','Brouillon',1),(1,'PR_OPEN','Ouverte',1),(2,'PR_SIGNED','Signée',1),(3,'PR_NOTSIGNED','Non Signée',1),(4,'PR_FAC','Facturée',1); +/*!40000 ALTER TABLE `llx_c_propalst` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_prospectlevel` +-- + +DROP TABLE IF EXISTS `llx_c_prospectlevel`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_prospectlevel` ( + `code` varchar(12) NOT NULL, + `label` varchar(30) DEFAULT NULL, + `sortorder` smallint(6) DEFAULT NULL, + `active` smallint(6) NOT NULL DEFAULT '1', + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_prospectlevel` +-- + +LOCK TABLES `llx_c_prospectlevel` WRITE; +/*!40000 ALTER TABLE `llx_c_prospectlevel` DISABLE KEYS */; +INSERT INTO `llx_c_prospectlevel` (`code`, `label`, `sortorder`, `active`, `module`) VALUES ('PL_HIGH','High',4,1,NULL),('PL_LOW','Low',2,1,NULL),('PL_MEDIUM','Medium',3,1,NULL),('PL_NONE','None',1,1,NULL); +/*!40000 ALTER TABLE `llx_c_prospectlevel` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_regions` +-- + +DROP TABLE IF EXISTS `llx_c_regions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_regions` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code_region` int(11) NOT NULL, + `fk_pays` int(11) NOT NULL, + `cheflieu` varchar(50) DEFAULT NULL, + `tncc` int(11) DEFAULT NULL, + `nom` varchar(50) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`), + UNIQUE KEY `code_region` (`code_region`), + KEY `idx_c_regions_fk_pays` (`fk_pays`), + CONSTRAINT `fk_c_regions_fk_pays` FOREIGN KEY (`fk_pays`) REFERENCES `llx_c_pays` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=23210 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_regions` +-- + +LOCK TABLES `llx_c_regions` WRITE; +/*!40000 ALTER TABLE `llx_c_regions` DISABLE KEYS */; +INSERT INTO `llx_c_regions` (`rowid`, `code_region`, `fk_pays`, `cheflieu`, `tncc`, `nom`, `active`) VALUES (1,0,0,'0',0,'-',1),(101,1,1,'97105',3,'Guadeloupe',1),(102,2,1,'97209',3,'Martinique',1),(103,3,1,'97302',3,'Guyane',1),(104,4,1,'97411',3,'Réunion',1),(105,11,1,'75056',1,'Île-de-France',1),(106,21,1,'51108',0,'Champagne-Ardenne',1),(107,22,1,'80021',0,'Picardie',1),(108,23,1,'76540',0,'Haute-Normandie',1),(109,24,1,'45234',2,'Centre',1),(110,25,1,'14118',0,'Basse-Normandie',1),(111,26,1,'21231',0,'Bourgogne',1),(112,31,1,'59350',2,'Nord-Pas-de-Calais',1),(113,41,1,'57463',0,'Lorraine',1),(114,42,1,'67482',1,'Alsace',1),(115,43,1,'25056',0,'Franche-Comté',1),(116,52,1,'44109',4,'Pays de la Loire',1),(117,53,1,'35238',0,'Bretagne',1),(118,54,1,'86194',2,'Poitou-Charentes',1),(119,72,1,'33063',1,'Aquitaine',1),(120,73,1,'31555',0,'Midi-Pyrénées',1),(121,74,1,'87085',2,'Limousin',1),(122,82,1,'69123',2,'Rhône-Alpes',1),(123,83,1,'63113',1,'Auvergne',1),(124,91,1,'34172',2,'Languedoc-Roussillon',1),(125,93,1,'13055',0,'Provence-Alpes-Côte d\'Azur',1),(126,94,1,'2A004',0,'Corse',1),(201,201,2,'',1,'Flandre',1),(202,202,2,'',2,'Wallonie',1),(203,203,2,'',3,'Bruxelles-Capitale',1),(301,301,3,NULL,1,'Abruzzo',1),(302,302,3,NULL,1,'Basilicata',1),(303,303,3,NULL,1,'Calabria',1),(304,304,3,NULL,1,'Campania',1),(305,305,3,NULL,1,'Emilia-Romagna',1),(306,306,3,NULL,1,'Friuli-Venezia Giulia',1),(307,307,3,NULL,1,'Lazio',1),(308,308,3,NULL,1,'Liguria',1),(309,309,3,NULL,1,'Lombardia',1),(310,310,3,NULL,1,'Marche',1),(311,311,3,NULL,1,'Molise',1),(312,312,3,NULL,1,'Piemonte',1),(313,313,3,NULL,1,'Puglia',1),(314,314,3,NULL,1,'Sardegna',1),(315,315,3,NULL,1,'Sicilia',1),(316,316,3,NULL,1,'Toscana',1),(317,317,3,NULL,1,'Trentino-Alto Adige',1),(318,318,3,NULL,1,'Umbria',1),(319,319,3,NULL,1,'Valle d Aosta',1),(320,320,3,NULL,1,'Veneto',1),(401,401,4,'',0,'Andalucia',1),(402,402,4,'',0,'Aragón',1),(403,403,4,'',0,'Castilla y León',1),(404,404,4,'',0,'Castilla la Mancha',1),(405,405,4,'',0,'Canarias',1),(406,406,4,'',0,'Cataluña',1),(407,407,4,'',0,'Comunidad de Ceuta',1),(408,408,4,'',0,'Comunidad Foral de Navarra',1),(409,409,4,'',0,'Comunidad de Melilla',1),(410,410,4,'',0,'Cantabria',1),(411,411,4,'',0,'Comunidad Valenciana',1),(412,412,4,'',0,'Extemadura',1),(413,413,4,'',0,'Galicia',1),(414,414,4,'',0,'Islas Baleares',1),(415,415,4,'',0,'La Rioja',1),(416,416,4,'',0,'Comunidad de Madrid',1),(417,417,4,'',0,'Región de Murcia',1),(418,418,4,'',0,'Principado de Asturias',1),(419,419,4,'',0,'Pais Vasco',1),(420,420,4,'',0,'Otros',1),(601,601,6,'',1,'Cantons',1),(1001,1001,10,'',0,'Ariana',1),(1002,1002,10,'',0,'Béja',1),(1003,1003,10,'',0,'Ben Arous',1),(1004,1004,10,'',0,'Bizerte',1),(1005,1005,10,'',0,'Gabès',1),(1006,1006,10,'',0,'Gafsa',1),(1007,1007,10,'',0,'Jendouba',1),(1008,1008,10,'',0,'Kairouan',1),(1009,1009,10,'',0,'Kasserine',1),(1010,1010,10,'',0,'Kébili',1),(1011,1011,10,'',0,'La Manouba',1),(1012,1012,10,'',0,'Le Kef',1),(1013,1013,10,'',0,'Mahdia',1),(1014,1014,10,'',0,'Médenine',1),(1015,1015,10,'',0,'Monastir',1),(1016,1016,10,'',0,'Nabeul',1),(1017,1017,10,'',0,'Sfax',1),(1018,1018,10,'',0,'Sidi Bouzid',1),(1019,1019,10,'',0,'Siliana',1),(1020,1020,10,'',0,'Sousse',1),(1021,1021,10,'',0,'Tataouine',1),(1022,1022,10,'',0,'Tozeur',1),(1023,1023,10,'',0,'Tunis',1),(1024,1024,10,'',0,'Zaghouan',1),(1101,1101,11,'',0,'United-States',1),(2301,2301,23,'',0,'Norte',1),(2302,2302,23,'',0,'Litoral',1),(2303,2303,23,'',0,'Cuyana',1),(2304,2304,23,'',0,'Central',1),(2305,2305,23,'',0,'Patagonia',1),(2801,2801,28,'',0,'Australia',1),(4601,4601,46,'',0,'Barbados',1),(6701,6701,67,NULL,NULL,'Tarapacá',1),(6702,6702,67,NULL,NULL,'Antofagasta',1),(6703,6703,67,NULL,NULL,'Atacama',1),(6704,6704,67,NULL,NULL,'Coquimbo',1),(6705,6705,67,NULL,NULL,'Valparaíso',1),(6706,6706,67,NULL,NULL,'General Bernardo O Higgins',1),(6707,6707,67,NULL,NULL,'Maule',1),(6708,6708,67,NULL,NULL,'Biobío',1),(6709,6709,67,NULL,NULL,'Raucanía',1),(6710,6710,67,NULL,NULL,'Los Lagos',1),(6711,6711,67,NULL,NULL,'Aysén General Carlos Ibáñez del Campo',1),(6712,6712,67,NULL,NULL,'Magallanes y Antártica Chilena',1),(6713,6713,67,NULL,NULL,'Santiago',1),(6714,6714,67,NULL,NULL,'Los Ríos',1),(6715,6715,67,NULL,NULL,'Arica y Parinacota',1),(7001,7001,70,'',0,'Colombie',1),(8601,8601,86,NULL,NULL,'Central',1),(8602,8602,86,NULL,NULL,'Oriental',1),(8603,8603,86,NULL,NULL,'Occidental',1),(11401,11401,114,'',0,'Honduras',1),(11701,11701,117,'',0,'India',1),(15201,15201,152,'',0,'Rivière Noire',1),(15202,15202,152,'',0,'Flacq',1),(15203,15203,152,'',0,'Grand Port',1),(15204,15204,152,'',0,'Moka',1),(15205,15205,152,'',0,'Pamplemousses',1),(15206,15206,152,'',0,'Plaines Wilhems',1),(15207,15207,152,'',0,'Port-Louis',1),(15208,15208,152,'',0,'Rivière du Rempart',1),(15209,15209,152,'',0,'Savanne',1),(15210,15210,152,'',0,'Rodrigues',1),(15211,15211,152,'',0,'Les îles Agaléga',1),(15212,15212,152,'',0,'Les écueils des Cargados Carajos',1),(15401,15401,154,'',0,'Mexique',1),(23201,23201,232,'',0,'Los Andes',1),(23202,23202,232,'',0,'Capital',1),(23203,23203,232,'',0,'Central',1),(23204,23204,232,'',0,'Cento Occidental',1),(23205,23205,232,'',0,'Guayana',1),(23206,23206,232,'',0,'Insular',1),(23207,23207,232,'',0,'Los Llanos',1),(23208,23208,232,'',0,'Nor-Oriental',1),(23209,23209,232,'',0,'Zuliana',1); +/*!40000 ALTER TABLE `llx_c_regions` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_shipment_mode` +-- + +DROP TABLE IF EXISTS `llx_c_shipment_mode`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_shipment_mode` ( + `rowid` int(11) NOT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `code` varchar(30) NOT NULL, + `libelle` varchar(50) NOT NULL, + `description` text, + `active` tinyint(4) DEFAULT '0', + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_shipment_mode` +-- + +LOCK TABLES `llx_c_shipment_mode` WRITE; +/*!40000 ALTER TABLE `llx_c_shipment_mode` DISABLE KEYS */; +INSERT INTO `llx_c_shipment_mode` (`rowid`, `tms`, `code`, `libelle`, `description`, `active`, `module`) VALUES (1,'2010-10-09 23:43:16','CATCH','Catch','Catch by client',1,NULL),(2,'2010-10-09 23:43:16','TRANS','Transporter','Generic transporter',1,NULL),(3,'2010-10-09 23:43:16','COLSUI','Colissimo Suivi','Colissimo Suivi',0,NULL),(4,'2011-07-18 17:28:27','LETTREMAX','Lettre Max','Courrier Suivi et Lettre Max',0,NULL); +/*!40000 ALTER TABLE `llx_c_shipment_mode` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_source` +-- + +DROP TABLE IF EXISTS `llx_c_source`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_source` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(30) NOT NULL, + `label` varchar(60) NOT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_source` +-- + +LOCK TABLES `llx_c_source` WRITE; +/*!40000 ALTER TABLE `llx_c_source` DISABLE KEYS */; +INSERT INTO `llx_c_source` (`rowid`, `code`, `label`, `active`) VALUES (1,'SRC_00','Proposition commerciale',1),(2,'SRC_01','Internet',1),(3,'SRC_02','Campagne courrier',1),(4,'SRC_03','Campagne téléphone',1),(5,'SRC_04','Campagne fax',1),(6,'SRC_05','Commercial',1),(7,'SRC_06','Magasin',1); +/*!40000 ALTER TABLE `llx_c_source` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_stcomm` +-- + +DROP TABLE IF EXISTS `llx_c_stcomm`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_stcomm` ( + `id` int(11) NOT NULL, + `code` varchar(12) NOT NULL, + `libelle` varchar(30) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_stcomm` +-- + +LOCK TABLES `llx_c_stcomm` WRITE; +/*!40000 ALTER TABLE `llx_c_stcomm` DISABLE KEYS */; +INSERT INTO `llx_c_stcomm` (`id`, `code`, `libelle`, `active`) VALUES (-1,'ST_NO','Ne pas contacter',1),(0,'ST_NEVER','Jamais contacté',1),(1,'ST_TODO','A contacter',1),(2,'ST_PEND','Contact en cours',1),(3,'ST_DONE','Contactée',1); +/*!40000 ALTER TABLE `llx_c_stcomm` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_tva` +-- + +DROP TABLE IF EXISTS `llx_c_tva`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_tva` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_pays` int(11) NOT NULL, + `taux` double NOT NULL, + `localtax1` double NOT NULL DEFAULT '0', + `localtax2` double NOT NULL DEFAULT '0', + `recuperableonly` int(11) NOT NULL DEFAULT '0', + `note` varchar(128) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + `accountancy_code` varchar(15) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2462 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_tva` +-- + +LOCK TABLES `llx_c_tva` WRITE; +/*!40000 ALTER TABLE `llx_c_tva` DISABLE KEYS */; +INSERT INTO `llx_c_tva` (`rowid`, `fk_pays`, `taux`, `localtax1`, `localtax2`, `recuperableonly`, `note`, `active`, `accountancy_code`) VALUES (11,1,19.6,0,0,0,'VAT standard rate (France hors DOM-TOM)',1,NULL),(12,1,8.5,0,0,0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL),(13,1,8.5,0,0,1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL),(14,1,5.5,0,0,0,'VAT reduced rate (France hors DOM-TOM)',1,NULL),(15,1,0,0,0,0,'VAT Rate 0 ou non applicable',1,NULL),(16,1,2.1,0,0,0,'VAT super-reduced rate',1,NULL),(21,2,21,0,0,0,'VAT standard rate',1,NULL),(22,2,6,0,0,0,'VAT reduced rate',1,NULL),(23,2,0,0,0,0,'VAT Rate 0 ou non applicable',1,NULL),(24,2,12,0,0,0,'VAT reduced rate',1,NULL),(31,3,20,0,0,0,'VAT standard rate',1,NULL),(32,3,10,0,0,0,'VAT reduced rate',1,NULL),(33,3,4,0,0,0,'VAT super-reduced rate',1,NULL),(34,3,0,0,0,0,'VAT Rate 0',1,NULL),(41,4,18,4,0,0,'VAT standard rate',1,NULL),(42,4,8,1,0,0,'VAT reduced rate',1,NULL),(43,4,4,0.5,0,0,'VAT super-reduced rate',1,NULL),(44,4,0,0,0,0,'VAT Rate 0',1,NULL),(51,5,19,0,0,0,'VAT standard rate',1,NULL),(52,5,7,0,0,0,'VAT reduced rate',1,NULL),(53,5,0,0,0,0,'VAT Rate 0',1,NULL),(61,6,7.6,0,0,0,'VAT standard rate',1,NULL),(62,6,3.6,0,0,0,'VAT reduced rate',1,NULL),(63,6,2.4,0,0,0,'VAT super-reduced rate',1,NULL),(64,6,0,0,0,0,'VAT Rate 0',1,NULL),(71,7,20,0,0,0,'VAT standard rate',1,NULL),(72,7,17.5,0,0,0,'VAT standard rate before 2011',1,NULL),(73,7,5,0,0,0,'VAT reduced rate',1,NULL),(74,7,0,0,0,0,'VAT Rate 0',1,NULL),(91,9,17,0,0,0,'VAT standard rate',1,NULL),(92,9,13,0,0,0,'VAT reduced rate 0',1,NULL),(93,9,3,0,0,0,'VAT super reduced rate 0',1,NULL),(94,9,0,0,0,0,'VAT Rate 0',1,NULL),(101,10,6,0,0,0,'VAT 6%',1,NULL),(102,10,12,0,0,0,'VAT 12%',1,NULL),(103,10,18,0,0,0,'VAT 18%',1,NULL),(104,10,7.5,0,0,0,'VAT 6% Majoré à 25% (7.5%)',1,NULL),(105,10,15,0,0,0,'VAT 12% Majoré à 25% (15%)',1,NULL),(106,10,22.5,0,0,0,'VAT 18% Majoré à 25% (22.5%)',1,NULL),(107,10,0,0,0,0,'VAT Rate 0',1,NULL),(111,11,0,0,0,0,'No Sales Tax',1,NULL),(112,11,4,0,0,0,'Sales Tax 4%',1,NULL),(113,11,6,0,0,0,'Sales Tax 6%',1,NULL),(121,12,20,0,0,0,'VAT standard rate',1,NULL),(122,12,14,0,0,0,'VAT reduced rate',1,NULL),(123,12,10,0,0,0,'VAT reduced rate',1,NULL),(124,12,7,0,0,0,'VAT super-reduced rate',1,NULL),(125,12,0,0,0,0,'VAT Rate 0',1,NULL),(141,14,7,0,0,0,'VAT standard rate',1,NULL),(142,14,0,0,0,0,'VAT Rate 0',1,NULL),(171,17,19,0,0,0,'VAT standard rate',1,NULL),(172,17,6,0,0,0,'VAT reduced rate',1,NULL),(173,17,0,0,0,0,'VAT Rate 0',1,NULL),(201,20,25,0,0,0,'VAT standard rate',1,NULL),(202,20,12,0,0,0,'VAT reduced rate',1,NULL),(203,20,6,0,0,0,'VAT super-reduced rate',1,NULL),(204,20,0,0,0,0,'VAT Rate 0',1,NULL),(231,23,21,0,0,0,'IVA standard rate',1,NULL),(232,23,10.5,0,0,0,'IVA reduced rate',1,NULL),(233,23,0,0,0,0,'IVA Rate 0',1,NULL),(251,25,20,0,0,0,'VAT standard rate',1,NULL),(252,25,12,0,0,0,'VAT reduced rate',1,NULL),(253,25,0,0,0,0,'VAT Rate 0',1,NULL),(254,25,5,0,0,0,'VAT reduced rate',1,NULL),(281,28,10,0,0,0,'VAT standard rate',1,NULL),(282,28,0,0,0,0,'VAT Rate 0',1,NULL),(411,41,20,0,0,0,'VAT standard rate',1,NULL),(412,41,10,0,0,0,'VAT reduced rate',1,NULL),(413,41,0,0,0,0,'VAT Rate 0',1,NULL),(461,46,0,0,0,0,'No VAT',1,NULL),(462,46,15,0,0,0,'VAT 15%',1,NULL),(463,46,7.5,0,0,0,'VAT 7.5%',1,NULL),(591,59,20,0,0,0,'VAT standard rate',1,NULL),(592,59,7,0,0,0,'VAT reduced rate',1,NULL),(593,59,0,0,0,0,'VAT Rate 0',1,NULL),(671,67,19,0,0,0,'VAT standard rate',1,NULL),(672,67,0,0,0,0,'VAT Rate 0',1,NULL),(801,80,25,0,0,0,'VAT standard rate',1,NULL),(802,80,0,0,0,0,'VAT Rate 0',1,NULL),(861,86,13,0,0,0,'IVA 13',1,NULL),(862,86,0,0,0,0,'SIN IVA',1,NULL),(1141,114,0,0,0,0,'No ISV',1,NULL),(1142,114,12,0,0,0,'ISV 12%',1,NULL),(1161,116,25.5,0,0,0,'VAT standard rate',1,NULL),(1162,116,7,0,0,0,'VAT reduced rate',1,NULL),(1163,116,0,0,0,0,'VAT rate 0',1,NULL),(1171,117,12.5,0,0,0,'VAT standard rate',1,NULL),(1172,117,4,0,0,0,'VAT reduced rate',1,NULL),(1173,117,1,0,0,0,'VAT super-reduced rate',1,NULL),(1174,117,0,0,0,0,'VAT Rate 0',1,NULL),(1231,123,0,0,0,0,'VAT Rate 0',1,NULL),(1232,123,5,0,0,0,'VAT Rate 5',1,NULL),(1401,140,15,0,0,0,'VAT standard rate',1,NULL),(1402,140,12,0,0,0,'VAT reduced rate',1,NULL),(1403,140,6,0,0,0,'VAT reduced rate',1,NULL),(1404,140,3,0,0,0,'VAT super-reduced rate',1,NULL),(1405,140,0,0,0,0,'VAT Rate 0',1,NULL),(1521,152,0,0,0,0,'VAT Rate 0',1,NULL),(1522,152,15,0,0,0,'VAT Rate 15',1,NULL),(1541,154,0,0,0,0,'No VAT',1,NULL),(1542,154,16,0,0,0,'VAT 16%',1,NULL),(1543,154,10,0,0,0,'VAT Frontero',1,NULL),(1662,166,15,0,0,0,'VAT standard rate',1,NULL),(1663,166,0,0,0,0,'VAT Rate 0',1,NULL),(1731,173,25,0,0,0,'VAT standard rate',1,NULL),(1732,173,14,0,0,0,'VAT reduced rate',1,NULL),(1733,173,8,0,0,0,'VAT reduced rate',1,NULL),(1734,173,0,0,0,0,'VAT Rate 0',1,NULL),(1841,184,20,0,0,0,'VAT standard rate',1,NULL),(1842,184,7,0,0,0,'VAT reduced rate',1,NULL),(1843,184,3,0,0,0,'VAT reduced rate',1,NULL),(1844,184,0,0,0,0,'VAT Rate 0',1,NULL),(1881,188,24,0,0,0,'VAT standard rate',1,NULL),(1882,188,9,0,0,0,'VAT reduced rate',1,NULL),(1883,188,0,0,0,0,'VAT Rate 0',1,NULL),(1884,188,5,0,0,0,'VAT reduced rate',1,NULL),(1931,193,0,0,0,0,'No VAT in SPM',1,NULL),(2011,201,19,0,0,0,'VAT standard rate',1,NULL),(2012,201,10,0,0,0,'VAT reduced rate',1,NULL),(2013,201,0,0,0,0,'VAT Rate 0',1,NULL),(2021,202,20,0,0,0,'VAT standard rate',1,NULL),(2022,202,8.5,0,0,0,'VAT reduced rate',1,NULL),(2023,202,0,0,0,0,'VAT Rate 0',1,NULL),(2321,232,0,0,0,0,'No VAT',1,NULL),(2322,232,12,0,0,0,'VAT 12%',1,NULL),(2323,232,8,0,0,0,'VAT 8%',1,NULL),(2461,246,0,0,0,0,'VAT Rate 0',1,NULL); +/*!40000 ALTER TABLE `llx_c_tva` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_type_contact` +-- + +DROP TABLE IF EXISTS `llx_c_type_contact`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_type_contact` ( + `rowid` int(11) NOT NULL, + `element` varchar(30) NOT NULL, + `source` varchar(8) NOT NULL DEFAULT 'external', + `code` varchar(16) NOT NULL, + `libelle` varchar(64) NOT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_c_type_contact_uk` (`element`,`source`,`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_type_contact` +-- + +LOCK TABLES `llx_c_type_contact` WRITE; +/*!40000 ALTER TABLE `llx_c_type_contact` DISABLE KEYS */; +INSERT INTO `llx_c_type_contact` (`rowid`, `element`, `source`, `code`, `libelle`, `active`, `module`) VALUES (10,'contrat','internal','SALESREPSIGN','Commercial signataire du contrat',1,NULL),(11,'contrat','internal','SALESREPFOLL','Commercial suivi du contrat',1,NULL),(20,'contrat','external','BILLING','Contact client facturation contrat',1,NULL),(21,'contrat','external','CUSTOMER','Contact client suivi contrat',1,NULL),(22,'contrat','external','SALESREPSIGN','Contact client signataire contrat',1,NULL),(31,'propal','internal','SALESREPFOLL','Commercial à l\'origine de la propale',1,NULL),(40,'propal','external','BILLING','Contact client facturation propale',1,NULL),(41,'propal','external','CUSTOMER','Contact client suivi propale',1,NULL),(50,'facture','internal','SALESREPFOLL','Responsable suivi du paiement',1,NULL),(60,'facture','external','BILLING','Contact client facturation',1,NULL),(61,'facture','external','SHIPPING','Contact client livraison',1,NULL),(62,'facture','external','SERVICE','Contact client prestation',1,NULL),(70,'invoice_supplier','internal','SALESREPFOLL','Responsable suivi du paiement',1,NULL),(71,'invoice_supplier','external','BILLING','Contact fournisseur facturation',1,NULL),(72,'invoice_supplier','external','SHIPPING','Contact fournisseur livraison',1,NULL),(73,'invoice_supplier','external','SERVICE','Contact fournisseur prestation',1,NULL),(91,'commande','internal','SALESREPFOLL','Responsable suivi de la commande',1,NULL),(100,'commande','external','BILLING','Contact client facturation commande',1,NULL),(101,'commande','external','CUSTOMER','Contact client suivi commande',1,NULL),(102,'commande','external','SHIPPING','Contact client livraison commande',1,NULL),(120,'fichinter','internal','INTERREPFOLL','Responsable suivi de l\'intervention',1,NULL),(121,'fichinter','internal','INTERVENING','Intervenant',1,NULL),(130,'fichinter','external','BILLING','Contact client facturation intervention',1,NULL),(131,'fichinter','external','CUSTOMER','Contact client suivi de l\'intervention',1,NULL),(140,'order_supplier','internal','SALESREPFOLL','Responsable suivi de la commande',1,NULL),(141,'order_supplier','internal','SHIPPING','Responsable réception de la commande',1,NULL),(142,'order_supplier','external','BILLING','Contact fournisseur facturation commande',1,NULL),(143,'order_supplier','external','CUSTOMER','Contact fournisseur suivi commande',1,NULL),(145,'order_supplier','external','SHIPPING','Contact fournisseur livraison commande',1,NULL),(160,'project','internal','PROJECTLEADER','Chef de Projet',1,NULL),(161,'project','internal','CONTRIBUTOR','Intervenant',1,NULL),(170,'project','external','PROJECTLEADER','Chef de Projet',1,NULL),(171,'project','external','CONTRIBUTOR','Intervenant',1,NULL),(180,'project_task','internal','TASKEXECUTIVE','Responsable',1,NULL),(181,'project_task','internal','CONTRIBUTOR','Intervenant',1,NULL),(190,'project_task','external','TASKEXECUTIVE','Responsable',1,NULL),(191,'project_task','external','CONTRIBUTOR','Intervenant',1,NULL),(200,'societe','external','GENERALREF','Généraliste (référent)',0,'cabinetmed'),(201,'societe','external','GENERALISTE','Généraliste',0,'cabinetmed'),(210,'societe','external','SPECCHIROR','Chirurgien ortho',0,'cabinetmed'),(211,'societe','external','SPECCHIROT','Chirurgien autre',0,'cabinetmed'),(220,'societe','external','SPECDERMA','Dermatologue',0,'cabinetmed'),(225,'societe','external','SPECENDOC','Endocrinologue',0,'cabinetmed'),(230,'societe','external','SPECGYNECO','Gynécologue',0,'cabinetmed'),(240,'societe','external','SPECGASTRO','Gastroantérologue',0,'cabinetmed'),(245,'societe','external','SPECINTERNE','Interniste',0,'cabinetmed'),(250,'societe','external','SPECCARDIO','Cardiologue',0,'cabinetmed'),(260,'societe','external','SPECNEPHRO','Néphrologue',0,'cabinetmed'),(263,'societe','external','SPECPNEUMO','Pneumologue',0,'cabinetmed'),(265,'societe','external','SPECNEURO','Neurologue',0,'cabinetmed'),(270,'societe','external','SPECRHUMATO','Rhumatologue',0,'cabinetmed'),(280,'societe','external','KINE','Kinésithérapeute',0,'cabinetmed'); +/*!40000 ALTER TABLE `llx_c_type_contact` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_type_fees` +-- + +DROP TABLE IF EXISTS `llx_c_type_fees`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_type_fees` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(12) NOT NULL, + `libelle` varchar(30) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_type_fees` +-- + +LOCK TABLES `llx_c_type_fees` WRITE; +/*!40000 ALTER TABLE `llx_c_type_fees` DISABLE KEYS */; +INSERT INTO `llx_c_type_fees` (`id`, `code`, `libelle`, `active`, `module`) VALUES (1,'TF_OTHER','Other',1,NULL),(2,'TF_TRIP','Trip',1,NULL),(3,'TF_LUNCH','Lunch',1,NULL); +/*!40000 ALTER TABLE `llx_c_type_fees` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_typent` +-- + +DROP TABLE IF EXISTS `llx_c_typent`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_typent` ( + `id` int(11) NOT NULL, + `code` varchar(12) NOT NULL, + `libelle` varchar(30) DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + `module` varchar(32) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_typent` +-- + +LOCK TABLES `llx_c_typent` WRITE; +/*!40000 ALTER TABLE `llx_c_typent` DISABLE KEYS */; +INSERT INTO `llx_c_typent` (`id`, `code`, `libelle`, `active`, `module`) VALUES (0,'TE_UNKNOWN','-',1,NULL),(1,'TE_STARTUP','Start-up',0,NULL),(2,'TE_GROUP','Grand groupe',1,NULL),(3,'TE_MEDIUM','PME/PMI',1,NULL),(4,'TE_SMALL','TPE',1,NULL),(5,'TE_ADMIN','Administration',1,NULL),(6,'TE_WHOLE','Grossiste',0,NULL),(7,'TE_RETAIL','Revendeur',0,NULL),(8,'TE_PRIVATE','Particulier',1,NULL),(100,'TE_OTHER','Autres',1,NULL),(101,'TE_HOMME','Homme',0,'cabinetmed'),(102,'TE_FEMME','Femme',0,'cabinetmed'); +/*!40000 ALTER TABLE `llx_c_typent` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_c_ziptown` +-- + +DROP TABLE IF EXISTS `llx_c_ziptown`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_ziptown` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(5) DEFAULT NULL, + `fk_county` int(11) DEFAULT NULL, + `fk_pays` int(11) NOT NULL DEFAULT '0', + `zip` varchar(10) NOT NULL, + `town` varchar(255) NOT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_ziptown_fk_pays` (`zip`,`town`,`fk_pays`), + KEY `idx_c_ziptown_fk_county` (`fk_county`), + KEY `idx_c_ziptown_fk_pays` (`fk_pays`), + KEY `idx_c_ziptown_zip` (`zip`), + CONSTRAINT `fk_c_ziptown_fk_county` FOREIGN KEY (`fk_county`) REFERENCES `llx_c_departements` (`rowid`), + CONSTRAINT `fk_c_ziptown_fk_pays` FOREIGN KEY (`fk_pays`) REFERENCES `llx_c_pays` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_ziptown` +-- + +LOCK TABLES `llx_c_ziptown` WRITE; +/*!40000 ALTER TABLE `llx_c_ziptown` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_c_ziptown` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_cabinetmed_c_banques` +-- + +DROP TABLE IF EXISTS `llx_cabinetmed_c_banques`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_cabinetmed_c_banques` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(8) NOT NULL, + `label` varchar(64) NOT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_cabinetmed_c_banques` +-- + +LOCK TABLES `llx_cabinetmed_c_banques` WRITE; +/*!40000 ALTER TABLE `llx_cabinetmed_c_banques` DISABLE KEYS */; +INSERT INTO `llx_cabinetmed_c_banques` (`rowid`, `code`, `label`, `active`) VALUES (1,'HSBC','HSBC',1); +/*!40000 ALTER TABLE `llx_cabinetmed_c_banques` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_cabinetmed_c_examconclusion` +-- + +DROP TABLE IF EXISTS `llx_cabinetmed_c_examconclusion`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_cabinetmed_c_examconclusion` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(8) NOT NULL, + `label` varchar(64) NOT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_cabinetmed_c_examconclusion` +-- + +LOCK TABLES `llx_cabinetmed_c_examconclusion` WRITE; +/*!40000 ALTER TABLE `llx_cabinetmed_c_examconclusion` DISABLE KEYS */; +INSERT INTO `llx_cabinetmed_c_examconclusion` (`rowid`, `code`, `label`, `active`) VALUES (1,'AUTRE','Autre',1); +/*!40000 ALTER TABLE `llx_cabinetmed_c_examconclusion` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_cabinetmed_cons` +-- + +DROP TABLE IF EXISTS `llx_cabinetmed_cons`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_cabinetmed_cons` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_soc` int(11) DEFAULT NULL, + `fk_user_creation` int(11) NOT NULL, + `datecons` date NOT NULL, + `typepriseencharge` varchar(8) DEFAULT NULL, + `motifconsprinc` varchar(64) DEFAULT NULL, + `diaglesprinc` varchar(64) DEFAULT NULL, + `motifconssec` text, + `diaglessec` text, + `hdm` text, + `examenclinique` text, + `examenprescrit` text, + `traitementprescrit` text, + `comment` text, + `typevisit` varchar(8) NOT NULL, + `infiltration` varchar(256) DEFAULT NULL, + `codageccam` varchar(16) DEFAULT NULL, + `montant_cheque` double(24,8) DEFAULT NULL, + `montant_espece` double(24,8) DEFAULT NULL, + `montant_carte` double(24,8) DEFAULT NULL, + `montant_tiers` double(24,8) DEFAULT NULL, + `banque` varchar(128) DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rowid`), + KEY `idx_cabinetmed_cons_fk_soc` (`fk_soc`), + KEY `idx_cabinetmed_cons_datecons` (`datecons`), + CONSTRAINT `fk_cabinetmed_cons_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_cabinetmed_cons` +-- + +LOCK TABLES `llx_cabinetmed_cons` WRITE; +/*!40000 ALTER TABLE `llx_cabinetmed_cons` DISABLE KEYS */; +INSERT INTO `llx_cabinetmed_cons` (`rowid`, `fk_soc`, `fk_user_creation`, `datecons`, `typepriseencharge`, `motifconsprinc`, `diaglesprinc`, `motifconssec`, `diaglessec`, `hdm`, `examenclinique`, `examenprescrit`, `traitementprescrit`, `comment`, `typevisit`, `infiltration`, `codageccam`, `montant_cheque`, `montant_espece`, `montant_carte`, `montant_tiers`, `banque`, `tms`) VALUES (2,2,1,'2011-04-17',NULL,'Cervicalgies Inflammatoires','Arthrite Microcristalline','','','','rrrr','','','','CS','','',NULL,55.00000000,NULL,NULL,'','2011-05-25 13:59:03'),(3,2,1,'2011-05-01',NULL,'Cervicalgies Mécaniques','Arthrite Goutteuse','yyyykk\r\nDorsalgie\r\nDorsalgies Inflammatoires\r\nDouleur Chevillep\r\nDouleur Genou\r\nDouleur Genou','','lll','','','','','CS','','',NULL,NULL,NULL,50.00000000,'','2011-05-25 13:59:03'),(4,4,1,'2011-05-02',NULL,'Autre','Arthrite Goutteuse','','','','','','','','CCAM','inf','ccam',50.00000000,NULL,NULL,NULL,'HSBC','2011-05-25 13:59:03'),(5,5,1,'2011-05-02',NULL,'Cervicalgies Inflammatoires','Arthrite Microcristalline','','dgdfg','','','','','','CCAM','ingg','pp',50.00000000,NULL,NULL,NULL,'HSBC','2011-05-28 15:22:22'),(6,5,1,'2011-05-02',NULL,'Cervicalgies Inflammatoires','Arthrose FémoroPatellaire','','','','','','kk','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-05-25 13:59:03'),(7,4,1,'2011-05-03',NULL,'Cervicalgies Mécaniques','Arthrite Goutteuse','Douleur Cheville','Arthrite Microcristalline','fd','fd','Bilan Phosphocalcique','fdf','fdfd','CCAM','lllll','kkk',NULL,NULL,NULL,0.00000000,'','2011-06-14 23:13:42'),(8,5,1,'2011-05-03',NULL,'Cervicalgies Mécaniques','gggg','','','pppljklj','','','','','CS','kmlkmlkml mlmlkmkm mk ml mlk','',50.00000000,NULL,NULL,NULL,'HSBC','2011-05-28 15:00:27'),(10,3,1,'2011-05-07',NULL,'dfgdf','gfdgd','','','','','','','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-05-25 13:59:03'),(11,9,1,'2011-05-25',NULL,'Dérobement Membres Inférieurs','Arthrite Goutteuse','Dorsalgie\r\nDorsalgies Mécaniques','Lomboradiculalgie Discale\r\nLombosciatique L5 gauche','','','ArthroScanner Genou\r\nIRM Genou\r\nIRM Rachis Lombaire','1\r\n2\r\n3\r\n4\r\n5\r\n6','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-05-28 15:58:29'),(12,32,1,'2011-06-08',NULL,'Cervicalgies Inflammatoires','Arthrite Goutteuse','','','','','','','','CS','','',NULL,NULL,NULL,50.00000000,'','2011-06-08 14:38:10'),(13,26,1,'2011-06-13',NULL,'Cervicalgies Mécaniques','Arthrite Microcristalline','','','','','ArthroScanner Hanche','Traitement prescrit.','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-06-13 15:25:39'),(14,26,1,'2011-06-13',NULL,'Douleur Membre inférieur Gauche','Lombosciatique L5 gauche','','Lombalgie Discale','','','','AINS (biprohénide), murolaxan\r\ndoliprane\r\n+ rééduction','','CCAM','infiltr épidurale','AHLB001',90.00000000,NULL,NULL,NULL,'HSBC','2011-06-13 16:16:43'),(15,1,1,'2011-06-13',NULL,'Cervicalgies Mécaniques','Arthrite Microcristalline','','','','','','','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-06-13 18:07:26'),(16,36,1,'2011-06-15',NULL,'gdfgfd','gdfgdfgdf','','','','','ArthroScanner Epaule','','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-06-15 00:28:43'),(17,36,1,'2011-06-15',NULL,'hfghfg','hgfhfghf','','','','','','','','CS','','',NULL,10.00000000,NULL,NULL,'','2011-06-15 00:31:57'),(18,65,1,'2011-07-06',NULL,'Cervicalgies Inflammatoires','aaaaa','','','','','','','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-07-06 20:17:20'),(19,67,1,'2011-07-11',NULL,'Cervicalgies Inflammatoires','Canal Carpien','','','','','','','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-07-10 21:23:30'),(20,68,1,'2011-07-13',NULL,'Cervicalgies Mécaniques','Autre','','','','','','','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-07-13 16:26:21'),(21,68,1,'2011-07-13',NULL,'aaaa','bbbb','','','','','','','','CS','','',NULL,NULL,50.00000000,NULL,'','2011-07-13 18:18:29'),(22,68,1,'2011-07-13',NULL,'lll','llll','','','','','','','','CS','','',NULL,NULL,10.00000000,NULL,'','2011-07-13 18:21:57'),(23,68,1,'2011-07-13',NULL,'oo','oo','','','','','','','','CS','','',NULL,NULL,NULL,5.00000000,'','2011-07-13 18:26:18'); +/*!40000 ALTER TABLE `llx_cabinetmed_cons` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_cabinetmed_diaglec` +-- + +DROP TABLE IF EXISTS `llx_cabinetmed_diaglec`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_cabinetmed_diaglec` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(8) NOT NULL, + `label` varchar(64) NOT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_cabinetmed_diaglec` +-- + +LOCK TABLES `llx_cabinetmed_diaglec` WRITE; +/*!40000 ALTER TABLE `llx_cabinetmed_diaglec` DISABLE KEYS */; +INSERT INTO `llx_cabinetmed_diaglec` (`rowid`, `code`, `label`, `active`) VALUES (1,'AUTRE','Autre',1),(2,'LOMBL5D','Lombosciatique L5 droite',1),(3,'LOMBL5G','Lombosciatique L5 gauche',1),(4,'LOMBS1D','Lombosciatique S1 droite',1),(5,'LOMBS1G','Lombosciatique S1 gauche',1),(6,'NCB','Névralgie cervico-brachiale',1),(7,'PR','Polyarthrite rhumatoide',1),(8,'SA','Spondylarthrite ankylosante',1),(9,'GFTI','Gonarthrose fémoro-tibaile interne',1),(10,'GFTE','Gonarthrose fémoro-tibiale externe',1),(11,'COX','Coxarthrose',1),(12,'CC','Canal Carpien',1),(16,'CLER','Canal Lombaire Etroit et/ou Rétréci',1),(22,'RH PSO','Rhumatisme Psoriasique',1),(23,'LEAD','Lupus',1),(24,'LBDISC','Lombalgie Discale',1),(25,'LBRADD','Lomboradiculalgie Discale',1),(26,'LBRADND','Lomboradiculalgie Non Discale',1),(27,'CH ROT','Chondropathie Rotulienne',1),(28,'AFP','Arthrose FémoroPatellaire',1),(29,'PPR','Pseudo Polyarthrite Rhizomélique',1),(30,'SHARP','Maladie de Sharp',1),(31,'SAPHO','SAPHO',1),(32,'OMARTHC','Omarthrose Centrée',1),(33,'RH CCA','Rhumatisme Chondro Calcinosique',1),(34,'GOUTTE','Arthrite Goutteuse',1),(35,'CCA','Arthrite Chondro Calcinosique',1),(36,'ARTH MCR','Arthrite Microcristalline',1),(37,'CSA','Conflit Sous Acromial',1),(38,'TDCALCE','Tendinopathie Calcifiante d\'Epaule',1),(39,'TDCALCH','Tendinopathie Calcifiante de Hanche',1),(40,'TBT','TendinoBursite Trochantérienne',1),(41,'OMARTHE','Omarthrose Excentrée',1); +/*!40000 ALTER TABLE `llx_cabinetmed_diaglec` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_cabinetmed_examaut` +-- + +DROP TABLE IF EXISTS `llx_cabinetmed_examaut`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_cabinetmed_examaut` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_soc` int(11) DEFAULT NULL, + `dateexam` date NOT NULL, + `examprinc` varchar(64) DEFAULT NULL, + `examsec` text, + `concprinc` varchar(64) DEFAULT NULL, + `concsec` text, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_cabinetmed_examaut` +-- + +LOCK TABLES `llx_cabinetmed_examaut` WRITE; +/*!40000 ALTER TABLE `llx_cabinetmed_examaut` DISABLE KEYS */; +INSERT INTO `llx_cabinetmed_examaut` (`rowid`, `fk_soc`, `dateexam`, `examprinc`, `examsec`, `concprinc`, `concsec`, `tms`) VALUES (1,2,'2011-05-08','ArthroScanner Genou','ArthroScanner EpauleeeeArthroScanner HancheIRM EpauleggggBilan Radio ScolioseuuuuqqqqlIRM Rachis Cervical','Autre','','2011-05-01 14:47:57'),(2,2,'2011-05-02','dd','ArthroScanner Hanche\r\nBilan Radio Scoliose\r\neeee\r\nElectromiogramme','dd','','2011-05-01 23:49:59'),(3,32,'2011-06-08','ArthroScanner Genou','gdfgdfgdfgdfgdfgdfgd','Autre','','2011-06-08 14:54:45'),(4,32,'2011-06-08','IRM SacroIliaques','','fsdfsdfsdfsd','','2011-06-08 14:57:01'),(5,26,'2011-06-13','Bilan Radio Rhumatisme Inflammatoire','','Autre','','2011-06-13 15:27:39'),(6,26,'2011-06-13','ArthroScanner Genou','Autre','Autre','','2011-06-13 15:29:31'),(7,26,'2011-06-13','Scanner Lombaire','','Hernie discale L4-L5 gauche','','2011-06-13 16:20:47'),(8,65,'2011-07-06','ArthroScanner Hanche','','Autre','','2011-07-06 20:17:54'); +/*!40000 ALTER TABLE `llx_cabinetmed_examaut` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_cabinetmed_exambio` +-- + +DROP TABLE IF EXISTS `llx_cabinetmed_exambio`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_cabinetmed_exambio` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_soc` int(11) DEFAULT NULL, + `dateexam` date NOT NULL, + `resultat` text, + `conclusion` text, + `comment` text, + `suivipr_ad` int(11) DEFAULT NULL, + `suivipr_ag` int(11) DEFAULT NULL, + `suivipr_vs` int(11) DEFAULT NULL, + `suivipr_eva` int(11) DEFAULT NULL, + `suivipr_err` int(11) DEFAULT NULL, + `suivisa_fat` int(11) DEFAULT NULL, + `suivisa_dax` int(11) DEFAULT NULL, + `suivisa_dpe` int(11) DEFAULT NULL, + `suivisa_dpa` int(11) DEFAULT NULL, + `suivisa_rno` int(11) DEFAULT NULL, + `suivisa_dma` int(11) DEFAULT NULL, + `suivisa_basdai` double DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `suivisa_das28` double DEFAULT NULL, + `suivipr_das28` double DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_cabinetmed_exambio` +-- + +LOCK TABLES `llx_cabinetmed_exambio` WRITE; +/*!40000 ALTER TABLE `llx_cabinetmed_exambio` DISABLE KEYS */; +INSERT INTO `llx_cabinetmed_exambio` (`rowid`, `fk_soc`, `dateexam`, `resultat`, `conclusion`, `comment`, `suivipr_ad`, `suivipr_ag`, `suivipr_vs`, `suivipr_eva`, `suivipr_err`, `suivisa_fat`, `suivisa_dax`, `suivisa_dpe`, `suivisa_dpa`, `suivisa_rno`, `suivisa_dma`, `suivisa_basdai`, `tms`, `suivisa_das28`, `suivipr_das28`) VALUES (1,2,'2011-05-01','aaajhkh','bbb','ccc',NULL,NULL,NULL,NULL,NULL,1,2,3,4,5,6,NULL,'2011-05-01 14:45:54',NULL,NULL),(3,2,'2011-05-01','dd','hfghfg','',1,2,6,9,NULL,2,2,2,2,2,2,NULL,'2011-05-01 15:24:06',NULL,NULL),(4,2,'2011-05-01','gdfgdf','1111','',NULL,NULL,NULL,NULL,NULL,1,7,8,9,10,11,NULL,'2011-05-01 15:25:17',NULL,NULL),(5,2,'2011-05-01','fdsfsdfsdfsd','ccccc','fsdfsdfs',1,2,4,3,NULL,1,2,3,4,5,6,NULL,'2011-05-01 16:37:51',NULL,NULL),(6,2,'2011-05-01','gfdgdfgdf','gdfgdf','',5,NULL,NULL,NULL,NULL,1,NULL,1,1,NULL,NULL,NULL,'2011-05-01 16:43:49',NULL,NULL),(8,1,'2011-05-01','lkjljkl','','',1,2,4,3,NULL,5,10,5,6,5,5,6.2,'2011-05-01 16:46:00',NULL,1.97),(9,32,'2011-06-08','retert','trete','',1,2,4,1,NULL,2,5,2,5,4,6,NULL,'2011-06-08 14:47:30',NULL,NULL),(10,32,'2011-06-08','fgdfgdfg','gfgdfgdf','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-06-08 14:54:23',NULL,NULL),(11,26,'2011-06-13','result bio 1','conclusion bio 1','',1,2,4,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-06-13 15:27:15',NULL,NULL),(12,26,'2011-06-13','result bio 2','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-06-13 15:27:25',NULL,NULL),(13,26,'2011-06-13','VS8\r\nCRP inférieur ) 5','Pas de syndrome inflammatoire.','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-06-13 16:19:08',NULL,NULL),(14,26,'2011-06-13','','','',NULL,NULL,NULL,NULL,NULL,1,2,2,4,5,6,NULL,'2011-06-13 16:19:38',NULL,NULL),(15,26,'2011-06-13','','','',1,2,4,3,NULL,1,2,3,4,5,6,0.31,'2011-06-13 17:50:25',NULL,1.97),(16,36,'2011-06-15','gdfgddfhghghhfghf','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-06-15 08:02:03',NULL,NULL),(17,65,'2011-07-06','hfghfghgf','Zob','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-07-06 20:17:33',NULL,NULL),(18,67,'2011-07-11','gfdg','gfdg','gfd',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-07-10 22:23:21',NULL,NULL),(19,62,'2011-07-13','dfgdf','gdfd','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-07-13 15:56:27',NULL,NULL); +/*!40000 ALTER TABLE `llx_cabinetmed_exambio` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_cabinetmed_examenprescrit` +-- + +DROP TABLE IF EXISTS `llx_cabinetmed_examenprescrit`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_cabinetmed_examenprescrit` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(8) NOT NULL, + `label` varchar(64) NOT NULL, + `biorad` varchar(8) NOT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_cabinetmed_examenprescrit` +-- + +LOCK TABLES `llx_cabinetmed_examenprescrit` WRITE; +/*!40000 ALTER TABLE `llx_cabinetmed_examenprescrit` DISABLE KEYS */; +INSERT INTO `llx_cabinetmed_examenprescrit` (`rowid`, `code`, `label`, `biorad`, `active`) VALUES (1,'AUTRE','Autre','AUTRE',1),(2,'IRMLOMB','IRM lombaire','RADIO',1),(5,'TDMLOMB','TDM lombaires','RADIO',1),(6,'RX BRL','Radios Bassin-Rachis Lombaire','RADIO',1),(7,'RX RL','Radios Rachis Lombaire','RADIO',1),(8,'RX BASS','Radios Bassin','RADIO',1),(9,'RX BH','Radios Bassin et Hanches','RADIO',1),(10,'RX GEN','Radios Genoux','RADIO',1),(11,'RX CHEV','Radios Chevilles','RADIO',1),(12,'RX AVPD','Radios Avants-Pieds','RADIO',1),(13,'RX EP','Radio Epaule','RADIO',1),(14,'RX MAINS','Radios Mains','RADIO',1),(15,'RX COUDE','Radios Coude','RADIO',1),(16,'RX RC','Radios Rachis Cervical','RADIO',1),(17,'RX RD','Radios Rachis Dorsal','RADIO',1),(18,'RX RCD','Radios Rachis CervicoDorsal','RADIO',1),(19,'RX RDL','Radios DorsoLombaire','RADIO',1),(20,'RX SCO','Bilan Radio Scoliose','RADIO',1),(21,'RX RIC','Bilan Radio Rhumatisme Inflammatoire','RADIO',1),(22,'TDM LOMB','Scanner Lombaire','RADIO',1),(23,'TDM DORS','Scanner Dorsal','RADIO',1),(24,'TDM CERV','Scanner Cervical','RADIO',1),(25,'TDM HANC','Scanner Hanche','RADIO',1),(26,'TDM GEN','Scanner Genou','RADIO',1),(27,'RX RDL','Radios Rachis DorsoLombaire','RADIO',1),(28,'ARTTDMG','ArthroScanner Genou','RADIO',1),(29,'ARTTDME','ArthroScanner Epaule','RADIO',1),(30,'ARTTDMH','ArthroScanner Hanche','RADIO',1),(31,'IRM GEN','IRM Genou','RADIO',1),(32,'IRM HANC','IRM Hanche','RADIO',1),(33,'IRM EP','IRM Epaule','RADIO',1),(34,'IRM SIL','IRM SacroIliaques','RADIO',1),(35,'IRM RL','IRM Rachis Lombaire','RADIO',1),(36,'IRM RD','IRM Rachis Dorsal','RADIO',1),(37,'IRM RC','IRM Rachis Cervical','RADIO',1),(38,'ELECMI','Electromiogramme','RADIO',1),(39,'NFS','NFS','BIO',1),(40,'BILPHO','Bilan Phosphocalcique','BIO',1),(41,'VSCRP','VS/CRP','BIO',1),(42,'EPP','Electrophorèse Protéine Plasmatique','BIO',1); +/*!40000 ALTER TABLE `llx_cabinetmed_examenprescrit` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_cabinetmed_motifcons` +-- + +DROP TABLE IF EXISTS `llx_cabinetmed_motifcons`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_cabinetmed_motifcons` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(8) NOT NULL, + `label` varchar(64) NOT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_cabinetmed_motifcons` +-- + +LOCK TABLES `llx_cabinetmed_motifcons` WRITE; +/*!40000 ALTER TABLE `llx_cabinetmed_motifcons` DISABLE KEYS */; +INSERT INTO `llx_cabinetmed_motifcons` (`rowid`, `code`, `label`, `active`) VALUES (5,'AUTRE','Autre',1),(6,'DORS','Dorsalgie',1),(7,'DOLMSD','Douleur Membre supérieur Droit',1),(8,'DOLMSG','Douleur Membre supérieur Gauche',1),(9,'DOLMID','Douleur Membre inférieur Droit',1),(10,'DOLMIG','Douleur Membre inférieur Gauche',1),(11,'PARESM','Paresthésie des mains',1),(12,'DOLEPG','Douleur épaule gauche',1),(13,'DOLEPD','Douleur épaule droite',1),(14,'GONAD','Gonaglie droite',1),(15,'GONAG','Gonalgie gauche',1),(16,'DOLPD','Douleur Pied Droit',1),(17,'DOUL MIN','Douleur Membre Inférieur',1),(18,'POLYAR','Polyarthralgie',1),(19,'SUIVIPR','Suivi PR',1),(20,'SUIVISPA','Suivi SPA',1),(21,'SUIVIRIC','Suivi RI',1),(22,'SUIVIPPR','Suivi PPR',1),(23,'DOLINGD','Douleur inguinale Droit',1),(24,'DOLINGG','Douleur inguinale Gauche',1),(25,'DOLCOUDD','Douleur coude Droit',1),(26,'DOLCOUDG','Douleur coude Gauche',1),(27,'TALAL','Talalgie',1),(28,'DOLTENDC','Douleur tandous Calcanien',1),(29,'DEROB','Dérobement Membres Inférieurs',1),(30,'LOMB MEC','Lombalgies Mécaniques',1),(31,'LOMB INF','Lombalgies Inflammatoires',1),(32,'DORS MEC','Dorsalgies Mécaniques',1),(33,'DORS INF','Dorsalgies Inflammatoires',1),(34,'CERV MEC','Cervicalgies Mécaniques',1),(35,'SCIAT','LomboSciatique ',1),(36,'CRUR','LomboCruralgie',1),(37,'DOUL SUP','Douleur Membre Supérieur',1),(38,'INGUINAL','Inguinalgie',1),(39,'CERV INF','Cervicalgies Inflammatoires',1),(40,'DOUL EP','Douleur Epaule',1),(41,'DOUL POI','Douleur Poignet',1),(42,'DOUL GEN','Douleur Genou',1),(43,'DOUL COU','Douleur Coude',1),(44,'DOUL HAN','Douleur Hanche',1),(45,'PAR MBRS','Paresthésies Membres Inférieurs',1),(46,'PAR MBRI','Paresthésies Membres Supérieurs',1),(47,'TR RACHI','Traumatisme Rachis',1),(48,'TR MBRS','Traumatisme Membres Supérieurs',1),(49,'TR MBRI','Traumatisme Membres Inférieurs',1),(50,'FAT MBRI','Fatiguabilité Membres Inférieurs',1),(51,'DOUL CHE','Douleur Cheville',1),(52,'DOUL PD','Douleur Pied',1),(53,'DOUL MA','Douleur Main',1); +/*!40000 ALTER TABLE `llx_cabinetmed_motifcons` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_cabinetmed_patient` +-- + +DROP TABLE IF EXISTS `llx_cabinetmed_patient`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_cabinetmed_patient` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `note_antemed` text, + `note_antechirgen` text, + `note_antechirortho` text, + `note_anterhum` text, + `note_other` text, + `note_traitclass` text, + `note_traitallergie` text, + `note_traitintol` text, + `note_traitspec` text, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_cabinetmed_patient` +-- + +LOCK TABLES `llx_cabinetmed_patient` WRITE; +/*!40000 ALTER TABLE `llx_cabinetmed_patient` DISABLE KEYS */; +INSERT INTO `llx_cabinetmed_patient` (`rowid`, `note_antemed`, `note_antechirgen`, `note_antechirortho`, `note_anterhum`, `note_other`, `note_traitclass`, `note_traitallergie`, `note_traitintol`, `note_traitspec`) VALUES (2,'fffgfgfgf','','','','jjj','aaaagggggggg','','',''),(5,'a','b','c','d','','','','i','u'),(8,NULL,NULL,NULL,NULL,NULL,'','','','tre tre terter
\r\nt
\r\nter tert'),(26,NULL,NULL,NULL,NULL,NULL,'','','intol','spec pharma'),(46,'hfhf','dddd','','hfghfg','',NULL,'',NULL,NULL); +/*!40000 ALTER TABLE `llx_cabinetmed_patient` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_categorie` +-- + +DROP TABLE IF EXISTS `llx_categorie`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_categorie` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `label` varchar(255) DEFAULT NULL, + `type` tinyint(4) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT '1', + `description` text, + `fk_soc` int(11) DEFAULT NULL, + `visible` tinyint(4) NOT NULL DEFAULT '1', + `import_key` varchar(14) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_categorie_ref` (`label`,`type`,`entity`), + KEY `idx_categorie_type` (`type`) +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_categorie` +-- + +LOCK TABLES `llx_categorie` WRITE; +/*!40000 ALTER TABLE `llx_categorie` DISABLE KEYS */; +INSERT INTO `llx_categorie` (`rowid`, `label`, `type`, `entity`, `description`, `fk_soc`, `visible`, `import_key`) VALUES (1,'MySupplierCategory',1,1,'This is description of category MyCategory for suppliers
',NULL,0,NULL),(2,'MyCategory',2,1,'This is description of MyCategory for customer and prospects
',NULL,0,NULL),(3,'Hot products',0,1,'This is description of hot products
',NULL,0,NULL),(4,'Cold products',0,1,'This is a description of cold products
',NULL,0,NULL),(5,'Sub category hot',0,1,'
',NULL,0,NULL),(6,'New products',0,1,'
',NULL,0,NULL),(7,'Homme',3,1,'
',NULL,0,NULL),(8,'Femme',3,1,'
',NULL,0,NULL),(9,'Forfait moyen',1,1,'
',NULL,0,NULL),(10,'XL Cutomers',2,1,'
',NULL,0,NULL),(11,'Forfait black',1,1,'',NULL,0,NULL); +/*!40000 ALTER TABLE `llx_categorie` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_categorie_association` +-- + +DROP TABLE IF EXISTS `llx_categorie_association`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_categorie_association` ( + `fk_categorie_mere` int(11) NOT NULL, + `fk_categorie_fille` int(11) NOT NULL, + UNIQUE KEY `uk_categorie_association` (`fk_categorie_mere`,`fk_categorie_fille`), + UNIQUE KEY `uk_categorie_association_fk_categorie_fille` (`fk_categorie_fille`), + CONSTRAINT `fk_categorie_asso_fk_categorie_fille` FOREIGN KEY (`fk_categorie_fille`) REFERENCES `llx_categorie` (`rowid`), + CONSTRAINT `fk_categorie_asso_fk_categorie_mere` FOREIGN KEY (`fk_categorie_mere`) REFERENCES `llx_categorie` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_categorie_association` +-- + +LOCK TABLES `llx_categorie_association` WRITE; +/*!40000 ALTER TABLE `llx_categorie_association` DISABLE KEYS */; +INSERT INTO `llx_categorie_association` (`fk_categorie_mere`, `fk_categorie_fille`) VALUES (3,5),(9,11); +/*!40000 ALTER TABLE `llx_categorie_association` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_categorie_fournisseur` +-- + +DROP TABLE IF EXISTS `llx_categorie_fournisseur`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_categorie_fournisseur` ( + `fk_categorie` int(11) NOT NULL, + `fk_societe` int(11) NOT NULL, + PRIMARY KEY (`fk_categorie`,`fk_societe`), + KEY `idx_categorie_fournisseur_fk_categorie` (`fk_categorie`), + KEY `idx_categorie_fournisseur_fk_societe` (`fk_societe`), + CONSTRAINT `fk_categorie_fournisseur_fk_soc` FOREIGN KEY (`fk_societe`) REFERENCES `llx_societe` (`rowid`), + CONSTRAINT `fk_categorie_fournisseur_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_categorie_fournisseur` +-- + +LOCK TABLES `llx_categorie_fournisseur` WRITE; +/*!40000 ALTER TABLE `llx_categorie_fournisseur` DISABLE KEYS */; +INSERT INTO `llx_categorie_fournisseur` (`fk_categorie`, `fk_societe`) VALUES (1,2),(9,2); +/*!40000 ALTER TABLE `llx_categorie_fournisseur` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_categorie_member` +-- + +DROP TABLE IF EXISTS `llx_categorie_member`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_categorie_member` ( + `fk_categorie` int(11) NOT NULL, + `fk_member` int(11) NOT NULL, + PRIMARY KEY (`fk_categorie`,`fk_member`), + KEY `idx_categorie_member_fk_categorie` (`fk_categorie`), + KEY `idx_categorie_member_fk_member` (`fk_member`), + CONSTRAINT `fk_categorie_member_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), + CONSTRAINT `fk_categorie_member_member_rowid` FOREIGN KEY (`fk_member`) REFERENCES `llx_adherent` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_categorie_member` +-- + +LOCK TABLES `llx_categorie_member` WRITE; +/*!40000 ALTER TABLE `llx_categorie_member` DISABLE KEYS */; +INSERT INTO `llx_categorie_member` (`fk_categorie`, `fk_member`) VALUES (7,2),(8,1); +/*!40000 ALTER TABLE `llx_categorie_member` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_categorie_product` +-- + +DROP TABLE IF EXISTS `llx_categorie_product`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_categorie_product` ( + `fk_categorie` int(11) NOT NULL, + `fk_product` int(11) NOT NULL, + PRIMARY KEY (`fk_categorie`,`fk_product`), + KEY `idx_categorie_product_fk_categorie` (`fk_categorie`), + KEY `idx_categorie_product_fk_product` (`fk_product`), + CONSTRAINT `fk_categorie_product_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), + CONSTRAINT `fk_categorie_product_product_rowid` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_categorie_product` +-- + +LOCK TABLES `llx_categorie_product` WRITE; +/*!40000 ALTER TABLE `llx_categorie_product` DISABLE KEYS */; +INSERT INTO `llx_categorie_product` (`fk_categorie`, `fk_product`) VALUES (5,1),(5,2),(5,3),(6,2),(6,3); +/*!40000 ALTER TABLE `llx_categorie_product` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_categorie_societe` +-- + +DROP TABLE IF EXISTS `llx_categorie_societe`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_categorie_societe` ( + `fk_categorie` int(11) NOT NULL, + `fk_societe` int(11) NOT NULL, + PRIMARY KEY (`fk_categorie`,`fk_societe`), + KEY `idx_categorie_societe_fk_categorie` (`fk_categorie`), + KEY `idx_categorie_societe_fk_societe` (`fk_societe`), + CONSTRAINT `fk_categorie_societe_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), + CONSTRAINT `fk_categorie_societe_fk_soc` FOREIGN KEY (`fk_societe`) REFERENCES `llx_societe` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_categorie_societe` +-- + +LOCK TABLES `llx_categorie_societe` WRITE; +/*!40000 ALTER TABLE `llx_categorie_societe` DISABLE KEYS */; +INSERT INTO `llx_categorie_societe` (`fk_categorie`, `fk_societe`) VALUES (2,2),(10,4); +/*!40000 ALTER TABLE `llx_categorie_societe` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_chargesociales` +-- + +DROP TABLE IF EXISTS `llx_chargesociales`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_chargesociales` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `date_ech` datetime NOT NULL, + `libelle` varchar(80) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `fk_type` int(11) NOT NULL, + `amount` double NOT NULL DEFAULT '0', + `paye` smallint(6) NOT NULL DEFAULT '0', + `periode` date DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `date_creation` datetime DEFAULT NULL, + `date_valid` datetime DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_chargesociales` +-- + +LOCK TABLES `llx_chargesociales` WRITE; +/*!40000 ALTER TABLE `llx_chargesociales` DISABLE KEYS */; +INSERT INTO `llx_chargesociales` (`rowid`, `date_ech`, `libelle`, `entity`, `fk_type`, `amount`, `paye`, `periode`, `tms`, `date_creation`, `date_valid`) VALUES (4,'2011-08-09 00:00:00','fff',1,60,10,1,'2011-08-01','2012-04-11 10:04:14',NULL,NULL); +/*!40000 ALTER TABLE `llx_chargesociales` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_commande` +-- + +DROP TABLE IF EXISTS `llx_commande`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_commande` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_soc` int(11) NOT NULL, + `fk_projet` int(11) DEFAULT NULL, + `ref` varchar(30) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `ref_ext` varchar(255) DEFAULT NULL, + `ref_int` varchar(255) DEFAULT NULL, + `ref_client` varchar(255) DEFAULT NULL, + `date_creation` datetime DEFAULT NULL, + `date_valid` datetime DEFAULT NULL, + `date_cloture` datetime DEFAULT NULL, + `date_commande` date DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `fk_user_cloture` int(11) DEFAULT NULL, + `source` smallint(6) DEFAULT NULL, + `fk_statut` smallint(6) DEFAULT '0', + `amount_ht` double DEFAULT '0', + `remise_percent` double DEFAULT '0', + `remise_absolue` double DEFAULT '0', + `remise` double DEFAULT '0', + `tva` double(24,8) DEFAULT '0.00000000', + `localtax1` double(24,8) DEFAULT '0.00000000', + `localtax2` double(24,8) DEFAULT '0.00000000', + `total_ht` double(24,8) DEFAULT '0.00000000', + `total_ttc` double(24,8) DEFAULT '0.00000000', + `note` text, + `note_public` text, + `model_pdf` varchar(255) DEFAULT NULL, + `facture` tinyint(4) DEFAULT '0', + `fk_account` int(11) DEFAULT NULL, + `fk_currency` varchar(2) DEFAULT NULL, + `fk_cond_reglement` int(11) DEFAULT NULL, + `fk_mode_reglement` int(11) DEFAULT NULL, + `date_livraison` date DEFAULT NULL, + `fk_availability` int(11) DEFAULT NULL, + `fk_demand_reason` int(11) DEFAULT NULL, + `fk_adresse_livraison` int(11) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_commande_ref` (`ref`,`entity`), + KEY `idx_commande_fk_soc` (`fk_soc`), + KEY `idx_commande_fk_user_author` (`fk_user_author`), + KEY `idx_commande_fk_user_valid` (`fk_user_valid`), + KEY `idx_commande_fk_user_cloture` (`fk_user_cloture`), + KEY `idx_commande_fk_projet` (`fk_projet`), + KEY `idx_commande_fk_account` (`fk_account`), + KEY `idx_commande_fk_currency` (`fk_currency`), + CONSTRAINT `fk_commande_fk_currency` FOREIGN KEY (`fk_currency`) REFERENCES `llx_c_currencies` (`code_iso`), + CONSTRAINT `fk_commande_fk_projet` FOREIGN KEY (`fk_projet`) REFERENCES `llx_projet` (`rowid`), + CONSTRAINT `fk_commande_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), + CONSTRAINT `fk_commande_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), + CONSTRAINT `fk_commande_fk_user_cloture` FOREIGN KEY (`fk_user_cloture`) REFERENCES `llx_user` (`rowid`), + CONSTRAINT `fk_commande_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_commande` +-- + +LOCK TABLES `llx_commande` WRITE; +/*!40000 ALTER TABLE `llx_commande` DISABLE KEYS */; +INSERT INTO `llx_commande` (`rowid`, `tms`, `fk_soc`, `fk_projet`, `ref`, `entity`, `ref_ext`, `ref_int`, `ref_client`, `date_creation`, `date_valid`, `date_cloture`, `date_commande`, `fk_user_author`, `fk_user_valid`, `fk_user_cloture`, `source`, `fk_statut`, `amount_ht`, `remise_percent`, `remise_absolue`, `remise`, `tva`, `localtax1`, `localtax2`, `total_ht`, `total_ttc`, `note`, `note_public`, `model_pdf`, `facture`, `fk_account`, `fk_currency`, `fk_cond_reglement`, `fk_mode_reglement`, `date_livraison`, `fk_availability`, `fk_demand_reason`, `fk_adresse_livraison`, `import_key`, `extraparams`) VALUES (1,'2012-04-11 10:03:49',1,NULL,'CO1107-0002',1,NULL,NULL,'','2011-07-20 15:23:12','2011-08-08 13:59:09',NULL,'2011-07-20',1,1,NULL,NULL,1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','',0,NULL,NULL,1,1,NULL,0,NULL,NULL,NULL,NULL),(2,'2012-04-11 10:03:49',1,NULL,'(PROV2)',1,NULL,NULL,'','2011-07-20 23:20:12',NULL,NULL,'2011-07-21',1,NULL,NULL,NULL,0,0,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL),(3,'2012-04-11 10:03:49',1,NULL,'(PROV3)',1,NULL,NULL,'','2011-07-20 23:22:53',NULL,NULL,'2011-07-21',1,NULL,NULL,NULL,0,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'2012-04-11 10:03:49',1,NULL,'CO1108-0001',1,NULL,NULL,'','2011-08-08 03:04:11','2011-08-08 03:04:21',NULL,'2011-08-08',1,1,NULL,NULL,2,0,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `llx_commande` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_commande_fournisseur` +-- + +DROP TABLE IF EXISTS `llx_commande_fournisseur`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_commande_fournisseur` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_soc` int(11) NOT NULL, + `ref` varchar(30) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `ref_ext` varchar(30) DEFAULT NULL, + `ref_supplier` varchar(30) DEFAULT NULL, + `fk_projet` int(11) DEFAULT '0', + `date_creation` datetime DEFAULT NULL, + `date_valid` datetime DEFAULT NULL, + `date_cloture` datetime DEFAULT NULL, + `date_commande` date DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `fk_user_cloture` int(11) DEFAULT NULL, + `source` smallint(6) NOT NULL, + `fk_statut` smallint(6) DEFAULT '0', + `amount_ht` double DEFAULT '0', + `remise_percent` double DEFAULT '0', + `remise` double DEFAULT '0', + `tva` double(24,8) DEFAULT '0.00000000', + `localtax1` double(24,8) DEFAULT '0.00000000', + `localtax2` double(24,8) DEFAULT '0.00000000', + `total_ht` double(24,8) DEFAULT '0.00000000', + `total_ttc` double(24,8) DEFAULT '0.00000000', + `note` text, + `note_public` text, + `model_pdf` varchar(255) DEFAULT NULL, + `fk_methode_commande` int(11) DEFAULT '0', + `fk_cond_reglement` int(11) DEFAULT '0', + `fk_mode_reglement` int(11) DEFAULT '0', + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_commande_fournisseur_ref` (`ref`,`fk_soc`,`entity`), + KEY `idx_commande_fournisseur_fk_soc` (`fk_soc`), + CONSTRAINT `fk_commande_fournisseur_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_commande_fournisseur` +-- + +LOCK TABLES `llx_commande_fournisseur` WRITE; +/*!40000 ALTER TABLE `llx_commande_fournisseur` DISABLE KEYS */; +INSERT INTO `llx_commande_fournisseur` (`rowid`, `tms`, `fk_soc`, `ref`, `entity`, `ref_ext`, `ref_supplier`, `fk_projet`, `date_creation`, `date_valid`, `date_cloture`, `date_commande`, `fk_user_author`, `fk_user_valid`, `fk_user_cloture`, `source`, `fk_statut`, `amount_ht`, `remise_percent`, `remise`, `tva`, `localtax1`, `localtax2`, `total_ht`, `total_ttc`, `note`, `note_public`, `model_pdf`, `fk_methode_commande`, `fk_cond_reglement`, `fk_mode_reglement`, `import_key`, `extraparams`) VALUES (1,'2012-04-11 10:03:49',13,'CF1007-0001',1,NULL,NULL,NULL,'2010-07-11 17:13:40','2010-07-11 17:15:42',NULL,'2010-07-11',1,1,NULL,0,5,0,0,0,39.20000000,0.00000000,0.00000000,200.00000000,239.20000000,NULL,NULL,'muscadet',2,0,0,NULL,NULL),(2,'2012-04-11 10:03:49',1,'CF1007-0002',1,NULL,NULL,NULL,'2010-07-11 18:46:28','2010-07-11 18:47:33',NULL,'2010-07-11',1,1,NULL,0,3,0,0,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,NULL,NULL,'muscadet',4,0,0,NULL,NULL),(3,'2012-04-11 10:03:49',17,'(PROV3)',1,NULL,NULL,NULL,'2011-08-04 23:00:52',NULL,NULL,NULL,1,NULL,NULL,0,0,0,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL),(4,'2012-04-11 10:03:49',17,'(PROV4)',1,NULL,NULL,NULL,'2011-08-04 23:19:32',NULL,NULL,NULL,1,NULL,NULL,0,0,0,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL),(5,'2012-04-11 10:03:49',17,'(PROV5)',1,NULL,NULL,NULL,'2011-08-04 23:22:16',NULL,NULL,NULL,1,NULL,NULL,0,0,0,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL),(6,'2012-04-11 10:03:49',17,'CF1108-0003',1,NULL,NULL,NULL,'2011-08-04 23:22:54','2011-08-08 15:04:37',NULL,NULL,1,1,NULL,0,2,0,0,0,0.98000000,0.00000000,0.00000000,5.00000000,5.98000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL),(7,'2012-04-11 10:03:49',17,'(PROV7)',1,NULL,NULL,NULL,'2011-08-04 23:23:29',NULL,NULL,NULL,1,NULL,NULL,0,0,0,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL),(8,'2012-04-11 10:03:49',17,'(PROV8)',1,NULL,NULL,NULL,'2011-08-04 23:36:10',NULL,NULL,NULL,1,NULL,NULL,0,0,0,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL); +/*!40000 ALTER TABLE `llx_commande_fournisseur` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_commande_fournisseur_dispatch` +-- + +DROP TABLE IF EXISTS `llx_commande_fournisseur_dispatch`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_commande_fournisseur_dispatch` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_commande` int(11) DEFAULT NULL, + `fk_product` int(11) DEFAULT NULL, + `qty` float DEFAULT NULL, + `fk_entrepot` int(11) DEFAULT NULL, + `fk_user` int(11) DEFAULT NULL, + `datec` datetime DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_commande_fournisseur_dispatch_fk_commande` (`fk_commande`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_commande_fournisseur_dispatch` +-- + +LOCK TABLES `llx_commande_fournisseur_dispatch` WRITE; +/*!40000 ALTER TABLE `llx_commande_fournisseur_dispatch` DISABLE KEYS */; +INSERT INTO `llx_commande_fournisseur_dispatch` (`rowid`, `fk_commande`, `fk_product`, `qty`, `fk_entrepot`, `fk_user`, `datec`) VALUES (1,2,4,2,1,1,'2010-07-11 18:49:44'); +/*!40000 ALTER TABLE `llx_commande_fournisseur_dispatch` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_commande_fournisseur_log` +-- + +DROP TABLE IF EXISTS `llx_commande_fournisseur_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_commande_fournisseur_log` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datelog` datetime NOT NULL, + `fk_commande` int(11) NOT NULL, + `fk_statut` smallint(6) NOT NULL, + `fk_user` int(11) NOT NULL, + `comment` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_commande_fournisseur_log` +-- + +LOCK TABLES `llx_commande_fournisseur_log` WRITE; +/*!40000 ALTER TABLE `llx_commande_fournisseur_log` DISABLE KEYS */; +INSERT INTO `llx_commande_fournisseur_log` (`rowid`, `tms`, `datelog`, `fk_commande`, `fk_statut`, `fk_user`, `comment`) VALUES (1,'2010-07-11 15:13:40','2010-07-11 17:13:40',1,0,1,NULL),(2,'2010-07-11 15:15:42','2010-07-11 17:15:42',1,1,1,NULL),(3,'2010-07-11 15:16:28','2010-07-11 17:16:28',1,2,1,NULL),(4,'2010-07-11 15:19:14','2010-07-11 00:00:00',1,3,1,NULL),(5,'2010-07-11 15:19:36','2010-07-11 00:00:00',1,5,1,NULL),(6,'2010-07-11 16:46:28','2010-07-11 18:46:28',2,0,1,NULL),(7,'2010-07-11 16:47:33','2010-07-11 18:47:33',2,1,1,NULL),(8,'2010-07-11 16:47:41','2010-07-11 18:47:41',2,2,1,NULL),(9,'2010-07-11 16:48:00','2010-07-11 00:00:00',2,3,1,NULL),(10,'2011-08-04 21:00:52','2011-08-04 23:00:52',3,0,1,NULL),(11,'2011-08-04 21:19:32','2011-08-04 23:19:32',4,0,1,NULL),(12,'2011-08-04 21:22:16','2011-08-04 23:22:16',5,0,1,NULL),(13,'2011-08-04 21:22:54','2011-08-04 23:22:54',6,0,1,NULL),(14,'2011-08-04 21:23:29','2011-08-04 23:23:29',7,0,1,NULL),(15,'2011-08-04 21:36:10','2011-08-04 23:36:10',8,0,1,NULL),(19,'2011-08-08 13:04:37','2011-08-08 15:04:37',6,1,1,NULL),(20,'2011-08-08 13:04:38','2011-08-08 15:04:38',6,2,1,NULL); +/*!40000 ALTER TABLE `llx_commande_fournisseur_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_commande_fournisseurdet` +-- + +DROP TABLE IF EXISTS `llx_commande_fournisseurdet`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_commande_fournisseurdet` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_commande` int(11) NOT NULL, + `fk_product` int(11) DEFAULT NULL, + `ref` varchar(50) DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `description` text, + `tva_tx` double(6,3) DEFAULT '0.000', + `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT '0.000', + `qty` double DEFAULT NULL, + `remise_percent` double DEFAULT '0', + `remise` double DEFAULT '0', + `subprice` double(24,8) DEFAULT '0.00000000', + `total_ht` double(24,8) DEFAULT '0.00000000', + `total_tva` double(24,8) DEFAULT '0.00000000', + `total_localtax1` double(24,8) DEFAULT '0.00000000', + `total_localtax2` double(24,8) DEFAULT '0.00000000', + `total_ttc` double(24,8) DEFAULT '0.00000000', + `product_type` int(11) DEFAULT '0', + `date_start` datetime DEFAULT NULL, + `date_end` datetime DEFAULT NULL, + `info_bits` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_commande_fournisseurdet` +-- + +LOCK TABLES `llx_commande_fournisseurdet` WRITE; +/*!40000 ALTER TABLE `llx_commande_fournisseurdet` DISABLE KEYS */; +INSERT INTO `llx_commande_fournisseurdet` (`rowid`, `fk_commande`, `fk_product`, `ref`, `label`, `description`, `tva_tx`, `localtax1_tx`, `localtax2_tx`, `qty`, `remise_percent`, `remise`, `subprice`, `total_ht`, `total_tva`, `total_localtax1`, `total_localtax2`, `total_ttc`, `product_type`, `date_start`, `date_end`, `info_bits`) VALUES (1,1,NULL,'','','Chips',19.600,0.000,0.000,10,0,0,20.00000000,200.00000000,39.20000000,0.00000000,0.00000000,239.20000000,0,NULL,NULL,0),(2,2,4,'ABCD','Decapsuleur','',0.000,0.000,0.000,20,0,0,10.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0),(3,6,NULL,'','','ljkljl',19.600,0.000,0.000,1,0,0,5.00000000,5.00000000,0.98000000,0.00000000,0.00000000,5.98000000,0,NULL,NULL,0); +/*!40000 ALTER TABLE `llx_commande_fournisseurdet` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_commandedet` +-- + +DROP TABLE IF EXISTS `llx_commandedet`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_commandedet` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_commande` int(11) DEFAULT NULL, + `fk_parent_line` int(11) DEFAULT NULL, + `fk_product` int(11) DEFAULT NULL, + `description` text, + `tva_tx` double(6,3) DEFAULT NULL, + `localtax1_tx` double(6,3) DEFAULT NULL, + `localtax2_tx` double(6,3) DEFAULT NULL, + `qty` double DEFAULT NULL, + `remise_percent` double DEFAULT '0', + `remise` double DEFAULT '0', + `fk_remise_except` int(11) DEFAULT NULL, + `price` double DEFAULT NULL, + `subprice` double(24,8) DEFAULT '0.00000000', + `total_ht` double(24,8) DEFAULT '0.00000000', + `total_tva` double(24,8) DEFAULT '0.00000000', + `total_localtax1` double(24,8) DEFAULT '0.00000000', + `total_localtax2` double(24,8) DEFAULT '0.00000000', + `total_ttc` double(24,8) DEFAULT '0.00000000', + `product_type` int(11) DEFAULT '0', + `date_start` datetime DEFAULT NULL, + `date_end` datetime DEFAULT NULL, + `info_bits` int(11) DEFAULT '0', + `marge_tx` double(6,3) DEFAULT '0.000', + `marque_tx` double(6,3) DEFAULT '0.000', + `special_code` int(10) unsigned DEFAULT '0', + `rang` int(11) DEFAULT '0', + `import_key` varchar(14) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_commandedet_fk_commande` (`fk_commande`), + KEY `idx_commandedet_fk_product` (`fk_product`), + CONSTRAINT `fk_commandedet_fk_commande` FOREIGN KEY (`fk_commande`) REFERENCES `llx_commande` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_commandedet` +-- + +LOCK TABLES `llx_commandedet` WRITE; +/*!40000 ALTER TABLE `llx_commandedet` DISABLE KEYS */; +INSERT INTO `llx_commandedet` (`rowid`, `fk_commande`, `fk_parent_line`, `fk_product`, `description`, `tva_tx`, `localtax1_tx`, `localtax2_tx`, `qty`, `remise_percent`, `remise`, `fk_remise_except`, `price`, `subprice`, `total_ht`, `total_tva`, `total_localtax1`, `total_localtax2`, `total_ttc`, `product_type`, `date_start`, `date_end`, `info_bits`, `marge_tx`, `marque_tx`, `special_code`, `rang`, `import_key`) VALUES (1,1,NULL,NULL,'Product 1',0.000,0.000,0.000,1,0,0,NULL,10,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,NULL,0,1,NULL),(2,1,NULL,2,'',0.000,0.000,0.000,1,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,NULL,0,2,NULL),(3,1,NULL,5,'cccc',0.000,0.000,0.000,1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,NULL,0,3,NULL),(4,2,NULL,NULL,'hgf',0.000,0.000,0.000,1,0,0,NULL,10,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,NULL,0,1,NULL),(10,5,NULL,NULL,'gfdgdf',0.000,0.000,0.000,1,0,0,NULL,10,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,NULL,0,1,NULL); +/*!40000 ALTER TABLE `llx_commandedet` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_compta` +-- + +DROP TABLE IF EXISTS `llx_compta`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_compta` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `datev` date DEFAULT NULL, + `amount` double NOT NULL DEFAULT '0', + `label` varchar(255) DEFAULT NULL, + `fk_compta_account` int(11) DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `valid` tinyint(4) DEFAULT '0', + `note` text, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_compta` +-- + +LOCK TABLES `llx_compta` WRITE; +/*!40000 ALTER TABLE `llx_compta` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_compta` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_compta_account` +-- + +DROP TABLE IF EXISTS `llx_compta_account`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_compta_account` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `number` varchar(12) DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `note` text, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_compta_account` +-- + +LOCK TABLES `llx_compta_account` WRITE; +/*!40000 ALTER TABLE `llx_compta_account` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_compta_account` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_compta_compte_generaux` +-- + +DROP TABLE IF EXISTS `llx_compta_compte_generaux`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_compta_compte_generaux` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `date_creation` datetime DEFAULT NULL, + `numero` varchar(50) DEFAULT NULL, + `intitule` varchar(255) DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `note` text, + PRIMARY KEY (`rowid`), + UNIQUE KEY `numero` (`numero`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_compta_compte_generaux` +-- + +LOCK TABLES `llx_compta_compte_generaux` WRITE; +/*!40000 ALTER TABLE `llx_compta_compte_generaux` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_compta_compte_generaux` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_cond_reglement` +-- + +DROP TABLE IF EXISTS `llx_cond_reglement`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_cond_reglement` ( + `rowid` int(11) NOT NULL, + `code` varchar(16) DEFAULT NULL, + `sortorder` smallint(6) DEFAULT NULL, + `active` tinyint(4) DEFAULT '1', + `libelle` varchar(255) DEFAULT NULL, + `libelle_facture` text, + `fdm` tinyint(4) DEFAULT NULL, + `nbjour` smallint(6) DEFAULT NULL, + `decalage` smallint(6) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_cond_reglement` +-- + +LOCK TABLES `llx_cond_reglement` WRITE; +/*!40000 ALTER TABLE `llx_cond_reglement` DISABLE KEYS */; +INSERT INTO `llx_cond_reglement` (`rowid`, `code`, `sortorder`, `active`, `libelle`, `libelle_facture`, `fdm`, `nbjour`, `decalage`) VALUES (1,'RECEP',1,1,'A réception','Réception de facture',0,0,NULL),(2,'30D',2,1,'30 jours','Réglement à 30 jours',0,30,NULL),(3,'30DENDMONTH',3,1,'30 jours fin de mois','Réglement à 30 jours fin de mois',1,30,NULL),(4,'60D',4,1,'60 jours','Réglement à 60 jours',0,60,NULL),(5,'60DENDMONTH',5,1,'60 jours fin de mois','Réglement à 60 jours fin de mois',1,60,NULL); +/*!40000 ALTER TABLE `llx_cond_reglement` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_const` +-- + +DROP TABLE IF EXISTS `llx_const`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_const` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `value` text NOT NULL, + `type` varchar(6) DEFAULT NULL, + `visible` tinyint(4) NOT NULL DEFAULT '1', + `note` text, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_const` (`name`,`entity`) +) ENGINE=InnoDB AUTO_INCREMENT=1767 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_const` +-- + +LOCK TABLES `llx_const` WRITE; +/*!40000 ALTER TABLE `llx_const` DISABLE KEYS */; +INSERT INTO `llx_const` (`rowid`, `name`, `entity`, `value`, `type`, `visible`, `note`, `tms`) VALUES (2,'MAIN_FEATURES_LEVEL',0,'0','chaine',1,'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development','2010-07-08 11:17:57'),(4,'SYSLOG_FILE',0,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'Directory where to write log file','2010-07-08 11:17:57'),(5,'SYSLOG_LEVEL',0,'7','chaine',0,'Level of debug info to show','2010-07-08 11:17:57'),(8,'MAIN_UPLOAD_DOC',0,'2048','chaine',0,'Max size for file upload (0 means no upload allowed)','2010-07-08 11:17:57'),(9,'MAIN_SEARCHFORM_SOCIETE',0,'1','yesno',0,'Show form for quick company search','2010-07-08 11:17:57'),(10,'MAIN_SEARCHFORM_CONTACT',0,'1','yesno',0,'Show form for quick contact search','2010-07-08 11:17:57'),(11,'MAIN_SEARCHFORM_PRODUITSERVICE',0,'1','yesno',0,'Show form for quick product search','2010-07-08 11:17:58'),(12,'MAIN_SEARCHFORM_ADHERENT',0,'1','yesno',0,'Show form for quick member search','2010-07-08 11:17:58'),(16,'MAIN_SIZE_LISTE_LIMIT',0,'25','chaine',0,'Longueur maximum des listes','2010-07-08 11:17:58'),(17,'MAIN_SHOW_WORKBOARD',0,'1','yesno',0,'Affichage tableau de bord de travail Dolibarr','2010-07-08 11:17:58'),(23,'MAIN_DELAY_ACTIONS_TODO',1,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2010-07-08 11:17:58'),(24,'MAIN_DELAY_ORDERS_TO_PROCESS',1,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes non traitées','2010-07-08 11:17:58'),(25,'MAIN_DELAY_PROPALS_TO_CLOSE',1,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2010-07-08 11:17:58'),(26,'MAIN_DELAY_PROPALS_TO_BILL',1,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2010-07-08 11:17:58'),(27,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',1,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2010-07-08 11:17:58'),(28,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',1,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2010-07-08 11:17:58'),(29,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',1,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2010-07-08 11:17:58'),(30,'MAIN_DELAY_RUNNING_SERVICES',1,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2010-07-08 11:17:58'),(31,'MAIN_DELAY_MEMBERS',1,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2010-07-08 11:17:58'),(32,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',1,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2010-07-08 11:17:58'),(33,'SOCIETE_NOLIST_COURRIER',0,'1','yesno',0,'Liste les fichiers du repertoire courrier','2010-07-08 11:17:58'),(35,'SOCIETE_CODECOMPTA_ADDON',1,'mod_codecompta_panicum','yesno',0,'Module to control third parties codes','2010-07-08 11:17:58'),(36,'ADHERENT_MAIL_REQUIRED',1,'1','yesno',0,'EMail required to create a new member','2010-07-08 11:17:58'),(37,'ADHERENT_MAIL_FROM',1,'adherents@domain.com','chaine',0,'Sender EMail for automatic emails','2010-07-08 11:17:58'),(38,'ADHERENT_MAIL_RESIL',1,'Your subscription has been resiliated.\r\nWe hope to see you soon again','texte',0,'Mail resiliation','2010-07-08 11:17:58'),(39,'ADHERENT_MAIL_VALID',1,'Your subscription has been validated.\r\nThis is a remind of your personal information :\r\n\r\n%INFOS%\r\n\r\n','texte',0,'Mail de validation','2010-07-08 11:17:59'),(40,'ADHERENT_MAIL_COTIS',1,'Hello %PRENOM%,\r\nThanks for your subscription.\r\nThis email confirms that your subscription has been received and processed.\r\n\r\n','texte',0,'Mail de validation de cotisation','2010-07-08 11:17:59'),(41,'ADHERENT_MAIL_VALID_SUBJECT',1,'Your subscription has been validated','chaine',0,'Sujet du mail de validation','2010-07-08 11:17:59'),(42,'ADHERENT_MAIL_RESIL_SUBJECT',1,'Resiliating your subscription','chaine',0,'Sujet du mail de resiliation','2010-07-08 11:17:59'),(43,'ADHERENT_MAIL_COTIS_SUBJECT',1,'Receipt of your subscription','chaine',0,'Sujet du mail de validation de cotisation','2010-07-08 11:17:59'),(44,'MAILING_EMAIL_FROM',1,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2010-07-08 11:17:59'),(45,'ADHERENT_USE_MAILMAN',1,'0','yesno',0,'Utilisation de Mailman','2010-07-08 11:17:59'),(46,'ADHERENT_MAILMAN_UNSUB_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%','chaine',0,'Url de desinscription aux listes mailman','2010-07-08 11:17:59'),(47,'ADHERENT_MAILMAN_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%','chaine',0,'Url pour les inscriptions mailman','2010-07-08 11:17:59'),(48,'ADHERENT_MAILMAN_LISTS',1,'test-test,test-test2','chaine',0,'Listes auxquelles inscrire les nouveaux adherents','2010-07-08 11:17:59'),(49,'ADHERENT_MAILMAN_ADMINPW',1,'','chaine',0,'Mot de passe Admin des liste mailman','2010-07-08 11:17:59'),(50,'ADHERENT_MAILMAN_SERVER',1,'lists.domain.com','chaine',0,'Serveur hebergeant les interfaces d Admin des listes mailman','2010-07-08 11:17:59'),(51,'ADHERENT_MAILMAN_LISTS_COTISANT',1,'','chaine',0,'Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement','2010-07-08 11:17:59'),(52,'ADHERENT_USE_SPIP',1,'0','yesno',0,'Utilisation de SPIP ?','2010-07-08 11:17:59'),(53,'ADHERENT_USE_SPIP_AUTO',1,'0','yesno',0,'Utilisation de SPIP automatiquement','2010-07-08 11:17:59'),(54,'ADHERENT_SPIP_USER',1,'user','chaine',0,'user spip','2010-07-08 11:17:59'),(55,'ADHERENT_SPIP_PASS',1,'pass','chaine',0,'Pass de connection','2010-07-08 11:17:59'),(56,'ADHERENT_SPIP_SERVEUR',1,'localhost','chaine',0,'serveur spip','2010-07-08 11:17:59'),(57,'ADHERENT_SPIP_DB',1,'spip','chaine',0,'db spip','2010-07-08 11:17:59'),(58,'ADHERENT_CARD_HEADER_TEXT',1,'%ANNEE%','chaine',0,'Texte imprime sur le haut de la carte adherent','2010-07-08 11:17:59'),(59,'ADHERENT_CARD_FOOTER_TEXT',1,'Association AZERTY','chaine',0,'Texte imprime sur le bas de la carte adherent','2010-07-08 11:17:59'),(61,'FCKEDITOR_ENABLE_USER',1,'1','yesno',0,'Activation fckeditor sur notes utilisateurs','2010-07-08 11:17:59'),(62,'FCKEDITOR_ENABLE_SOCIETE',1,'1','yesno',0,'Activation fckeditor sur notes societe','2010-07-08 11:17:59'),(63,'FCKEDITOR_ENABLE_PRODUCTDESC',1,'1','yesno',0,'Activation fckeditor sur notes produits','2010-07-08 11:17:59'),(64,'FCKEDITOR_ENABLE_MEMBER',1,'1','yesno',0,'Activation fckeditor sur notes adherent','2010-07-08 11:17:59'),(65,'FCKEDITOR_ENABLE_MAILING',1,'1','yesno',0,'Activation fckeditor sur emailing','2010-07-08 11:17:59'),(66,'OSC_DB_HOST',1,'localhost','chaine',0,'Host for OSC database for OSCommerce module 1','2010-07-08 11:17:59'),(67,'DON_ADDON_MODEL',1,'html_cerfafr','chaine',0,'','2010-07-08 11:18:00'),(68,'PROPALE_ADDON',1,'mod_propale_marbre','chaine',0,'','2010-07-08 11:18:00'),(69,'PROPALE_ADDON_PDF',1,'azur','chaine',0,'','2010-07-08 11:18:00'),(70,'COMMANDE_ADDON',1,'mod_commande_marbre','chaine',0,'','2010-07-08 11:18:00'),(71,'COMMANDE_ADDON_PDF',1,'einstein','chaine',0,'','2010-07-08 11:18:00'),(72,'COMMANDE_SUPPLIER_ADDON',1,'mod_commande_fournisseur_muguet','chaine',0,'','2010-07-08 11:18:00'),(73,'COMMANDE_SUPPLIER_ADDON_PDF',1,'muscadet','chaine',0,'','2010-07-08 11:18:00'),(74,'EXPEDITION_ADDON',1,'enlevement','chaine',0,'','2010-07-08 11:18:00'),(76,'FICHEINTER_ADDON',1,'pacific','chaine',0,'','2010-07-08 11:18:00'),(77,'FICHEINTER_ADDON_PDF',1,'soleil','chaine',0,'','2010-07-08 11:18:00'),(79,'FACTURE_ADDON_PDF',1,'crabe','chaine',0,'','2010-07-08 11:18:00'),(80,'PROPALE_VALIDITY_DURATION',1,'15','chaine',0,'Durée de validitée des propales','2010-07-08 11:18:00'),(230,'COMPANY_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2010-07-08 11:26:20'),(238,'LIVRAISON_ADDON_PDF',1,'typhon','chaine',0,'Nom du gestionnaire de generation des commandes en PDF','2010-07-08 11:26:27'),(239,'LIVRAISON_ADDON',1,'mod_livraison_jade','chaine',0,'Nom du gestionnaire de numerotation des bons de livraison','2010-07-08 11:26:27'),(242,'MAIN_SUBMODULE_EXPEDITION',1,'1','chaine',0,'','2010-07-08 11:26:34'),(245,'FACTURE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2010-07-08 11:28:53'),(249,'DON_FORM',1,'fsfe.fr.php','chaine',0,'Nom du gestionnaire de formulaire de dons','2010-07-08 11:29:00'),(252,'MAIN_MODULE_ADHERENT',1,'1',NULL,0,NULL,'2010-07-08 11:29:05'),(253,'ADHERENT_BANK_USE_AUTO',1,'','yesno',0,'Insertion automatique des cotisation dans le compte banquaire','2010-07-08 11:29:05'),(254,'ADHERENT_BANK_ACCOUNT',1,'','chaine',0,'ID du Compte banquaire utilise','2010-07-08 11:29:05'),(255,'ADHERENT_BANK_CATEGORIE',1,'','chaine',0,'ID de la categorie banquaire des cotisations','2010-07-08 11:29:05'),(256,'ADHERENT_ETIQUETTE_TYPE',1,'L7163','chaine',0,'Type d etiquette (pour impression de planche d etiquette)','2010-07-08 11:29:05'),(260,'MAIN_MODULE_STOCK',1,'1',NULL,0,NULL,'2010-07-08 11:29:18'),(269,'PROJECT_ADDON_PDF',1,'baleine','chaine',0,'Nom du gestionnaire de generation des projets en PDF','2010-07-08 11:29:33'),(270,'PROJECT_ADDON',1,'mod_project_simple','chaine',0,'Nom du gestionnaire de numerotation des projets','2010-07-08 11:29:33'),(271,'MAIN_MODULE_MAILING',1,'1',NULL,0,NULL,'2010-07-08 11:29:37'),(272,'MAIN_MODULE_EXPORT',1,'1',NULL,0,NULL,'2010-07-08 11:29:41'),(273,'MAIN_MODULE_IMPORT',1,'1',NULL,0,NULL,'2010-07-08 11:29:45'),(274,'MAIN_MODULE_CATEGORIE',1,'1',NULL,0,NULL,'2010-07-08 11:29:59'),(275,'MAIN_MODULE_BOOKMARK',1,'1',NULL,0,NULL,'2010-07-08 11:30:03'),(276,'MAIN_MODULE_WEBSERVICES',1,'1',NULL,0,NULL,'2010-07-08 11:30:30'),(278,'MAIN_MODULE_GEOIPMAXMIND',1,'1',NULL,0,NULL,'2010-07-08 11:30:36'),(279,'MAIN_MODULE_EXTERNALRSS',1,'1',NULL,0,NULL,'2010-07-08 11:30:38'),(280,'MAIN_SECURITY_DISABLEFORGETPASSLINK',1,'1','chaine',0,'','2010-07-08 11:32:59'),(292,'MAIN_MODULE_FCKEDITOR',1,'1',NULL,0,NULL,'2010-07-08 11:56:27'),(368,'STOCK_USERSTOCK_AUTOCREATE',1,'1','chaine',0,'','2010-07-08 22:44:59'),(369,'EXPEDITION_ADDON_PDF',1,'merou','chaine',0,'','2010-07-08 22:58:07'),(370,'MAIN_SUBMODULE_LIVRAISON',1,'1','chaine',0,'','2010-07-08 23:00:29'),(377,'FACTURE_ADDON',1,'mod_facture_terre','chaine',0,'','2010-07-08 23:08:12'),(380,'ADHERENT_CARD_TEXT',1,'%TYPE% n° %ID%\r\n%PRENOM% %NOM%\r\n<%EMAIL%>\r\n%ADRESSE%\r\n%CP% %VILLE%\r\n%PAYS%','',0,'Texte imprime sur la carte adherent','2010-07-08 23:14:46'),(381,'ADHERENT_CARD_TEXT_RIGHT',1,'aaa','',0,'','2010-07-08 23:14:55'),(384,'PRODUIT_SOUSPRODUITS',1,'1','chaine',0,'','2010-07-08 23:22:12'),(385,'PRODUIT_USE_SEARCH_TO_SELECT',1,'1','chaine',0,'','2010-07-08 23:22:19'),(386,'STOCK_CALCULATE_ON_SHIPMENT',1,'1','chaine',0,'','2010-07-08 23:23:21'),(387,'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER',1,'1','chaine',0,'','2010-07-08 23:23:26'),(392,'MAIN_AGENDA_XCAL_EXPORTKEY',1,'dolibarr','chaine',0,'','2010-07-08 23:27:50'),(393,'MAIN_AGENDA_EXPORT_PAST_DELAY',1,'100','chaine',0,'','2010-07-08 23:27:50'),(523,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(524,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(525,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(526,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',1,'1','chaine',0,'','2010-07-10 12:48:49'),(527,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(528,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',1,'1','chaine',0,'','2010-07-10 12:48:49'),(529,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(530,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',1,'1','chaine',0,'','2010-07-10 12:48:49'),(531,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',1,'1','chaine',0,'','2010-07-10 12:48:49'),(532,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',1,'1','chaine',0,'','2010-07-10 12:48:49'),(533,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:50'),(534,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:50'),(602,'MAIN_MODULE_PROJET',1,'1',NULL,0,NULL,'2010-07-11 13:26:54'),(610,'CASHDESK_ID_THIRDPARTY',1,'7','chaine',0,'','2010-07-11 17:08:18'),(611,'CASHDESK_ID_BANKACCOUNT_CASH',1,'3','chaine',0,'','2010-07-11 17:08:18'),(612,'CASHDESK_ID_BANKACCOUNT_CHEQUE',1,'1','chaine',0,'','2010-07-11 17:08:18'),(613,'CASHDESK_ID_BANKACCOUNT_CB',1,'1','chaine',0,'','2010-07-11 17:08:18'),(614,'CASHDESK_ID_WAREHOUSE',1,'2','chaine',0,'','2010-07-11 17:08:18'),(660,'LDAP_USER_DN',1,'ou=users,dc=my-domain,dc=com','chaine',0,NULL,'2010-07-18 10:25:27'),(661,'LDAP_GROUP_DN',1,'ou=groups,dc=my-domain,dc=com','chaine',0,NULL,'2010-07-18 10:25:27'),(662,'LDAP_FILTER_CONNECTION',1,'&(objectClass=user)(objectCategory=person)','chaine',0,NULL,'2010-07-18 10:25:27'),(663,'LDAP_FIELD_LOGIN',1,'uid','chaine',0,NULL,'2010-07-18 10:25:27'),(664,'LDAP_FIELD_FULLNAME',1,'cn','chaine',0,NULL,'2010-07-18 10:25:27'),(665,'LDAP_FIELD_NAME',1,'sn','chaine',0,NULL,'2010-07-18 10:25:27'),(666,'LDAP_FIELD_FIRSTNAME',1,'givenname','chaine',0,NULL,'2010-07-18 10:25:27'),(667,'LDAP_FIELD_MAIL',1,'mail','chaine',0,NULL,'2010-07-18 10:25:27'),(668,'LDAP_FIELD_PHONE',1,'telephonenumber','chaine',0,NULL,'2010-07-18 10:25:27'),(669,'LDAP_FIELD_FAX',1,'facsimiletelephonenumber','chaine',0,NULL,'2010-07-18 10:25:27'),(670,'LDAP_FIELD_MOBILE',1,'mobile','chaine',0,NULL,'2010-07-18 10:25:27'),(671,'LDAP_SERVER_TYPE',1,'openldap','chaine',0,'','2010-07-18 10:25:46'),(672,'LDAP_SERVER_PROTOCOLVERSION',1,'3','chaine',0,'','2010-07-18 10:25:47'),(673,'LDAP_SERVER_HOST',1,'localhost','chaine',0,'','2010-07-18 10:25:47'),(674,'LDAP_SERVER_PORT',1,'389','chaine',0,'','2010-07-18 10:25:47'),(675,'LDAP_SERVER_USE_TLS',1,'0','chaine',0,'','2010-07-18 10:25:47'),(676,'LDAP_SYNCHRO_ACTIVE',1,'dolibarr2ldap','chaine',0,'','2010-07-18 10:25:47'),(677,'LDAP_CONTACT_ACTIVE',1,'1','chaine',0,'','2010-07-18 10:25:47'),(678,'LDAP_MEMBER_ACTIVE',1,'1','chaine',0,'','2010-07-18 10:25:47'),(691,'INVOICE_SUPPLIER_ADDON_PDF',1,'canelle','chaine',0,'','2011-02-06 11:18:27'),(692,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',1,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2011-02-06 11:18:28'),(807,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',1,'1','chaine',0,NULL,'2011-07-18 17:27:52'),(808,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',1,'1','chaine',0,NULL,'2011-07-18 17:27:52'),(834,'MAIN_MODULE_CASHDESK',1,'1',NULL,0,NULL,'2011-07-18 17:30:24'),(838,'MAIN_MODULE_PRODUCT',1,'1',NULL,0,NULL,'2011-07-18 17:30:24'),(969,'MAIN_MODULE_PRELEVEMENT',1,'1',NULL,0,NULL,'2011-07-18 18:01:59'),(973,'MAIN_MODULE_WORKFLOW',1,'1',NULL,0,NULL,'2011-07-18 18:02:20'),(974,'MAIN_MODULE_WORKFLOW_TRIGGERS',1,'1','chaine',0,NULL,'2011-07-18 18:02:20'),(975,'WORKFLOW_PROPAL_AUTOCREATE_ORDER',1,'1','chaine',0,'','2011-07-18 18:02:24'),(979,'PRELEVEMENT_USER',1,'1','chaine',0,'','2011-07-18 18:05:50'),(980,'PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR',1,'1234567','chaine',0,'','2011-07-18 18:05:50'),(981,'PRELEVEMENT_ID_BANKACCOUNT',1,'1','chaine',0,'','2011-07-18 18:05:50'),(983,'FACTURE_RIB_NUMBER',1,'1','chaine',0,'','2011-07-18 18:35:14'),(984,'FACTURE_CHQ_NUMBER',1,'1','chaine',0,'','2011-07-18 18:35:14'),(1005,'MAIN_MODULE_GOOGLE',1,'1',NULL,0,NULL,'2011-07-18 21:20:54'),(1006,'MAIN_MODULE_GOOGLE_TABS_0',1,'agenda:+gcal:MenuAgendaGoogle:@google:$conf->google->enabled && $conf->global->GOOGLE_ENABLE_AGENDA:/google/index.php','chaine',0,NULL,'2011-07-18 21:20:54'),(1007,'MAIN_MODULE_GOOGLE_TRIGGERS',1,'1','chaine',0,NULL,'2011-07-18 21:20:54'),(1008,'GOOGLE_ENABLE_AGENDA',1,'0','chaine',0,'','2011-07-18 21:22:59'),(1009,'GOOGLE_AGENDA_COLOR1',1,'FFFFFF','chaine',0,'','2011-07-18 21:22:59'),(1010,'GOOGLE_AGENDA_COLOR2',1,'7A367A','chaine',0,'','2011-07-18 21:22:59'),(1011,'GOOGLE_AGENDA_COLOR3',1,'7A367A','chaine',0,'','2011-07-18 21:22:59'),(1012,'GOOGLE_AGENDA_COLOR4',1,'7A367A','chaine',0,'','2011-07-18 21:22:59'),(1013,'GOOGLE_AGENDA_COLOR5',1,'7A367A','chaine',0,'','2011-07-18 21:22:59'),(1014,'GOOGLE_AGENDA_TIMEZONE',1,'Europe/Paris','chaine',0,'','2011-07-18 21:22:59'),(1015,'GOOGLE_AGENDA_NB',1,'5','chaine',0,'','2011-07-18 21:22:59'),(1016,'GOOGLE_DUPLICATE_INTO_GCAL',1,'1','chaine',0,'','2011-07-18 21:40:20'),(1017,'MAIN_MAIL_DEBUG',1,'1','',1,'','2011-07-20 10:34:34'),(1018,'MAIN_MODULE_SYSLOG',0,'1',NULL,0,NULL,'2011-07-20 11:36:47'),(1019,'MAIN_DISABLE_ALL_MAILS',1,'0','chaine',0,'','2011-07-20 12:38:08'),(1020,'MAIN_MAIL_SENDMODE',0,'mail','chaine',0,'','2011-07-20 12:38:08'),(1021,'MAIN_MAIL_EMAIL_FROM',1,'eldy@destailleur.fr','chaine',0,'','2011-07-20 12:38:08'),(1098,'MAIN_INFO_SOCIETE_LOGO',1,'dolibarr_125x125.png','chaine',0,'','2011-07-28 18:42:09'),(1099,'MAIN_INFO_SOCIETE_LOGO_SMALL',1,'dolibarr_125x125_small.png','chaine',0,'','2011-07-28 18:42:09'),(1100,'MAIN_INFO_SOCIETE_LOGO_MINI',1,'dolibarr_125x125_mini.png','chaine',0,'','2011-07-28 18:42:09'),(1110,'MAIN_MAIL_SMTP_SERVER',0,'','chaine',0,'Host or ip address for SMTP server','2011-07-28 22:27:03'),(1111,'MAIN_MAIL_SMTP_PORT',0,'','chaine',0,'Port for SMTP server','2011-07-28 22:27:03'),(1138,'MAIN_VERSION_LAST_INSTALL',0,'3.1.0-beta','chaine',0,'Dolibarr version when install','2011-07-28 23:05:02'),(1152,'SOCIETE_CODECLIENT_ADDON',1,'mod_codeclient_monkey','chaine',0,'','2011-07-29 20:50:02'),(1231,'MAIN_UPLOAD_DOC',1,'2048','chaine',0,'','2011-07-29 21:04:00'),(1233,'MAIN_SESSION_TIMEOUT',1,'1442','chaine',0,'','2011-07-29 21:04:08'),(1234,'MAIN_UMASK',1,'0664','chaine',0,'','2011-07-29 21:04:11'),(1237,'MAIN_USE_CONNECT_TIMEOUT',1,'10','chaine',0,'','2011-07-29 21:04:56'),(1238,'MAIN_USE_RESPONSE_TIMEOUT',1,'30','chaine',0,'','2011-07-29 21:04:56'),(1239,'MAIN_PROXY_USE',1,'0','chaine',0,'','2011-07-29 21:04:56'),(1240,'MAIN_LOGEVENTS_USER_LOGIN',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1241,'MAIN_LOGEVENTS_USER_LOGIN_FAILED',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1242,'MAIN_LOGEVENTS_USER_LOGOUT',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1243,'MAIN_LOGEVENTS_USER_CREATE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1244,'MAIN_LOGEVENTS_USER_MODIFY',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1245,'MAIN_LOGEVENTS_USER_NEW_PASSWORD',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1246,'MAIN_LOGEVENTS_USER_ENABLEDISABLE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1247,'MAIN_LOGEVENTS_USER_DELETE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1248,'MAIN_LOGEVENTS_GROUP_CREATE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1249,'MAIN_LOGEVENTS_GROUP_MODIFY',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1250,'MAIN_LOGEVENTS_GROUP_DELETE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1251,'MAIN_BOXES_MAXLINES',1,'5','',0,'','2011-07-29 21:05:42'),(1379,'CABINETMED_RHEUMATOLOGY_ON',1,'1','chaine',1,'Enable features for rheumatology','2011-08-01 21:47:53'),(1464,'MAIN_INFO_SOCIETE_PAYS',1,'1:FR:France','chaine',0,'','2011-08-04 21:36:47'),(1465,'MAIN_INFO_SOCIETE_NOM',1,'MyBigCompany','chaine',0,'','2011-08-04 21:36:48'),(1466,'MAIN_INFO_SOCIETE_ADRESSE',1,'21 Jump street','chaine',0,'','2011-08-04 21:36:48'),(1467,'MAIN_INFO_SOCIETE_VILLE',1,'MyTown','chaine',0,'','2011-08-04 21:36:48'),(1468,'MAIN_INFO_SOCIETE_CP',1,'75500','chaine',0,'','2011-08-04 21:36:48'),(1469,'MAIN_INFO_SOCIETE_DEPARTEMENT',1,'0','chaine',0,'','2011-08-04 21:36:48'),(1470,'MAIN_MONNAIE',1,'EUR','chaine',0,'','2011-08-04 21:36:48'),(1471,'MAIN_INFO_SOCIETE_TEL',1,'09123123','chaine',0,'','2011-08-04 21:36:48'),(1472,'MAIN_INFO_SOCIETE_FAX',1,'09123124','chaine',0,'','2011-08-04 21:36:48'),(1473,'MAIN_INFO_SOCIETE_MAIL',1,'myemail@mybigcompany.com','chaine',0,'','2011-08-04 21:36:48'),(1474,'MAIN_INFO_SOCIETE_WEB',1,'http://www.dolibarr.org','chaine',0,'','2011-08-04 21:36:48'),(1475,'MAIN_INFO_SOCIETE_NOTE',1,'This is note about my company','chaine',0,'','2011-08-04 21:36:48'),(1476,'MAIN_INFO_CAPITAL',1,'10000','chaine',0,'','2011-08-04 21:36:48'),(1477,'MAIN_INFO_SOCIETE_FORME_JURIDIQUE',1,'0','chaine',0,'','2011-08-04 21:36:48'),(1478,'MAIN_INFO_TVAINTRA',1,'IN1234567','chaine',0,'','2011-08-04 21:36:48'),(1479,'SOCIETE_FISCAL_MONTH_START',1,'0','chaine',0,'','2011-08-04 21:36:48'),(1480,'FACTURE_TVAOPTION',1,'reel','chaine',0,'','2011-08-04 21:36:48'),(1482,'EXPEDITION_ADDON_NUMBER',1,'mod_expedition_safor','chaine',0,'Nom du gestionnaire de numerotation des expeditions','2011-08-05 17:53:11'),(1485,'MAIN_MODULE_TAX',1,'1',NULL,0,NULL,'2011-08-05 17:54:19'),(1490,'CONTRACT_ADDON',1,'mod_contract_serpis','chaine',0,'Nom du gestionnaire de numerotation des contrats','2011-08-05 18:11:58'),(1502,'MAIN_MENU_STANDARD',1,'auguria_backoffice.php','chaine',0,'','2011-08-05 18:28:30'),(1503,'MAIN_MENU_SMARTPHONE',1,'auguria_backoffice.php','chaine',0,'','2011-08-05 18:28:30'),(1504,'MAIN_MENUFRONT_STANDARD',1,'eldy_frontoffice.php','chaine',0,'','2011-08-05 18:28:30'),(1505,'MAIN_MENUFRONT_SMARTPHONE',1,'eldy_frontoffice.php','chaine',0,'','2011-08-05 18:28:30'),(1507,'MAIN_MODULE_PROPALE',1,'1',NULL,0,NULL,'2011-08-05 20:40:22'),(1509,'MAIN_MODULE_EXPEDITION',1,'1',NULL,0,NULL,'2011-08-05 20:40:24'),(1512,'MAIN_MODULE_CONTRAT',1,'1',NULL,0,NULL,'2011-08-05 20:40:27'),(1514,'MAIN_MODULE_FICHEINTER',1,'1',NULL,0,NULL,'2011-08-05 20:40:30'),(1518,'MAIN_MODULE_COMPTABILITE',1,'1',NULL,0,NULL,'2011-08-05 20:40:33'),(1521,'MAIN_MODULE_BANQUE',1,'1',NULL,0,NULL,'2011-08-05 20:40:34'),(1667,'MAIN_PROFID1_IN_ADDRESS',1,'0','chaine',0,'','2011-08-08 17:33:03'),(1668,'MAIN_PROFID2_IN_ADDRESS',1,'0','chaine',0,'','2011-08-08 17:33:03'),(1669,'MAIN_PROFID3_IN_ADDRESS',1,'0','chaine',0,'','2011-08-08 17:33:03'),(1670,'MAIN_PROFID4_IN_ADDRESS',1,'0','chaine',0,'','2011-08-08 17:33:03'),(1677,'COMMANDE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/orders','chaine',0,NULL,'2012-04-11 10:03:31'),(1686,'MAIN_MODULE_AGENDA',1,'1',NULL,0,NULL,'2012-04-11 10:04:58'),(1687,'MAIN_MODULE_SOCIETE',1,'1',NULL,0,NULL,'2012-04-11 10:04:58'),(1688,'MAIN_MODULE_SERVICE',1,'1',NULL,0,NULL,'2012-04-11 10:04:58'),(1689,'MAIN_MODULE_COMMANDE',1,'1',NULL,0,NULL,'2012-04-11 10:04:58'),(1690,'MAIN_MODULE_FACTURE',1,'1',NULL,0,NULL,'2012-04-11 10:04:58'),(1691,'MAIN_MODULE_FOURNISSEUR',1,'1',NULL,0,NULL,'2012-04-11 10:04:58'),(1692,'MAIN_MODULE_USER',0,'1',NULL,0,NULL,'2012-04-11 10:04:58'),(1693,'MAIN_MODULE_DEPLACEMENT',1,'1',NULL,0,NULL,'2012-04-11 10:04:58'),(1694,'MAIN_MODULE_DON',1,'1',NULL,0,NULL,'2012-04-11 10:04:58'),(1695,'MAIN_MODULE_ECM',1,'1',NULL,0,NULL,'2012-04-11 10:04:58'),(1696,'MAIN_VERSION_LAST_UPGRADE',0,'3.2.0-beta','chaine',0,'Dolibarr version for last upgrade','2012-04-11 10:05:00'),(1698,'MAIN_REMOVE_INSTALL_WARNING',1,'1','',1,'','2012-04-11 10:05:39'),(1749,'MAIN_LANG_DEFAULT',1,'auto','chaine',0,'','2012-04-11 10:07:27'),(1750,'MAIN_MULTILANGS',1,'1','chaine',0,'','2012-04-11 10:07:27'),(1751,'MAIN_SIZE_LISTE_LIMIT',1,'25','chaine',0,'','2012-04-11 10:07:27'),(1752,'MAIN_DISABLE_JAVASCRIPT',1,'0','chaine',0,'','2012-04-11 10:07:27'),(1753,'MAIN_USE_PREVIEW_TABS',1,'0','chaine',0,'','2012-04-11 10:07:27'),(1754,'MAIN_START_WEEK',1,'1','chaine',0,'','2012-04-11 10:07:27'),(1755,'MAIN_SHOW_LOGO',1,'0','chaine',0,'','2012-04-11 10:07:27'),(1756,'MAIN_FIRSTNAME_NAME_POSITION',1,'0','chaine',0,'','2012-04-11 10:07:27'),(1757,'MAIN_THEME',1,'auguria','chaine',0,'','2012-04-11 10:07:27'),(1758,'MAIN_SEARCHFORM_CONTACT',1,'1','chaine',0,'','2012-04-11 10:07:27'),(1759,'MAIN_SEARCHFORM_SOCIETE',1,'1','chaine',0,'','2012-04-11 10:07:27'),(1760,'MAIN_SEARCHFORM_PRODUITSERVICE',1,'1','chaine',0,'','2012-04-11 10:07:27'),(1761,'MAIN_SEARCHFORM_ADHERENT',1,'1','chaine',0,'','2012-04-11 10:07:27'),(1762,'MAIN_HELPCENTER_DISABLELINK',0,'1','chaine',0,'','2012-04-11 10:07:27'),(1763,'MAIN_MOTD',1,'You are on a database initialized for demo.','chaine',0,'','2012-04-11 10:07:27'),(1764,'MAIN_HOME',1,'__(NoteSomeFeaturesAreDisabled)__
\r\n
\r\n__(SomeTranslationAreUncomplete)__
','chaine',0,'','2012-04-11 10:07:27'),(1765,'MAIN_HELP_DISABLELINK',0,'0','chaine',0,'','2012-04-11 10:07:27'),(1766,'SYSTEMTOOLS_MYSQLDUMP',1,'/usr/bin/mysqldump','chaine',0,'','2012-04-11 10:11:49'); +/*!40000 ALTER TABLE `llx_const` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_contrat` +-- + +DROP TABLE IF EXISTS `llx_contrat`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_contrat` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(30) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datec` datetime DEFAULT NULL, + `date_contrat` datetime DEFAULT NULL, + `statut` smallint(6) DEFAULT '0', + `mise_en_service` datetime DEFAULT NULL, + `fin_validite` datetime DEFAULT NULL, + `date_cloture` datetime DEFAULT NULL, + `fk_soc` int(11) NOT NULL, + `fk_projet` int(11) DEFAULT NULL, + `fk_commercial_signature` int(11) NOT NULL, + `fk_commercial_suivi` int(11) NOT NULL, + `fk_user_author` int(11) NOT NULL DEFAULT '0', + `fk_user_mise_en_service` int(11) DEFAULT NULL, + `fk_user_cloture` int(11) DEFAULT NULL, + `note` text, + `note_public` text, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_contrat_ref` (`ref`,`entity`), + KEY `idx_contrat_fk_soc` (`fk_soc`), + KEY `idx_contrat_fk_user_author` (`fk_user_author`), + CONSTRAINT `fk_contrat_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), + CONSTRAINT `fk_contrat_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_contrat` +-- + +LOCK TABLES `llx_contrat` WRITE; +/*!40000 ALTER TABLE `llx_contrat` DISABLE KEYS */; +INSERT INTO `llx_contrat` (`rowid`, `ref`, `entity`, `tms`, `datec`, `date_contrat`, `statut`, `mise_en_service`, `fin_validite`, `date_cloture`, `fk_soc`, `fk_projet`, `fk_commercial_signature`, `fk_commercial_suivi`, `fk_user_author`, `fk_user_mise_en_service`, `fk_user_cloture`, `note`, `note_public`, `import_key`, `extraparams`) VALUES (1,'CONTRACT1',1,'2010-07-08 23:53:55','2010-07-09 01:53:25','2010-07-09 00:00:00',1,NULL,NULL,NULL,3,NULL,2,2,1,NULL,NULL,NULL,NULL,NULL,NULL),(2,'CONTRAT1',1,'2010-07-10 16:18:16','2010-07-10 18:13:37','2010-07-10 00:00:00',1,NULL,NULL,NULL,2,NULL,2,2,1,NULL,NULL,NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `llx_contrat` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_contratdet` +-- + +DROP TABLE IF EXISTS `llx_contratdet`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_contratdet` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_contrat` int(11) NOT NULL, + `fk_product` int(11) DEFAULT NULL, + `statut` smallint(6) DEFAULT '0', + `label` text, + `description` text, + `fk_remise_except` int(11) DEFAULT NULL, + `date_commande` datetime DEFAULT NULL, + `date_ouverture_prevue` datetime DEFAULT NULL, + `date_ouverture` datetime DEFAULT NULL, + `date_fin_validite` datetime DEFAULT NULL, + `date_cloture` datetime DEFAULT NULL, + `tva_tx` double(6,3) DEFAULT '0.000', + `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT '0.000', + `qty` double NOT NULL, + `remise_percent` double DEFAULT '0', + `subprice` double(24,8) DEFAULT '0.00000000', + `price_ht` double DEFAULT NULL, + `remise` double DEFAULT '0', + `total_ht` double(24,8) DEFAULT '0.00000000', + `total_tva` double(24,8) DEFAULT '0.00000000', + `total_localtax1` double(24,8) DEFAULT '0.00000000', + `total_localtax2` double(24,8) DEFAULT '0.00000000', + `total_ttc` double(24,8) DEFAULT '0.00000000', + `info_bits` int(11) DEFAULT '0', + `fk_user_author` int(11) NOT NULL DEFAULT '0', + `fk_user_ouverture` int(11) DEFAULT NULL, + `fk_user_cloture` int(11) DEFAULT NULL, + `commentaire` text, + PRIMARY KEY (`rowid`), + KEY `idx_contratdet_fk_contrat` (`fk_contrat`), + KEY `idx_contratdet_fk_product` (`fk_product`), + KEY `idx_contratdet_date_ouverture_prevue` (`date_ouverture_prevue`), + KEY `idx_contratdet_date_ouverture` (`date_ouverture`), + KEY `idx_contratdet_date_fin_validite` (`date_fin_validite`), + CONSTRAINT `fk_contratdet_fk_contrat` FOREIGN KEY (`fk_contrat`) REFERENCES `llx_contrat` (`rowid`), + CONSTRAINT `fk_contratdet_fk_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_contratdet` +-- + +LOCK TABLES `llx_contratdet` WRITE; +/*!40000 ALTER TABLE `llx_contratdet` DISABLE KEYS */; +INSERT INTO `llx_contratdet` (`rowid`, `tms`, `fk_contrat`, `fk_product`, `statut`, `label`, `description`, `fk_remise_except`, `date_commande`, `date_ouverture_prevue`, `date_ouverture`, `date_fin_validite`, `date_cloture`, `tva_tx`, `localtax1_tx`, `localtax2_tx`, `qty`, `remise_percent`, `subprice`, `price_ht`, `remise`, `total_ht`, `total_tva`, `total_localtax1`, `total_localtax2`, `total_ttc`, `info_bits`, `fk_user_author`, `fk_user_ouverture`, `fk_user_cloture`, `commentaire`) VALUES (1,'2010-07-08 23:54:23',1,3,4,'','',NULL,NULL,'2010-07-09 00:00:00','2010-07-09 12:00:00','2011-07-01 12:00:00',NULL,0.000,0.000,0.000,1,0,0.00000000,0,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,0,1,1,''),(2,'2010-07-10 16:14:14',2,NULL,0,'','Abonnement annuel assurance',NULL,NULL,'2010-07-10 00:00:00',NULL,'2011-07-10 00:00:00',NULL,1.000,0.000,0.000,1,0,10.00000000,10,0,10.00000000,0.10000000,0.00000000,0.00000000,10.10000000,0,0,NULL,NULL,NULL),(3,'2010-07-10 16:18:45',2,3,4,'','',NULL,NULL,'2010-07-10 00:00:00','2010-07-10 12:00:00','2011-07-09 12:00:00',NULL,0.000,0.000,0.000,1,0,0.00000000,0,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,0,1,1,''),(4,'2012-04-11 10:04:58',2,3,0,'','',NULL,NULL,'2010-07-10 00:00:00',NULL,NULL,NULL,0.000,0.000,0.000,1,10,40.00000000,40,NULL,36.00000000,0.00000000,0.00000000,0.00000000,36.00000000,0,0,NULL,1,''); +/*!40000 ALTER TABLE `llx_contratdet` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_contratdet_log` +-- + +DROP TABLE IF EXISTS `llx_contratdet_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_contratdet_log` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_contratdet` int(11) NOT NULL, + `date` datetime NOT NULL, + `statut` smallint(6) NOT NULL, + `fk_user_author` int(11) NOT NULL, + `commentaire` text, + PRIMARY KEY (`rowid`), + KEY `idx_contratdet_log_fk_contratdet` (`fk_contratdet`), + KEY `idx_contratdet_log_date` (`date`), + CONSTRAINT `fk_contratdet_log_fk_contratdet` FOREIGN KEY (`fk_contratdet`) REFERENCES `llx_contratdet` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_contratdet_log` +-- + +LOCK TABLES `llx_contratdet_log` WRITE; +/*!40000 ALTER TABLE `llx_contratdet_log` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_contratdet_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_cotisation` +-- + +DROP TABLE IF EXISTS `llx_cotisation`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_cotisation` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datec` datetime DEFAULT NULL, + `fk_adherent` int(11) DEFAULT NULL, + `dateadh` datetime DEFAULT NULL, + `datef` date DEFAULT NULL, + `cotisation` double DEFAULT NULL, + `fk_bank` int(11) DEFAULT NULL, + `note` text, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_cotisation` (`fk_adherent`,`dateadh`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_cotisation` +-- + +LOCK TABLES `llx_cotisation` WRITE; +/*!40000 ALTER TABLE `llx_cotisation` DISABLE KEYS */; +INSERT INTO `llx_cotisation` (`rowid`, `tms`, `datec`, `fk_adherent`, `dateadh`, `datef`, `cotisation`, `fk_bank`, `note`) VALUES (1,'2010-07-10 13:05:30','2010-07-10 15:05:30',2,'2010-07-10 00:00:00','2011-07-10',20,NULL,'Adhésion/cotisation 2010'),(2,'2010-07-11 14:20:00','2010-07-11 16:20:00',2,'2011-07-11 00:00:00','2012-07-10',10,NULL,'Adhésion/cotisation 2011'),(3,'2010-07-18 10:20:33','2010-07-18 12:20:33',2,'2012-07-11 00:00:00','2013-07-17',10,NULL,'Adhésion/cotisation 2012'); +/*!40000 ALTER TABLE `llx_cotisation` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_deplacement` +-- + +DROP TABLE IF EXISTS `llx_deplacement`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_deplacement` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(30) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `datec` datetime NOT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `dated` datetime DEFAULT NULL, + `fk_user` int(11) NOT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + `type` varchar(12) NOT NULL, + `fk_statut` int(11) NOT NULL DEFAULT '1', + `km` double DEFAULT NULL, + `fk_soc` int(11) DEFAULT NULL, + `fk_projet` int(11) DEFAULT '0', + `note` text, + `note_public` text, + `extraparams` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_deplacement` +-- + +LOCK TABLES `llx_deplacement` WRITE; +/*!40000 ALTER TABLE `llx_deplacement` DISABLE KEYS */; +INSERT INTO `llx_deplacement` (`rowid`, `ref`, `entity`, `datec`, `tms`, `dated`, `fk_user`, `fk_user_author`, `fk_user_modif`, `type`, `fk_statut`, `km`, `fk_soc`, `fk_projet`, `note`, `note_public`, `extraparams`) VALUES (1,NULL,1,'2010-07-09 01:58:04','2010-07-08 23:58:18','2010-07-09 12:00:00',2,1,NULL,'TF_LUNCH',1,10,2,1,NULL,NULL,NULL); +/*!40000 ALTER TABLE `llx_deplacement` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_document` +-- + +DROP TABLE IF EXISTS `llx_document`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_document` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `file_name` varchar(255) NOT NULL, + `file_extension` varchar(5) NOT NULL, + `date_generation` datetime DEFAULT NULL, + `fk_owner` int(11) DEFAULT NULL, + `fk_group` int(11) DEFAULT NULL, + `permissions` char(9) DEFAULT 'rw-rw-rw', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_document` +-- + +LOCK TABLES `llx_document` WRITE; +/*!40000 ALTER TABLE `llx_document` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_document` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_document_generator` +-- + +DROP TABLE IF EXISTS `llx_document_generator`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_document_generator` ( + `rowid` int(10) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `classfile` varchar(255) NOT NULL, + `class` varchar(255) NOT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_document_generator` +-- + +LOCK TABLES `llx_document_generator` WRITE; +/*!40000 ALTER TABLE `llx_document_generator` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_document_generator` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_document_model` +-- + +DROP TABLE IF EXISTS `llx_document_model`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_document_model` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `nom` varchar(50) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `type` varchar(20) NOT NULL, + `libelle` varchar(255) DEFAULT NULL, + `description` text, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_document_model` (`nom`,`type`,`entity`) +) ENGINE=InnoDB AUTO_INCREMENT=136 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_document_model` +-- + +LOCK TABLES `llx_document_model` WRITE; +/*!40000 ALTER TABLE `llx_document_model` DISABLE KEYS */; +INSERT INTO `llx_document_model` (`rowid`, `nom`, `entity`, `type`, `libelle`, `description`) VALUES (9,'merou',1,'shipping',NULL,NULL),(15,'fsfe.fr.php',1,'donation',NULL,NULL),(21,'baleine',1,'project',NULL,NULL),(27,'typhon',1,'delivery',NULL,NULL),(101,'azur',1,'propal',NULL,NULL),(102,'rouget',1,'shipping',NULL,NULL),(103,'elevement',1,'delivery',NULL,NULL),(105,'soleil',1,'ficheinter',NULL,NULL),(123,'einstein',1,'order',NULL,NULL),(124,'crabe',1,'invoice',NULL,NULL),(125,'muscadet',1,'order_supplier',NULL,NULL),(126,'html_cerfafr',1,'donation',NULL,NULL); +/*!40000 ALTER TABLE `llx_document_model` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_dolibarr_modules` +-- + +DROP TABLE IF EXISTS `llx_dolibarr_modules`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_dolibarr_modules` ( + `numero` int(11) NOT NULL DEFAULT '0', + `entity` int(11) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT '0', + `active_date` datetime NOT NULL, + `active_version` varchar(25) NOT NULL, + PRIMARY KEY (`numero`,`entity`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_dolibarr_modules` +-- + +LOCK TABLES `llx_dolibarr_modules` WRITE; +/*!40000 ALTER TABLE `llx_dolibarr_modules` DISABLE KEYS */; +INSERT INTO `llx_dolibarr_modules` (`numero`, `entity`, `active`, `active_date`, `active_version`) VALUES (0,1,1,'2012-04-11 12:04:58','dolibarr'),(1,1,1,'2012-04-11 12:04:58','dolibarr'),(10,1,1,'2011-08-05 22:40:33','dolibarr'),(20,1,1,'2011-08-05 22:40:22','dolibarr'),(22,1,1,'2010-07-08 13:29:37','dolibarr'),(25,1,1,'2012-04-11 12:04:58','dolibarr'),(30,1,1,'2012-04-11 12:04:58','dolibarr'),(40,1,1,'2012-04-11 12:04:58','dolibarr'),(42,1,1,'2011-07-20 13:36:47','dolibarr'),(50,1,1,'2011-07-18 19:30:24','dolibarr'),(52,1,1,'2010-07-08 13:29:18','dolibarr'),(53,1,1,'2012-04-11 12:04:58','dolibarr'),(54,1,1,'2011-08-05 22:40:27','dolibarr'),(57,1,1,'2011-07-18 20:01:59','dolibarr'),(70,1,1,'2011-08-05 22:40:30','dolibarr'),(75,1,1,'2012-04-11 12:04:58','dolibarr'),(80,1,1,'2011-08-05 22:40:24','dolibarr'),(85,1,1,'2011-08-05 22:40:34','dolibarr'),(240,1,1,'2010-07-08 13:29:41','dolibarr'),(250,1,1,'2010-07-08 13:29:45','dolibarr'),(310,1,1,'2010-07-08 13:29:05','dolibarr'),(320,1,1,'2010-07-08 13:30:38','dolibarr'),(330,1,1,'2010-07-08 13:30:03','dolibarr'),(400,1,1,'2010-07-11 15:26:54','dolibarr'),(500,1,1,'2011-08-05 19:54:19','dolibarr'),(700,1,1,'2012-04-11 12:04:58','dolibarr'),(1780,1,1,'2010-07-08 13:29:59','dolibarr'),(2000,1,1,'2010-07-08 13:56:27','dolibarr'),(2400,1,1,'2012-04-11 12:04:58','dolibarr'),(2500,1,1,'2012-04-11 12:04:58','dolibarr'),(2600,1,1,'2010-07-08 13:30:30','dolibarr'),(2900,1,1,'2010-07-08 13:30:36','dolibarr'),(6000,1,1,'2011-07-18 20:02:20','dolibarr'),(10000,1,1,'2010-07-10 01:40:33','dolibarr'),(11000,1,1,'2011-07-18 23:20:54','3.1'),(50100,1,1,'2011-07-18 19:30:24','dolibarr'),(102000,1,1,'2011-08-01 23:48:06','1.0'); +/*!40000 ALTER TABLE `llx_dolibarr_modules` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_domain` +-- + +DROP TABLE IF EXISTS `llx_domain`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_domain` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `note` text, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_domain` +-- + +LOCK TABLES `llx_domain` WRITE; +/*!40000 ALTER TABLE `llx_domain` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_domain` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_don` +-- + +DROP TABLE IF EXISTS `llx_don`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_don` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(30) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_statut` smallint(6) NOT NULL DEFAULT '0', + `datec` datetime DEFAULT NULL, + `datedon` datetime DEFAULT NULL, + `amount` double DEFAULT '0', + `fk_paiement` int(11) DEFAULT NULL, + `prenom` varchar(50) DEFAULT NULL, + `nom` varchar(50) DEFAULT NULL, + `societe` varchar(50) DEFAULT NULL, + `adresse` text, + `cp` varchar(30) DEFAULT NULL, + `ville` varchar(50) DEFAULT NULL, + `pays` varchar(50) DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `phone` varchar(24) DEFAULT NULL, + `phone_mobile` varchar(24) DEFAULT NULL, + `public` smallint(6) NOT NULL DEFAULT '1', + `fk_don_projet` int(11) DEFAULT NULL, + `fk_user_author` int(11) NOT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `note` text, + `note_public` text, + `model_pdf` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_don` +-- + +LOCK TABLES `llx_don` WRITE; +/*!40000 ALTER TABLE `llx_don` DISABLE KEYS */; +INSERT INTO `llx_don` (`rowid`, `ref`, `entity`, `tms`, `fk_statut`, `datec`, `datedon`, `amount`, `fk_paiement`, `prenom`, `nom`, `societe`, `adresse`, `cp`, `ville`, `pays`, `email`, `phone`, `phone_mobile`, `public`, `fk_don_projet`, `fk_user_author`, `fk_user_valid`, `note`, `note_public`, `model_pdf`, `import_key`) VALUES (1,NULL,1,'2010-07-08 23:57:17',1,'2010-07-09 01:55:33','2010-07-09 12:00:00',10,1,'Donator','','Guest company','','','','France','',NULL,NULL,1,1,1,1,'',NULL,'html_cerfafr',NULL); +/*!40000 ALTER TABLE `llx_don` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_ecm_directories` +-- + +DROP TABLE IF EXISTS `llx_ecm_directories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_ecm_directories` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `label` varchar(32) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `fk_parent` int(11) DEFAULT NULL, + `description` varchar(255) NOT NULL, + `cachenbofdoc` int(11) NOT NULL DEFAULT '0', + `date_c` datetime DEFAULT NULL, + `date_m` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_user_c` int(11) DEFAULT NULL, + `fk_user_m` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_ecm_directories` (`label`,`fk_parent`,`entity`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_ecm_directories` +-- + +LOCK TABLES `llx_ecm_directories` WRITE; +/*!40000 ALTER TABLE `llx_ecm_directories` DISABLE KEYS */; +INSERT INTO `llx_ecm_directories` (`rowid`, `label`, `entity`, `fk_parent`, `description`, `cachenbofdoc`, `date_c`, `date_m`, `fk_user_c`, `fk_user_m`) VALUES (1,'Répertoire_1',1,0,'',1,'2010-07-11 16:27:26','2010-07-11 14:27:44',1,NULL); +/*!40000 ALTER TABLE `llx_ecm_directories` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_ecm_documents` +-- + +DROP TABLE IF EXISTS `llx_ecm_documents`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_ecm_documents` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(16) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `filename` varchar(255) NOT NULL, + `filesize` int(11) NOT NULL, + `filemime` varchar(32) NOT NULL, + `fullpath_dol` varchar(255) NOT NULL, + `fullpath_orig` varchar(255) NOT NULL, + `description` text, + `manualkeyword` text, + `fk_create` int(11) NOT NULL, + `fk_update` int(11) DEFAULT NULL, + `date_c` datetime NOT NULL, + `date_u` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_directory` int(11) DEFAULT NULL, + `fk_status` smallint(6) DEFAULT '0', + `private` smallint(6) DEFAULT '0', + `crc` varchar(32) NOT NULL DEFAULT '', + `cryptkey` varchar(50) NOT NULL DEFAULT '', + `cipher` varchar(50) NOT NULL DEFAULT 'twofish', + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_ecm_documents` (`fullpath_dol`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_ecm_documents` +-- + +LOCK TABLES `llx_ecm_documents` WRITE; +/*!40000 ALTER TABLE `llx_ecm_documents` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_ecm_documents` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_element_contact` +-- + +DROP TABLE IF EXISTS `llx_element_contact`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_element_contact` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datecreate` datetime DEFAULT NULL, + `statut` smallint(6) DEFAULT '5', + `element_id` int(11) NOT NULL, + `fk_c_type_contact` int(11) NOT NULL, + `fk_socpeople` int(11) NOT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_element_contact_idx1` (`element_id`,`fk_c_type_contact`,`fk_socpeople`), + KEY `fk_element_contact_fk_c_type_contact` (`fk_c_type_contact`), + KEY `idx_element_contact_fk_socpeople` (`fk_socpeople`), + CONSTRAINT `fk_element_contact_fk_c_type_contact` FOREIGN KEY (`fk_c_type_contact`) REFERENCES `llx_c_type_contact` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_element_contact` +-- + +LOCK TABLES `llx_element_contact` WRITE; +/*!40000 ALTER TABLE `llx_element_contact` DISABLE KEYS */; +INSERT INTO `llx_element_contact` (`rowid`, `datecreate`, `statut`, `element_id`, `fk_c_type_contact`, `fk_socpeople`) VALUES (1,'2010-07-09 00:49:43',4,1,160,1),(2,'2010-07-09 00:49:56',4,2,160,1),(3,'2010-07-09 00:50:19',4,3,160,1),(4,'2010-07-09 00:50:42',4,4,160,1),(5,'2010-07-09 01:52:36',4,1,120,1),(6,'2010-07-09 01:53:25',4,1,10,2),(7,'2010-07-09 01:53:25',4,1,11,2),(8,'2010-07-10 18:13:37',4,2,10,2),(9,'2010-07-10 18:13:37',4,2,11,2),(10,'2010-07-11 15:15:55',4,1,180,1),(11,'2010-07-11 16:22:36',4,5,160,1),(12,'2010-07-11 16:23:53',4,2,180,1); +/*!40000 ALTER TABLE `llx_element_contact` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_element_element` +-- + +DROP TABLE IF EXISTS `llx_element_element`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_element_element` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_source` int(11) NOT NULL, + `sourcetype` varchar(32) NOT NULL, + `fk_target` int(11) NOT NULL, + `targettype` varchar(32) NOT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_element_element_idx1` (`fk_source`,`sourcetype`,`fk_target`,`targettype`), + KEY `idx_element_element_fk_target` (`fk_target`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_element_element` +-- + +LOCK TABLES `llx_element_element` WRITE; +/*!40000 ALTER TABLE `llx_element_element` DISABLE KEYS */; +INSERT INTO `llx_element_element` (`rowid`, `fk_source`, `sourcetype`, `fk_target`, `targettype`) VALUES (1,2,'contrat',2,'facture'),(2,2,'propal',1,'commande'),(3,5,'commande',1,'shipping'); +/*!40000 ALTER TABLE `llx_element_element` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_element_lock` +-- + +DROP TABLE IF EXISTS `llx_element_lock`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_element_lock` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_element` int(11) NOT NULL, + `elementtype` varchar(16) NOT NULL, + `datel` datetime DEFAULT NULL, + `datem` datetime DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + `status` tinyint(4) DEFAULT '0', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_element_lock` +-- + +LOCK TABLES `llx_element_lock` WRITE; +/*!40000 ALTER TABLE `llx_element_lock` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_element_lock` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_element_rang` +-- + +DROP TABLE IF EXISTS `llx_element_rang`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_element_rang` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_parent` int(11) NOT NULL, + `parenttype` varchar(16) NOT NULL, + `fk_child` int(11) NOT NULL, + `childtype` varchar(16) NOT NULL, + `rang` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_element_rang_idx1` (`fk_parent`,`parenttype`,`fk_child`,`childtype`), + KEY `idx_element_rang_fk_parent` (`fk_parent`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_element_rang` +-- + +LOCK TABLES `llx_element_rang` WRITE; +/*!40000 ALTER TABLE `llx_element_rang` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_element_rang` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_entity` +-- + +DROP TABLE IF EXISTS `llx_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_entity` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `label` varchar(255) NOT NULL, + `description` text, + `datec` datetime DEFAULT NULL, + `fk_user_creat` int(11) DEFAULT NULL, + `visible` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_entity` +-- + +LOCK TABLES `llx_entity` WRITE; +/*!40000 ALTER TABLE `llx_entity` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_entrepot` +-- + +DROP TABLE IF EXISTS `llx_entrepot`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_entrepot` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `label` varchar(255) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `description` text, + `lieu` varchar(64) DEFAULT NULL, + `address` varchar(255) DEFAULT NULL, + `cp` varchar(10) DEFAULT NULL, + `ville` varchar(50) DEFAULT NULL, + `fk_departement` int(11) DEFAULT NULL, + `fk_pays` int(11) DEFAULT '0', + `statut` tinyint(4) DEFAULT '1', + `valo_pmp` float(12,4) DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_entrepot_label` (`label`,`entity`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_entrepot` +-- + +LOCK TABLES `llx_entrepot` WRITE; +/*!40000 ALTER TABLE `llx_entrepot` DISABLE KEYS */; +INSERT INTO `llx_entrepot` (`rowid`, `datec`, `tms`, `label`, `entity`, `description`, `lieu`, `address`, `cp`, `ville`, `fk_departement`, `fk_pays`, `statut`, `valo_pmp`, `fk_user_author`) VALUES (1,'2010-07-09 00:31:22','2010-07-08 22:40:36','WAREHOUSEHOUSTON',1,'Warehouse located at Houston','Warehouse houston','','','Houston',NULL,11,1,NULL,1),(2,'2010-07-09 00:41:03','2010-07-08 22:41:03','WAREHOUSEPARIS',1,'
','Warehouse Paris','','75000','Paris',NULL,1,1,NULL,1),(3,'2010-07-11 16:18:59','2010-07-11 14:18:59','Stock personnel Dupont',1,'Cet entrepôt représente le stock personnel de Alain Dupont','','','','',NULL,0,1,NULL,1); +/*!40000 ALTER TABLE `llx_entrepot` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_events` +-- + +DROP TABLE IF EXISTS `llx_events`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_events` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `type` varchar(32) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `dateevent` datetime DEFAULT NULL, + `fk_user` int(11) DEFAULT NULL, + `description` varchar(250) NOT NULL, + `ip` varchar(32) NOT NULL, + `user_agent` varchar(255) DEFAULT NULL, + `fk_object` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_events_dateevent` (`dateevent`) +) ENGINE=InnoDB AUTO_INCREMENT=133 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_events` +-- + +LOCK TABLES `llx_events` WRITE; +/*!40000 ALTER TABLE `llx_events` DISABLE KEYS */; +INSERT INTO `llx_events` (`rowid`, `tms`, `type`, `entity`, `dateevent`, `fk_user`, `description`, `ip`, `user_agent`, `fk_object`) VALUES (30,'2011-07-18 18:23:06','USER_LOGOUT',1,'2011-07-18 20:23:06',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(31,'2011-07-18 18:23:12','USER_LOGIN_FAILED',1,'2011-07-18 20:23:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(32,'2011-07-18 18:23:17','USER_LOGIN',1,'2011-07-18 20:23:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(33,'2011-07-18 20:10:51','USER_LOGIN_FAILED',1,'2011-07-18 22:10:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(34,'2011-07-18 20:10:55','USER_LOGIN',1,'2011-07-18 22:10:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(35,'2011-07-18 21:18:57','USER_LOGIN',1,'2011-07-18 23:18:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(36,'2011-07-20 10:34:10','USER_LOGIN',1,'2011-07-20 12:34:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(37,'2011-07-20 12:36:44','USER_LOGIN',1,'2011-07-20 14:36:44',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(38,'2011-07-20 13:20:51','USER_LOGIN_FAILED',1,'2011-07-20 15:20:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(39,'2011-07-20 13:20:54','USER_LOGIN',1,'2011-07-20 15:20:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(40,'2011-07-20 15:03:46','USER_LOGIN_FAILED',1,'2011-07-20 17:03:46',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(41,'2011-07-20 15:03:55','USER_LOGIN',1,'2011-07-20 17:03:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(42,'2011-07-20 18:05:05','USER_LOGIN_FAILED',1,'2011-07-20 20:05:05',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(43,'2011-07-20 18:05:08','USER_LOGIN',1,'2011-07-20 20:05:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(44,'2011-07-20 21:08:53','USER_LOGIN_FAILED',1,'2011-07-20 23:08:53',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(45,'2011-07-20 21:08:56','USER_LOGIN',1,'2011-07-20 23:08:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(46,'2011-07-21 01:26:12','USER_LOGIN',1,'2011-07-21 03:26:12',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(47,'2011-07-21 22:35:45','USER_LOGIN_FAILED',1,'2011-07-22 00:35:45',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(48,'2011-07-21 22:35:49','USER_LOGIN',1,'2011-07-22 00:35:49',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(49,'2011-07-26 23:09:47','USER_LOGIN_FAILED',1,'2011-07-27 01:09:47',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(50,'2011-07-26 23:09:50','USER_LOGIN',1,'2011-07-27 01:09:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(51,'2011-07-27 17:02:27','USER_LOGIN_FAILED',1,'2011-07-27 19:02:27',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(52,'2011-07-27 17:02:32','USER_LOGIN',1,'2011-07-27 19:02:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(53,'2011-07-27 23:33:37','USER_LOGIN_FAILED',1,'2011-07-28 01:33:37',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(54,'2011-07-27 23:33:41','USER_LOGIN',1,'2011-07-28 01:33:41',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(55,'2011-07-28 18:20:36','USER_LOGIN_FAILED',1,'2011-07-28 20:20:36',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(56,'2011-07-28 18:20:38','USER_LOGIN',1,'2011-07-28 20:20:38',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(57,'2011-07-28 20:13:30','USER_LOGIN_FAILED',1,'2011-07-28 22:13:30',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(58,'2011-07-28 20:13:34','USER_LOGIN',1,'2011-07-28 22:13:34',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(59,'2011-07-28 20:22:51','USER_LOGIN',1,'2011-07-28 22:22:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(60,'2011-07-28 23:05:06','USER_LOGIN',1,'2011-07-29 01:05:06',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(61,'2011-07-29 20:15:50','USER_LOGIN_FAILED',1,'2011-07-29 22:15:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(62,'2011-07-29 20:15:53','USER_LOGIN',1,'2011-07-29 22:15:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(68,'2011-07-29 20:51:01','USER_LOGOUT',1,'2011-07-29 22:51:01',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(69,'2011-07-29 20:51:05','USER_LOGIN',1,'2011-07-29 22:51:05',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(70,'2011-07-30 08:46:20','USER_LOGIN_FAILED',1,'2011-07-30 10:46:20',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(71,'2011-07-30 08:46:38','USER_LOGIN_FAILED',1,'2011-07-30 10:46:38',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(72,'2011-07-30 08:46:42','USER_LOGIN',1,'2011-07-30 10:46:42',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(73,'2011-07-30 10:05:12','USER_LOGIN_FAILED',1,'2011-07-30 12:05:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(74,'2011-07-30 10:05:15','USER_LOGIN',1,'2011-07-30 12:05:15',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(75,'2011-07-30 12:15:46','USER_LOGIN',1,'2011-07-30 14:15:46',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(76,'2011-07-31 22:19:30','USER_LOGIN',1,'2011-08-01 00:19:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(77,'2011-07-31 23:32:52','USER_LOGIN',1,'2011-08-01 01:32:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(78,'2011-08-01 01:24:50','USER_LOGIN_FAILED',1,'2011-08-01 03:24:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(79,'2011-08-01 01:24:54','USER_LOGIN',1,'2011-08-01 03:24:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(80,'2011-08-01 19:31:36','USER_LOGIN_FAILED',1,'2011-08-01 21:31:35',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(81,'2011-08-01 19:31:39','USER_LOGIN',1,'2011-08-01 21:31:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(82,'2011-08-01 20:01:36','USER_LOGIN',1,'2011-08-01 22:01:36',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(83,'2011-08-01 20:52:54','USER_LOGIN_FAILED',1,'2011-08-01 22:52:54',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(84,'2011-08-01 20:52:58','USER_LOGIN',1,'2011-08-01 22:52:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(85,'2011-08-01 21:17:28','USER_LOGIN_FAILED',1,'2011-08-01 23:17:28',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(86,'2011-08-01 21:17:31','USER_LOGIN',1,'2011-08-01 23:17:31',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(87,'2011-08-04 11:55:17','USER_LOGIN',1,'2011-08-04 13:55:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(88,'2011-08-04 20:19:03','USER_LOGIN_FAILED',1,'2011-08-04 22:19:03',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(89,'2011-08-04 20:19:07','USER_LOGIN',1,'2011-08-04 22:19:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(90,'2011-08-05 17:51:42','USER_LOGIN_FAILED',1,'2011-08-05 19:51:42',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(91,'2011-08-05 17:51:47','USER_LOGIN',1,'2011-08-05 19:51:47',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(92,'2011-08-05 17:56:03','USER_LOGIN',1,'2011-08-05 19:56:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(93,'2011-08-05 17:59:10','USER_LOGIN',1,'2011-08-05 19:59:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL),(94,'2011-08-05 18:01:58','USER_LOGIN',1,'2011-08-05 20:01:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL),(95,'2011-08-05 19:59:56','USER_LOGIN',1,'2011-08-05 21:59:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(96,'2011-08-06 18:33:22','USER_LOGIN',1,'2011-08-06 20:33:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(97,'2011-08-07 00:56:59','USER_LOGIN',1,'2011-08-07 02:56:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(98,'2011-08-07 22:49:14','USER_LOGIN',1,'2011-08-08 00:49:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(99,'2011-08-07 23:05:18','USER_LOGOUT',1,'2011-08-08 01:05:18',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(105,'2011-08-08 00:41:09','USER_LOGIN',1,'2011-08-08 02:41:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(106,'2011-08-08 11:58:55','USER_LOGIN',1,'2011-08-08 13:58:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(107,'2011-08-08 14:35:48','USER_LOGIN',1,'2011-08-08 16:35:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(108,'2011-08-08 14:36:31','USER_LOGOUT',1,'2011-08-08 16:36:31',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(109,'2011-08-08 14:38:28','USER_LOGIN',1,'2011-08-08 16:38:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(110,'2011-08-08 14:39:02','USER_LOGOUT',1,'2011-08-08 16:39:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(111,'2011-08-08 14:39:10','USER_LOGIN',1,'2011-08-08 16:39:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(112,'2011-08-08 14:39:28','USER_LOGOUT',1,'2011-08-08 16:39:28',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(113,'2011-08-08 14:39:37','USER_LOGIN',1,'2011-08-08 16:39:37',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(114,'2011-08-08 14:50:02','USER_LOGOUT',1,'2011-08-08 16:50:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(115,'2011-08-08 14:51:45','USER_LOGIN_FAILED',1,'2011-08-08 16:51:45',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(116,'2011-08-08 14:51:52','USER_LOGIN',1,'2011-08-08 16:51:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(117,'2011-08-08 15:09:54','USER_LOGOUT',1,'2011-08-08 17:09:54',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(118,'2011-08-08 15:10:19','USER_LOGIN_FAILED',1,'2011-08-08 17:10:19',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(119,'2011-08-08 15:10:28','USER_LOGIN',1,'2011-08-08 17:10:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(121,'2011-08-08 15:14:58','USER_LOGOUT',1,'2011-08-08 17:14:58',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(122,'2011-08-08 15:15:00','USER_LOGIN_FAILED',1,'2011-08-08 17:15:00',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(123,'2011-08-08 15:17:57','USER_LOGIN',1,'2011-08-08 17:17:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(124,'2011-08-08 15:35:56','USER_LOGOUT',1,'2011-08-08 17:35:56',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(125,'2011-08-08 15:36:05','USER_LOGIN',1,'2011-08-08 17:36:05',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(126,'2011-08-08 17:32:42','USER_LOGIN',1,'2011-08-08 19:32:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(127,'2012-04-11 10:05:03','USER_LOGIN',1,'2012-04-11 12:05:03',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.83 Safari/535.11',NULL); +/*!40000 ALTER TABLE `llx_events` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_expedition` +-- + +DROP TABLE IF EXISTS `llx_expedition`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_expedition` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `ref` varchar(30) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `ref_customer` varchar(30) DEFAULT NULL, + `fk_soc` int(11) NOT NULL, + `ref_ext` varchar(30) DEFAULT NULL, + `ref_int` varchar(30) DEFAULT NULL, + `date_creation` datetime DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `date_valid` datetime DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `date_expedition` datetime DEFAULT NULL, + `date_delivery` datetime DEFAULT NULL, + `fk_address` int(11) DEFAULT NULL, + `fk_expedition_methode` int(11) DEFAULT NULL, + `tracking_number` varchar(50) DEFAULT NULL, + `fk_statut` smallint(6) DEFAULT '0', + `height` int(11) DEFAULT NULL, + `width` int(11) DEFAULT NULL, + `size_units` int(11) DEFAULT NULL, + `size` int(11) DEFAULT NULL, + `weight_units` int(11) DEFAULT NULL, + `weight` int(11) DEFAULT NULL, + `note` text, + `model_pdf` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_expedition_uk_ref` (`ref`,`entity`), + KEY `idx_expedition_fk_soc` (`fk_soc`), + KEY `idx_expedition_fk_user_author` (`fk_user_author`), + KEY `idx_expedition_fk_user_valid` (`fk_user_valid`), + KEY `idx_expedition_fk_expedition_methode` (`fk_expedition_methode`), + CONSTRAINT `fk_expedition_fk_expedition_methode` FOREIGN KEY (`fk_expedition_methode`) REFERENCES `llx_c_shipment_mode` (`rowid`), + CONSTRAINT `fk_expedition_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), + CONSTRAINT `fk_expedition_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), + CONSTRAINT `fk_expedition_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_expedition` +-- + +LOCK TABLES `llx_expedition` WRITE; +/*!40000 ALTER TABLE `llx_expedition` DISABLE KEYS */; +INSERT INTO `llx_expedition` (`rowid`, `tms`, `ref`, `entity`, `ref_customer`, `fk_soc`, `ref_ext`, `ref_int`, `date_creation`, `fk_user_author`, `date_valid`, `fk_user_valid`, `date_expedition`, `date_delivery`, `fk_address`, `fk_expedition_methode`, `tracking_number`, `fk_statut`, `height`, `width`, `size_units`, `size`, `weight_units`, `weight`, `note`, `model_pdf`) VALUES (1,'2011-08-08 01:05:34','(PROV1)',1,NULL,1,NULL,NULL,'2011-08-08 03:05:34',1,NULL,NULL,NULL,'2011-08-09 00:00:00',NULL,NULL,'',0,NULL,NULL,0,NULL,0,NULL,NULL,NULL); +/*!40000 ALTER TABLE `llx_expedition` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_expedition_methode` +-- + +DROP TABLE IF EXISTS `llx_expedition_methode`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_expedition_methode` ( + `rowid` int(11) NOT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `code` varchar(30) NOT NULL, + `libelle` varchar(50) NOT NULL, + `description` text, + `active` tinyint(4) DEFAULT '0', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_expedition_methode` +-- + +LOCK TABLES `llx_expedition_methode` WRITE; +/*!40000 ALTER TABLE `llx_expedition_methode` DISABLE KEYS */; +INSERT INTO `llx_expedition_methode` (`rowid`, `tms`, `code`, `libelle`, `description`, `active`) VALUES (1,'2010-07-08 11:18:00','CATCH','Catch','Catch by client',1),(2,'2010-07-08 11:18:00','TRANS','Transporter','Generic transporter',1),(3,'2010-07-08 11:18:01','COLSUI','Colissimo Suivi','Colissimo Suivi',0); +/*!40000 ALTER TABLE `llx_expedition_methode` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_expeditiondet` +-- + +DROP TABLE IF EXISTS `llx_expeditiondet`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_expeditiondet` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_expedition` int(11) NOT NULL, + `fk_origin_line` int(11) DEFAULT NULL, + `fk_entrepot` int(11) DEFAULT NULL, + `qty` double DEFAULT NULL, + `rang` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`), + KEY `idx_expeditiondet_fk_expedition` (`fk_expedition`), + CONSTRAINT `fk_expeditiondet_fk_expedition` FOREIGN KEY (`fk_expedition`) REFERENCES `llx_expedition` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_expeditiondet` +-- + +LOCK TABLES `llx_expeditiondet` WRITE; +/*!40000 ALTER TABLE `llx_expeditiondet` DISABLE KEYS */; +INSERT INTO `llx_expeditiondet` (`rowid`, `fk_expedition`, `fk_origin_line`, `fk_entrepot`, `qty`, `rang`) VALUES (1,1,10,3,1,0); +/*!40000 ALTER TABLE `llx_expeditiondet` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_export_compta` +-- + +DROP TABLE IF EXISTS `llx_export_compta`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_export_compta` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(12) NOT NULL, + `date_export` datetime NOT NULL, + `fk_user` int(11) NOT NULL, + `note` text, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_export_compta` +-- + +LOCK TABLES `llx_export_compta` WRITE; +/*!40000 ALTER TABLE `llx_export_compta` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_export_compta` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_export_model` +-- + +DROP TABLE IF EXISTS `llx_export_model`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_export_model` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_user` int(11) NOT NULL DEFAULT '0', + `label` varchar(50) NOT NULL, + `type` varchar(20) NOT NULL, + `field` text NOT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_export_model` (`label`,`type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_export_model` +-- + +LOCK TABLES `llx_export_model` WRITE; +/*!40000 ALTER TABLE `llx_export_model` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_export_model` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_extrafields` +-- + +DROP TABLE IF EXISTS `llx_extrafields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_extrafields` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `elementtype` varchar(64) NOT NULL DEFAULT 'member', + `name` varchar(64) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `label` varchar(255) NOT NULL, + `type` varchar(8) DEFAULT NULL, + `size` int(11) DEFAULT '0', + `pos` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_extrafields_name` (`name`,`entity`,`elementtype`) +) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_extrafields` +-- + +LOCK TABLES `llx_extrafields` WRITE; +/*!40000 ALTER TABLE `llx_extrafields` DISABLE KEYS */; +INSERT INTO `llx_extrafields` (`rowid`, `elementtype`, `name`, `entity`, `tms`, `label`, `type`, `size`, `pos`) VALUES (2,'member','zzz',1,'2011-06-19 11:55:40','zzz','varchar',255,0),(22,'company','jjjj',1,'2011-06-22 16:10:02','jjj','varchar',255,0); +/*!40000 ALTER TABLE `llx_extrafields` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_facture` +-- + +DROP TABLE IF EXISTS `llx_facture`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_facture` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `facnumber` varchar(30) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `ref_ext` varchar(255) DEFAULT NULL, + `ref_int` varchar(255) DEFAULT NULL, + `type` smallint(6) NOT NULL DEFAULT '0', + `ref_client` varchar(255) DEFAULT NULL, + `increment` varchar(10) DEFAULT NULL, + `fk_soc` int(11) NOT NULL, + `datec` datetime DEFAULT NULL, + `datef` date DEFAULT NULL, + `date_valid` date DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `paye` smallint(6) NOT NULL DEFAULT '0', + `amount` double(24,8) NOT NULL DEFAULT '0.00000000', + `remise_percent` double DEFAULT '0', + `remise_absolue` double DEFAULT '0', + `remise` double DEFAULT '0', + `close_code` varchar(16) DEFAULT NULL, + `close_note` varchar(128) DEFAULT NULL, + `tva` double(24,8) DEFAULT '0.00000000', + `localtax1` double(24,8) DEFAULT '0.00000000', + `localtax2` double(24,8) DEFAULT '0.00000000', + `total` double(24,8) DEFAULT '0.00000000', + `total_ttc` double(24,8) DEFAULT '0.00000000', + `fk_statut` smallint(6) NOT NULL DEFAULT '0', + `fk_user_author` int(11) DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `fk_facture_source` int(11) DEFAULT NULL, + `fk_projet` int(11) DEFAULT NULL, + `fk_account` int(11) DEFAULT NULL, + `fk_currency` varchar(2) DEFAULT NULL, + `fk_cond_reglement` int(11) NOT NULL DEFAULT '1', + `fk_mode_reglement` int(11) DEFAULT NULL, + `date_lim_reglement` date DEFAULT NULL, + `note` text, + `note_public` text, + `model_pdf` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_facture_uk_facnumber` (`facnumber`,`entity`), + KEY `idx_facture_fk_soc` (`fk_soc`), + KEY `idx_facture_fk_user_author` (`fk_user_author`), + KEY `idx_facture_fk_user_valid` (`fk_user_valid`), + KEY `idx_facture_fk_facture_source` (`fk_facture_source`), + KEY `idx_facture_fk_projet` (`fk_projet`), + KEY `idx_facture_fk_account` (`fk_account`), + KEY `idx_facture_fk_currency` (`fk_currency`), + CONSTRAINT `fk_facture_fk_currency` FOREIGN KEY (`fk_currency`) REFERENCES `llx_c_currencies` (`code_iso`), + CONSTRAINT `fk_facture_fk_facture_source` FOREIGN KEY (`fk_facture_source`) REFERENCES `llx_facture` (`rowid`), + CONSTRAINT `fk_facture_fk_projet` FOREIGN KEY (`fk_projet`) REFERENCES `llx_projet` (`rowid`), + CONSTRAINT `fk_facture_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), + CONSTRAINT `fk_facture_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), + CONSTRAINT `fk_facture_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_facture` +-- + +LOCK TABLES `llx_facture` WRITE; +/*!40000 ALTER TABLE `llx_facture` DISABLE KEYS */; +INSERT INTO `llx_facture` (`rowid`, `facnumber`, `entity`, `ref_ext`, `ref_int`, `type`, `ref_client`, `increment`, `fk_soc`, `datec`, `datef`, `date_valid`, `tms`, `paye`, `amount`, `remise_percent`, `remise_absolue`, `remise`, `close_code`, `close_note`, `tva`, `localtax1`, `localtax2`, `total`, `total_ttc`, `fk_statut`, `fk_user_author`, `fk_user_valid`, `fk_facture_source`, `fk_projet`, `fk_account`, `fk_currency`, `fk_cond_reglement`, `fk_mode_reglement`, `date_lim_reglement`, `note`, `note_public`, `model_pdf`, `import_key`, `extraparams`) VALUES (1,'FA1007-0001',1,NULL,NULL,0,NULL,NULL,9,'2010-07-10 14:55:26','2010-07-10',NULL,'2011-07-20 11:18:39',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.02000000,0.02000000,1,1,1,NULL,1,NULL,NULL,1,0,'2010-07-10',NULL,NULL,'crabe',NULL,NULL),(2,'FA1007-0002',1,NULL,NULL,0,NULL,NULL,2,'2010-07-10 18:20:13','2010-07-10',NULL,'2011-08-08 00:54:05',1,10.00000000,NULL,NULL,0,NULL,NULL,0.10000000,0.00000000,0.00000000,46.00000000,46.10000000,2,1,1,NULL,NULL,NULL,NULL,1,0,'2010-07-10',NULL,NULL,'crabe',NULL,NULL),(3,'FA1107-0006',1,NULL,NULL,0,NULL,NULL,10,'2011-07-18 20:33:35','2011-07-18',NULL,'2011-08-08 00:55:58',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,15.00000000,15.00000000,2,1,1,NULL,NULL,NULL,NULL,1,0,'2011-07-18',NULL,NULL,'crabe',NULL,NULL),(5,'FA1108-0003',1,NULL,NULL,0,NULL,NULL,7,'2011-08-01 03:34:11','2011-08-01',NULL,'2011-08-01 01:34:11',1,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,5.00000000,5.63000000,2,1,1,NULL,NULL,NULL,NULL,0,6,'2011-08-01',NULL,NULL,'',NULL,NULL),(6,'FA1108-0004',1,NULL,NULL,0,NULL,NULL,7,'2011-08-06 20:33:53','2011-08-06',NULL,'2011-08-06 18:35:13',1,0.00000000,NULL,NULL,0,NULL,NULL,0.98000000,0.00000000,0.00000000,5.00000000,5.98000000,2,1,1,NULL,NULL,NULL,NULL,0,4,'2011-08-06','Cash\nReceived : 6 EUR\nRendu : 0.02 EUR\n\n--------------------------------------',NULL,'crabe',NULL,NULL),(8,'FA1108-0005',1,NULL,NULL,3,NULL,NULL,2,'2011-08-08 02:41:44','2011-08-08',NULL,'2011-08-08 00:53:40',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,2,1,1,NULL,NULL,NULL,NULL,1,0,'2011-08-08',NULL,NULL,'crabe',NULL,NULL),(9,'FA1108-0007',1,NULL,NULL,3,NULL,NULL,10,'2011-08-08 02:55:14','2011-08-08',NULL,'2011-08-08 00:55:26',0,0.00000000,NULL,NULL,0,NULL,NULL,1.96000000,0.00000000,0.00000000,10.00000000,11.96000000,1,1,1,NULL,NULL,NULL,NULL,1,0,'2011-08-08',NULL,NULL,'crabe',NULL,NULL),(11,'(PROV11)',1,NULL,NULL,0,NULL,NULL,1,'2012-04-11 12:06:16','2012-04-11',NULL,'2012-04-11 10:06:16',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,2.48000000,2.72000000,0,1,NULL,NULL,NULL,NULL,NULL,1,7,'2012-04-11','This is a comment (private)','This is a comment (public)','',NULL,NULL),(12,'(PROV12)',1,NULL,NULL,0,NULL,NULL,1,'2012-04-11 12:06:16','2012-04-11',NULL,'2012-04-11 10:06:16',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,2.48000000,2.72000000,0,1,NULL,NULL,NULL,NULL,NULL,1,7,'2012-04-11','This is a comment (private)','This is a comment (public)','',NULL,NULL); +/*!40000 ALTER TABLE `llx_facture` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_facture_fourn` +-- + +DROP TABLE IF EXISTS `llx_facture_fourn`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_facture_fourn` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `facnumber` varchar(50) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `ref_ext` varchar(30) DEFAULT NULL, + `type` smallint(6) NOT NULL DEFAULT '0', + `fk_soc` int(11) NOT NULL, + `datec` datetime DEFAULT NULL, + `datef` date DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `libelle` varchar(255) DEFAULT NULL, + `paye` smallint(6) NOT NULL DEFAULT '0', + `amount` double(24,8) NOT NULL DEFAULT '0.00000000', + `remise` double(24,8) DEFAULT '0.00000000', + `close_code` varchar(16) DEFAULT NULL, + `close_note` varchar(128) DEFAULT NULL, + `tva` double(24,8) DEFAULT '0.00000000', + `localtax1` double(24,8) DEFAULT '0.00000000', + `localtax2` double(24,8) DEFAULT '0.00000000', + `total` double(24,8) DEFAULT '0.00000000', + `total_ht` double(24,8) DEFAULT '0.00000000', + `total_tva` double(24,8) DEFAULT '0.00000000', + `total_ttc` double(24,8) DEFAULT '0.00000000', + `fk_statut` smallint(6) NOT NULL DEFAULT '0', + `fk_user_author` int(11) DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `fk_facture_source` int(11) DEFAULT NULL, + `fk_projet` int(11) DEFAULT NULL, + `fk_cond_reglement` int(11) NOT NULL DEFAULT '1', + `date_lim_reglement` date DEFAULT NULL, + `note` text, + `note_public` text, + `model_pdf` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_facture_fourn_ref` (`facnumber`,`fk_soc`,`entity`), + KEY `idx_facture_fourn_date_lim_reglement` (`date_lim_reglement`), + KEY `idx_facture_fourn_fk_soc` (`fk_soc`), + KEY `idx_facture_fourn_fk_user_author` (`fk_user_author`), + KEY `idx_facture_fourn_fk_user_valid` (`fk_user_valid`), + KEY `idx_facture_fourn_fk_projet` (`fk_projet`), + CONSTRAINT `fk_facture_fourn_fk_projet` FOREIGN KEY (`fk_projet`) REFERENCES `llx_projet` (`rowid`), + CONSTRAINT `fk_facture_fourn_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), + CONSTRAINT `fk_facture_fourn_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), + CONSTRAINT `fk_facture_fourn_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_facture_fourn` +-- + +LOCK TABLES `llx_facture_fourn` WRITE; +/*!40000 ALTER TABLE `llx_facture_fourn` DISABLE KEYS */; +INSERT INTO `llx_facture_fourn` (`rowid`, `facnumber`, `entity`, `ref_ext`, `type`, `fk_soc`, `datec`, `datef`, `tms`, `libelle`, `paye`, `amount`, `remise`, `close_code`, `close_note`, `tva`, `localtax1`, `localtax2`, `total`, `total_ht`, `total_tva`, `total_ttc`, `fk_statut`, `fk_user_author`, `fk_user_valid`, `fk_facture_source`, `fk_projet`, `fk_cond_reglement`, `date_lim_reglement`, `note`, `note_public`, `model_pdf`, `import_key`, `extraparams`) VALUES (1,'aaa',1,NULL,0,17,'2011-08-04 22:21:18','2011-08-04','2011-08-04 20:21:18','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,1,NULL,NULL,NULL,1,NULL,'','',NULL,NULL,NULL); +/*!40000 ALTER TABLE `llx_facture_fourn` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_facture_fourn_det` +-- + +DROP TABLE IF EXISTS `llx_facture_fourn_det`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_facture_fourn_det` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_facture_fourn` int(11) NOT NULL, + `fk_product` int(11) DEFAULT NULL, + `ref` varchar(50) DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `description` text, + `pu_ht` double(24,8) DEFAULT NULL, + `pu_ttc` double(24,8) DEFAULT NULL, + `qty` double DEFAULT NULL, + `tva_tx` double(6,3) DEFAULT NULL, + `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT '0.000', + `total_ht` double(24,8) DEFAULT NULL, + `tva` double(24,8) DEFAULT NULL, + `total_localtax1` double(24,8) DEFAULT '0.00000000', + `total_localtax2` double(24,8) DEFAULT '0.00000000', + `total_ttc` double(24,8) DEFAULT NULL, + `product_type` int(11) DEFAULT '0', + `date_start` datetime DEFAULT NULL, + `date_end` datetime DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_facture_fourn_det_fk_facture` (`fk_facture_fourn`), + CONSTRAINT `fk_facture_fourn_det_fk_facture` FOREIGN KEY (`fk_facture_fourn`) REFERENCES `llx_facture_fourn` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_facture_fourn_det` +-- + +LOCK TABLES `llx_facture_fourn_det` WRITE; +/*!40000 ALTER TABLE `llx_facture_fourn_det` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_facture_fourn_det` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_facture_rec` +-- + +DROP TABLE IF EXISTS `llx_facture_rec`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_facture_rec` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `titre` varchar(50) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `fk_soc` int(11) NOT NULL, + `datec` datetime DEFAULT NULL, + `amount` double(24,8) NOT NULL DEFAULT '0.00000000', + `remise` double DEFAULT '0', + `remise_percent` double DEFAULT '0', + `remise_absolue` double DEFAULT '0', + `tva` double(24,8) DEFAULT '0.00000000', + `localtax1` double(24,8) DEFAULT '0.00000000', + `localtax2` double(24,8) DEFAULT '0.00000000', + `total` double(24,8) DEFAULT '0.00000000', + `total_ttc` double(24,8) DEFAULT '0.00000000', + `fk_user_author` int(11) DEFAULT NULL, + `fk_projet` int(11) DEFAULT NULL, + `fk_cond_reglement` int(11) DEFAULT '0', + `fk_mode_reglement` int(11) DEFAULT '0', + `date_lim_reglement` date DEFAULT NULL, + `note` text, + `note_public` text, + `last_gen` varchar(7) DEFAULT NULL, + `unit_frequency` varchar(2) DEFAULT 'd', + `date_when` datetime DEFAULT NULL, + `date_last_gen` datetime DEFAULT NULL, + `nb_gen_done` int(11) DEFAULT NULL, + `nb_gen_max` int(11) DEFAULT NULL, + `frequency` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_facture_rec_uk_titre` (`titre`,`entity`), + KEY `idx_facture_rec_fk_soc` (`fk_soc`), + KEY `idx_facture_rec_fk_user_author` (`fk_user_author`), + KEY `idx_facture_rec_fk_projet` (`fk_projet`), + CONSTRAINT `fk_facture_rec_fk_projet` FOREIGN KEY (`fk_projet`) REFERENCES `llx_projet` (`rowid`), + CONSTRAINT `fk_facture_rec_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), + CONSTRAINT `fk_facture_rec_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_facture_rec` +-- + +LOCK TABLES `llx_facture_rec` WRITE; +/*!40000 ALTER TABLE `llx_facture_rec` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_facture_rec` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_facturedet` +-- + +DROP TABLE IF EXISTS `llx_facturedet`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_facturedet` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_facture` int(11) NOT NULL, + `fk_parent_line` int(11) DEFAULT NULL, + `fk_product` int(11) DEFAULT NULL, + `description` text, + `tva_tx` double(6,3) DEFAULT NULL, + `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT '0.000', + `qty` double DEFAULT NULL, + `remise_percent` double DEFAULT '0', + `remise` double DEFAULT '0', + `fk_remise_except` int(11) DEFAULT NULL, + `subprice` double(24,8) DEFAULT NULL, + `price` double(24,8) DEFAULT NULL, + `total_ht` double(24,8) DEFAULT NULL, + `total_tva` double(24,8) DEFAULT NULL, + `total_localtax1` double(24,8) DEFAULT '0.00000000', + `total_localtax2` double(24,8) DEFAULT '0.00000000', + `total_ttc` double(24,8) DEFAULT NULL, + `product_type` int(11) DEFAULT '0', + `date_start` datetime DEFAULT NULL, + `date_end` datetime DEFAULT NULL, + `info_bits` int(11) DEFAULT '0', + `fk_code_ventilation` int(11) NOT NULL DEFAULT '0', + `fk_export_compta` int(11) NOT NULL DEFAULT '0', + `special_code` int(10) unsigned DEFAULT '0', + `rang` int(11) DEFAULT '0', + `import_key` varchar(14) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_fk_remise_except` (`fk_remise_except`,`fk_facture`), + KEY `idx_facturedet_fk_facture` (`fk_facture`), + KEY `idx_facturedet_fk_product` (`fk_product`), + CONSTRAINT `fk_facturedet_fk_facture` FOREIGN KEY (`fk_facture`) REFERENCES `llx_facture` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_facturedet` +-- + +LOCK TABLES `llx_facturedet` WRITE; +/*!40000 ALTER TABLE `llx_facturedet` DISABLE KEYS */; +INSERT INTO `llx_facturedet` (`rowid`, `fk_facture`, `fk_parent_line`, `fk_product`, `description`, `tva_tx`, `localtax1_tx`, `localtax2_tx`, `qty`, `remise_percent`, `remise`, `fk_remise_except`, `subprice`, `price`, `total_ht`, `total_tva`, `total_localtax1`, `total_localtax2`, `total_ttc`, `product_type`, `date_start`, `date_end`, `info_bits`, `fk_code_ventilation`, `fk_export_compta`, `special_code`, `rang`, `import_key`) VALUES (1,1,NULL,4,'',0.000,0.000,0.000,2,0,0,NULL,0.01000000,0.01000000,0.02000000,0.00000000,0.00000000,0.00000000,0.02000000,0,NULL,NULL,0,0,0,0,1,NULL),(3,2,NULL,3,'Service S1',0.000,0.000,0.000,1,10,4,NULL,40.00000000,36.00000000,36.00000000,0.00000000,0.00000000,0.00000000,36.00000000,1,'2010-07-10 00:00:00',NULL,0,0,0,0,2,NULL),(4,2,NULL,NULL,'Abonnement annuel assurance',1.000,0.000,0.000,1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.10000000,0.00000000,0.00000000,10.10000000,0,'2010-07-10 00:00:00','2011-07-10 00:00:00',0,0,0,0,3,NULL),(11,3,NULL,4,'afsdfsdfsdfsdf',0.000,0.000,0.000,1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,0,0,0,0,NULL),(12,3,NULL,NULL,'dfdfd',0.000,0.000,0.000,1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,0,0,0,2,NULL),(13,5,NULL,4,'Decapsuleur',12.500,0.000,0.000,1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,0,0,0,0,NULL),(14,6,NULL,4,'Decapsuleur',19.600,0.000,0.000,1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.98000000,0.00000000,0.00000000,5.98000000,0,NULL,NULL,0,0,0,0,0,NULL),(21,8,NULL,NULL,'dddd',0.000,0.000,0.000,1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,0,0,0,1,NULL),(22,9,NULL,NULL,'ggg',19.600,0.000,0.000,1,0,0,NULL,10.00000000,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,0,0,0,1,NULL),(28,11,NULL,NULL,'Desc',10.000,0.000,0.000,1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,0,0,0,1,NULL),(29,11,NULL,NULL,'Desc',10.000,0.000,0.000,1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,0,0,0,2,NULL),(30,12,NULL,NULL,'Desc',10.000,0.000,0.000,1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,0,0,0,1,NULL),(31,12,NULL,NULL,'Desc',10.000,0.000,0.000,1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,0,0,0,2,NULL); +/*!40000 ALTER TABLE `llx_facturedet` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_facturedet_rec` +-- + +DROP TABLE IF EXISTS `llx_facturedet_rec`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_facturedet_rec` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_facture` int(11) NOT NULL, + `fk_parent_line` int(11) DEFAULT NULL, + `fk_product` int(11) DEFAULT NULL, + `product_type` int(11) DEFAULT '0', + `description` text, + `tva_tx` double(6,3) DEFAULT NULL, + `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT '0.000', + `qty` double DEFAULT NULL, + `remise_percent` double DEFAULT '0', + `remise` double DEFAULT '0', + `subprice` double(24,8) DEFAULT NULL, + `price` double(24,8) DEFAULT NULL, + `total_ht` double(24,8) DEFAULT NULL, + `total_tva` double(24,8) DEFAULT NULL, + `total_localtax1` double(24,8) DEFAULT '0.00000000', + `total_localtax2` double(24,8) DEFAULT '0.00000000', + `total_ttc` double(24,8) DEFAULT NULL, + `special_code` int(10) unsigned DEFAULT '0', + `rang` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_facturedet_rec` +-- + +LOCK TABLES `llx_facturedet_rec` WRITE; +/*!40000 ALTER TABLE `llx_facturedet_rec` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_facturedet_rec` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_fichinter` +-- + +DROP TABLE IF EXISTS `llx_fichinter`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_fichinter` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_soc` int(11) NOT NULL, + `fk_projet` int(11) DEFAULT '0', + `fk_contrat` int(11) DEFAULT '0', + `ref` varchar(30) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datec` datetime DEFAULT NULL, + `date_valid` datetime DEFAULT NULL, + `datei` date DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `fk_statut` smallint(6) DEFAULT '0', + `duree` double DEFAULT NULL, + `description` text, + `note_private` text, + `note_public` text, + `model_pdf` varchar(255) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_fichinter_ref` (`ref`,`entity`), + KEY `idx_fichinter_fk_soc` (`fk_soc`), + CONSTRAINT `fk_fichinter_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_fichinter` +-- + +LOCK TABLES `llx_fichinter` WRITE; +/*!40000 ALTER TABLE `llx_fichinter` DISABLE KEYS */; +INSERT INTO `llx_fichinter` (`rowid`, `fk_soc`, `fk_projet`, `fk_contrat`, `ref`, `entity`, `tms`, `datec`, `date_valid`, `datei`, `fk_user_author`, `fk_user_valid`, `fk_statut`, `duree`, `description`, `note_private`, `note_public`, `model_pdf`, `extraparams`) VALUES (1,2,1,0,'FI1007-0001',1,'2010-07-08 23:51:54','2010-07-09 01:42:41','2010-07-09 01:51:54',NULL,1,1,1,51000,NULL,NULL,NULL,'soleil',NULL),(2,1,NULL,0,'FI1007-0002',1,'2012-04-11 10:03:49','2010-07-11 16:07:51',NULL,NULL,1,NULL,0,3600,'ferfrefeferf',NULL,NULL,'soleil',NULL); +/*!40000 ALTER TABLE `llx_fichinter` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_fichinterdet` +-- + +DROP TABLE IF EXISTS `llx_fichinterdet`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_fichinterdet` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_fichinter` int(11) DEFAULT NULL, + `date` datetime DEFAULT NULL, + `description` text, + `duree` int(11) DEFAULT NULL, + `rang` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`), + KEY `idx_fichinterdet_fk_fichinter` (`fk_fichinter`), + CONSTRAINT `fk_fichinterdet_fk_fichinter` FOREIGN KEY (`fk_fichinter`) REFERENCES `llx_fichinter` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_fichinterdet` +-- + +LOCK TABLES `llx_fichinterdet` WRITE; +/*!40000 ALTER TABLE `llx_fichinterdet` DISABLE KEYS */; +INSERT INTO `llx_fichinterdet` (`rowid`, `fk_fichinter`, `date`, `description`, `duree`, `rang`) VALUES (1,1,'2010-07-07 04:00:00','Intervention sur site',3600,0),(2,1,'2010-07-08 11:00:00','Autre',47400,0),(3,2,'2010-07-11 05:00:00','Pres',3600,0); +/*!40000 ALTER TABLE `llx_fichinterdet` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_filemanager_roots` +-- + +DROP TABLE IF EXISTS `llx_filemanager_roots`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_filemanager_roots` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `rootlabel` varchar(64) DEFAULT NULL, + `rootpath` text, + `note` text, + `position` int(11) DEFAULT NULL, + `entity` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_filemanager_root` (`rootlabel`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_filemanager_roots` +-- + +LOCK TABLES `llx_filemanager_roots` WRITE; +/*!40000 ALTER TABLE `llx_filemanager_roots` DISABLE KEYS */; +INSERT INTO `llx_filemanager_roots` (`rowid`, `datec`, `rootlabel`, `rootpath`, `note`, `position`, `entity`) VALUES (1,NULL,'c','/media/DATA',NULL,NULL,1),(2,NULL,'home','/home',NULL,NULL,1); +/*!40000 ALTER TABLE `llx_filemanager_roots` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_fournisseur_ca` +-- + +DROP TABLE IF EXISTS `llx_fournisseur_ca`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_fournisseur_ca` ( + `fk_societe` int(11) DEFAULT NULL, + `date_calcul` datetime DEFAULT NULL, + `year` smallint(5) unsigned DEFAULT NULL, + `ca_genere` float DEFAULT NULL, + `ca_achat` float(11,2) DEFAULT '0.00', + UNIQUE KEY `fk_societe` (`fk_societe`,`year`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_fournisseur_ca` +-- + +LOCK TABLES `llx_fournisseur_ca` WRITE; +/*!40000 ALTER TABLE `llx_fournisseur_ca` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_fournisseur_ca` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_import_model` +-- + +DROP TABLE IF EXISTS `llx_import_model`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_import_model` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_user` int(11) NOT NULL DEFAULT '0', + `label` varchar(50) NOT NULL, + `type` varchar(20) NOT NULL, + `field` text NOT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_import_model` (`label`,`type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_import_model` +-- + +LOCK TABLES `llx_import_model` WRITE; +/*!40000 ALTER TABLE `llx_import_model` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_import_model` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_livraison` +-- + +DROP TABLE IF EXISTS `llx_livraison`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_livraison` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `ref` varchar(30) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `ref_customer` varchar(30) DEFAULT NULL, + `fk_soc` int(11) NOT NULL, + `ref_ext` varchar(30) DEFAULT NULL, + `ref_int` varchar(30) DEFAULT NULL, + `date_creation` datetime DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `date_valid` datetime DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `date_delivery` date DEFAULT NULL, + `fk_address` int(11) DEFAULT NULL, + `fk_statut` smallint(6) DEFAULT '0', + `total_ht` double(24,8) DEFAULT '0.00000000', + `note` text, + `note_public` text, + `model_pdf` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_livraison_uk_ref` (`ref`,`entity`), + KEY `idx_livraison_fk_soc` (`fk_soc`), + KEY `idx_livraison_fk_user_author` (`fk_user_author`), + KEY `idx_livraison_fk_user_valid` (`fk_user_valid`), + CONSTRAINT `fk_livraison_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), + CONSTRAINT `fk_livraison_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), + CONSTRAINT `fk_livraison_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_livraison` +-- + +LOCK TABLES `llx_livraison` WRITE; +/*!40000 ALTER TABLE `llx_livraison` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_livraison` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_livraisondet` +-- + +DROP TABLE IF EXISTS `llx_livraisondet`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_livraisondet` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_livraison` int(11) DEFAULT NULL, + `fk_origin_line` int(11) DEFAULT NULL, + `fk_product` int(11) DEFAULT NULL, + `description` text, + `qty` double DEFAULT NULL, + `subprice` double(24,8) DEFAULT '0.00000000', + `total_ht` double(24,8) DEFAULT '0.00000000', + `rang` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`), + KEY `idx_livraisondet_fk_expedition` (`fk_livraison`), + CONSTRAINT `fk_livraisondet_fk_livraison` FOREIGN KEY (`fk_livraison`) REFERENCES `llx_livraison` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_livraisondet` +-- + +LOCK TABLES `llx_livraisondet` WRITE; +/*!40000 ALTER TABLE `llx_livraisondet` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_livraisondet` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_localtax` +-- + +DROP TABLE IF EXISTS `llx_localtax`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_localtax` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `entity` int(11) NOT NULL DEFAULT '1', + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datep` date DEFAULT NULL, + `datev` date DEFAULT NULL, + `amount` double NOT NULL DEFAULT '0', + `label` varchar(255) DEFAULT NULL, + `note` text, + `fk_bank` int(11) DEFAULT NULL, + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_localtax` +-- + +LOCK TABLES `llx_localtax` WRITE; +/*!40000 ALTER TABLE `llx_localtax` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_localtax` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_mailing` +-- + +DROP TABLE IF EXISTS `llx_mailing`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_mailing` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `statut` smallint(6) DEFAULT '0', + `titre` varchar(60) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `sujet` varchar(60) DEFAULT NULL, + `body` text, + `bgcolor` varchar(8) DEFAULT NULL, + `bgimage` varchar(255) DEFAULT NULL, + `cible` varchar(60) DEFAULT NULL, + `nbemail` int(11) DEFAULT NULL, + `email_from` varchar(160) DEFAULT NULL, + `email_replyto` varchar(160) DEFAULT NULL, + `email_errorsto` varchar(160) DEFAULT NULL, + `tag` varchar(128) DEFAULT NULL, + `date_creat` datetime DEFAULT NULL, + `date_valid` datetime DEFAULT NULL, + `date_appro` datetime DEFAULT NULL, + `date_envoi` datetime DEFAULT NULL, + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `fk_user_appro` int(11) DEFAULT NULL, + `joined_file1` varchar(255) DEFAULT NULL, + `joined_file2` varchar(255) DEFAULT NULL, + `joined_file3` varchar(255) DEFAULT NULL, + `joined_file4` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_mailing` +-- + +LOCK TABLES `llx_mailing` WRITE; +/*!40000 ALTER TABLE `llx_mailing` DISABLE KEYS */; +INSERT INTO `llx_mailing` (`rowid`, `statut`, `titre`, `entity`, `sujet`, `body`, `bgcolor`, `bgimage`, `cible`, `nbemail`, `email_from`, `email_replyto`, `email_errorsto`, `tag`, `date_creat`, `date_valid`, `date_appro`, `date_envoi`, `fk_user_creat`, `fk_user_valid`, `fk_user_appro`, `joined_file1`, `joined_file2`, `joined_file3`, `joined_file4`) VALUES (3,1,'My commercial emailing',1,'Buy my product','Please buy my product
','','',NULL,2,'dolibarr@domain.com','','',NULL,'2010-07-11 13:15:59','2010-07-11 13:46:20',NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL),(4,0,'Copy of My commercial emailing',1,'Buy my product','This is a new EMailing content
\r\n
\r\nYou can adit it with the WYSIWYG editor.
\r\nIt is\r\n
    \r\n
  • \r\n Fast
  • \r\n
  • \r\n Easy to use
  • \r\n
  • \r\n Pretty
  • \r\n
','','',NULL,NULL,'dolibarr@domain.com','','',NULL,'2011-07-18 20:44:33',NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `llx_mailing` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_mailing_cibles` +-- + +DROP TABLE IF EXISTS `llx_mailing_cibles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_mailing_cibles` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_mailing` int(11) NOT NULL, + `fk_contact` int(11) NOT NULL, + `nom` varchar(160) DEFAULT NULL, + `prenom` varchar(160) DEFAULT NULL, + `email` varchar(160) NOT NULL, + `other` varchar(255) DEFAULT NULL, + `tag` varchar(128) DEFAULT NULL, + `statut` smallint(6) NOT NULL DEFAULT '0', + `source_url` varchar(160) DEFAULT NULL, + `source_id` int(11) DEFAULT NULL, + `source_type` varchar(16) DEFAULT NULL, + `date_envoi` datetime DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_mailing_cibles` (`fk_mailing`,`email`), + KEY `idx_mailing_cibles_email` (`email`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_mailing_cibles` +-- + +LOCK TABLES `llx_mailing_cibles` WRITE; +/*!40000 ALTER TABLE `llx_mailing_cibles` DISABLE KEYS */; +INSERT INTO `llx_mailing_cibles` (`rowid`, `fk_mailing`, `fk_contact`, `nom`, `prenom`, `email`, `other`, `tag`, `statut`, `source_url`, `source_id`, `source_type`, `date_envoi`) VALUES (1,1,0,'Dupont','Alain','toto@aa.com','Date fin=10/07/2011',NULL,0,'0',NULL,NULL,NULL),(2,2,0,'Swiss customer supplier','','abademail@aa.com','',NULL,0,'0',NULL,NULL,NULL),(3,2,0,'Smith Vick','','vsmith@email.com','',NULL,0,'0',NULL,NULL,NULL),(4,3,0,'Swiss customer supplier','','abademail@aa.com','',NULL,0,'0',NULL,NULL,NULL),(5,3,0,'Smith Vick','','vsmith@email.com','',NULL,0,'0',NULL,NULL,NULL); +/*!40000 ALTER TABLE `llx_mailing_cibles` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_menu` +-- + +DROP TABLE IF EXISTS `llx_menu`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_menu` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `menu_handler` varchar(16) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `module` varchar(64) DEFAULT NULL, + `type` varchar(4) NOT NULL, + `mainmenu` varchar(100) NOT NULL, + `fk_menu` int(11) NOT NULL, + `fk_leftmenu` varchar(16) DEFAULT NULL, + `fk_mainmenu` varchar(16) DEFAULT NULL, + `position` int(11) NOT NULL, + `url` varchar(255) NOT NULL, + `target` varchar(100) DEFAULT NULL, + `titre` varchar(255) NOT NULL, + `langs` varchar(100) DEFAULT NULL, + `level` smallint(6) DEFAULT NULL, + `leftmenu` varchar(100) DEFAULT NULL, + `perms` varchar(255) DEFAULT NULL, + `enabled` varchar(255) DEFAULT '1', + `usertype` int(11) NOT NULL DEFAULT '0', + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_menu_uk_menu` (`menu_handler`,`fk_menu`,`position`,`url`,`entity`), + KEY `idx_menu_menuhandler_type` (`menu_handler`,`type`) +) ENGINE=InnoDB AUTO_INCREMENT=61175 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_menu` +-- + +LOCK TABLES `llx_menu` WRITE; +/*!40000 ALTER TABLE `llx_menu` DISABLE KEYS */; +INSERT INTO `llx_menu` (`rowid`, `menu_handler`, `entity`, `module`, `type`, `mainmenu`, `fk_menu`, `fk_leftmenu`, `fk_mainmenu`, `position`, `url`, `target`, `titre`, `langs`, `level`, `leftmenu`, `perms`, `enabled`, `usertype`, `tms`) VALUES (19289,'all',1,'cashdesk','top','cashdesk',0,NULL,NULL,100,'/cashdesk/index.php?user=__LOGIN__','pointofsale','CashDeskMenu','cashdesk',NULL,NULL,'1','$conf->cashdesk->enabled',0,'2012-04-11 10:04:08'),(55933,'all',1,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2012-04-11 10:04:58'),(55934,'all',1,'agenda','left','agenda',55933,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2012-04-11 10:04:58'),(55935,'all',1,'agenda','left','agenda',55934,NULL,NULL,101,'/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2012-04-11 10:04:58'),(55936,'all',1,'agenda','left','agenda',55934,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2012-04-11 10:04:58'),(55937,'all',1,'agenda','left','agenda',55936,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2012-04-11 10:04:58'),(55938,'all',1,'agenda','left','agenda',55936,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2012-04-11 10:04:58'),(55939,'all',1,'agenda','left','agenda',55936,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2012-04-11 10:04:58'),(55940,'all',1,'agenda','left','agenda',55936,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2012-04-11 10:04:58'),(55941,'all',1,'agenda','left','agenda',55934,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2012-04-11 10:04:58'),(55942,'all',1,'agenda','left','agenda',55941,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2012-04-11 10:04:58'),(55943,'all',1,'agenda','left','agenda',55941,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2012-04-11 10:04:58'),(55944,'all',1,'agenda','left','agenda',55941,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2012-04-11 10:04:58'),(55945,'all',1,'agenda','left','agenda',55941,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2012-04-11 10:04:58'),(55946,'all',1,'agenda','left','agenda',55934,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2012-04-11 10:04:58'),(55947,'all',1,'ecm','top','ecm',0,NULL,NULL,100,'/ecm/index.php','','MenuECM','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2012-04-11 10:04:58'),(55948,'all',1,'ecm','left','ecm',55947,NULL,NULL,101,'/ecm/index.php','','ECMArea','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2012-04-11 10:04:58'),(55949,'all',1,'ecm','left','ecm',55948,NULL,NULL,100,'/ecm/docdir.php?action=create','','ECMNewSection','ecm',NULL,NULL,'$user->rights->ecm->setup','$user->rights->ecm->setup',2,'2012-04-11 10:04:58'),(55950,'all',1,'ecm','left','ecm',55948,NULL,NULL,102,'/ecm/index.php?action=file_manager','','ECMFileManager','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2012-04-11 10:04:58'),(55951,'all',1,'ecm','left','ecm',55948,NULL,NULL,103,'/ecm/search.php','','Search','ecm',NULL,NULL,'$user->rights->ecm->read','$user->rights->ecm->read',2,'2012-04-11 10:04:58'),(55952,'auguria',1,NULL,'top','home',0,NULL,NULL,1,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2012-04-11 10:04:58'),(55953,'auguria',1,NULL,'top','companies',0,NULL,NULL,2,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->societe->enabled || $conf->fournisseur->enabled',2,'2012-04-11 10:04:58'),(55954,'auguria',1,NULL,'top','products',0,NULL,NULL,3,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2012-04-11 10:04:58'),(55956,'auguria',1,NULL,'top','commercial',0,NULL,NULL,5,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->societe->enabled',2,'2012-04-11 10:04:58'),(55957,'auguria',1,NULL,'top','accountancy',0,NULL,NULL,6,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->deplacement->lire || $user->rights->don->lire || $user->rights->tax->charges->lire','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled',2,'2012-04-11 10:04:58'),(55958,'auguria',1,NULL,'top','project',0,NULL,NULL,7,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',0,'2012-04-11 10:04:58'),(55959,'auguria',1,NULL,'top','tools',0,NULL,NULL,8,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled',2,'2012-04-11 10:04:58'),(55962,'auguria',1,NULL,'top','shop',0,NULL,NULL,11,'/boutique/index.php?mainmenu=shop&leftmenu=','','OSCommerce','shop',-1,'','','! empty($conf->boutique->enabled)',0,'2012-04-11 10:04:58'),(55964,'auguria',1,NULL,'top','members',0,NULL,NULL,15,'/adherents/index.php?mainmenu=members&leftmenu=','','Members','members',-1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(55965,'auguria',1,NULL,'top','bank',0,NULL,NULL,6,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',2,'2012-04-11 10:04:58'),(56051,'auguria',1,NULL,'left','home',55952,NULL,NULL,0,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2012-04-11 10:04:58'),(56052,'auguria',1,NULL,'left','home',56051,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\'setup\'',2,'2012-04-11 10:04:58'),(56053,'auguria',1,NULL,'left','home',56051,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\'setup\'',2,'2012-04-11 10:04:58'),(56054,'auguria',1,NULL,'left','home',56051,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\'setup\'',2,'2012-04-11 10:04:58'),(56055,'auguria',1,NULL,'left','home',56051,NULL,NULL,5,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\'setup\'',2,'2012-04-11 10:04:58'),(56056,'auguria',1,NULL,'left','home',56051,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\'setup\'',2,'2012-04-11 10:04:58'),(56057,'auguria',1,NULL,'left','home',56051,NULL,NULL,6,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\'setup\'',2,'2012-04-11 10:04:58'),(56058,'auguria',1,NULL,'left','home',56051,NULL,NULL,9,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\'setup\'',2,'2012-04-11 10:04:58'),(56059,'auguria',1,NULL,'left','home',56051,NULL,NULL,7,'/admin/proxy.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\'setup\'',2,'2012-04-11 10:04:58'),(56060,'auguria',1,NULL,'left','home',56051,NULL,NULL,10,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\'setup\'',2,'2012-04-11 10:04:58'),(56061,'auguria',1,NULL,'left','home',56051,NULL,NULL,8,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\'setup\'',2,'2012-04-11 10:04:58'),(56062,'auguria',1,NULL,'left','home',56051,NULL,NULL,12,'/admin/dict.php?leftmenu=setup','','DictionnarySetup','admin',1,'','','$leftmenu==\'setup\'',2,'2012-04-11 10:04:58'),(56063,'auguria',1,NULL,'left','home',56051,NULL,NULL,13,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\'setup\'',2,'2012-04-11 10:04:58'),(56064,'auguria',1,NULL,'left','home',56051,NULL,NULL,11,'/admin/sms.php?leftmenu=setup','','Sms','admin',1,'','','$leftmenu==\'setup\'',2,'2012-04-11 10:04:58'),(56151,'auguria',1,NULL,'left','home',55952,NULL,NULL,1,'/admin/system/index.php?leftmenu=system','','SystemInfo','admin',0,'system','','$user->admin',2,'2012-04-11 10:04:58'),(56152,'auguria',1,NULL,'left','home',56151,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=system','','Dolibarr','admin',1,'','','$leftmenu==\'system\'',2,'2012-04-11 10:04:58'),(56153,'auguria',1,NULL,'left','home',56152,NULL,NULL,1,'/admin/system/constall.php?leftmenu=system','','AllParameters','admin',2,'','','$leftmenu==\'system\'',2,'2012-04-11 10:04:58'),(56154,'auguria',1,NULL,'left','home',56152,NULL,NULL,4,'/admin/system/about.php?leftmenu=system','','About','admin',2,'','','$leftmenu==\'system\'',2,'2012-04-11 10:04:58'),(56155,'auguria',1,NULL,'left','home',56151,NULL,NULL,1,'/admin/system/os.php?leftmenu=system','','OS','admin',1,'','','$leftmenu==\'system\'',2,'2012-04-11 10:04:58'),(56156,'auguria',1,NULL,'left','home',56151,NULL,NULL,2,'/admin/system/web.php?leftmenu=system','','WebServer','admin',1,'','','$leftmenu==\'system\'',2,'2012-04-11 10:04:58'),(56157,'auguria',1,NULL,'left','home',56151,NULL,NULL,3,'/admin/system/phpinfo.php?leftmenu=system','','Php','admin',1,'','','$leftmenu==\'system\'',2,'2012-04-11 10:04:58'),(56158,'auguria',1,NULL,'left','home',56152,NULL,NULL,3,'/admin/triggers.php?leftmenu=system','','Triggers','admin',2,'','','$leftmenu==\'system\'',2,'2012-04-11 10:04:58'),(56159,'auguria',1,NULL,'left','home',56152,NULL,NULL,2,'/admin/system/modules.php?leftmenu=system','','Modules','admin',2,'','','$leftmenu==\'system\'',2,'2012-04-11 10:04:58'),(56161,'auguria',1,NULL,'left','home',56151,NULL,NULL,4,'/admin/system/database.php?leftmenu=system','','Database','admin',1,'','','$leftmenu==\'system\'',2,'2012-04-11 10:04:58'),(56162,'auguria',1,NULL,'left','home',56161,NULL,NULL,0,'/admin/system/database-tables.php?leftmenu=system','','Tables','admin',2,'','','$leftmenu==\'system\'',2,'2012-04-11 10:04:58'),(56163,'auguria',1,NULL,'left','home',56161,NULL,NULL,1,'/admin/system/database-tables-contraintes.php?leftmenu=system','','Constraints','admin',2,'','','$leftmenu==\'system\'',2,'2012-04-11 10:04:58'),(56251,'auguria',1,NULL,'left','home',55952,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','SystemTools','admin',0,'admintools','','$user->admin',2,'2012-04-11 10:04:58'),(56252,'auguria',1,NULL,'left','home',56251,NULL,NULL,0,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\'admintools\'',2,'2012-04-11 10:04:58'),(56253,'auguria',1,NULL,'left','home',56251,NULL,NULL,1,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\'admintools\'',2,'2012-04-11 10:04:58'),(56254,'auguria',1,NULL,'left','home',56251,NULL,NULL,6,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\'admintools\'',2,'2012-04-11 10:04:58'),(56255,'auguria',1,NULL,'left','home',56251,NULL,NULL,3,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\'admintools\' && function_exists(\'eaccelerator_info\')',2,'2012-04-11 10:04:58'),(56256,'auguria',1,NULL,'left','home',56251,NULL,NULL,2,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\'admintools\'',2,'2012-04-11 10:04:58'),(56257,'auguria',1,NULL,'left','home',56251,NULL,NULL,4,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\'admintools\'',2,'2012-04-11 10:04:58'),(56258,'auguria',1,NULL,'left','home',56251,NULL,NULL,7,'/support/index.php?leftmenu=admintools','_blank','HelpCenter','help',1,'','','$leftmenu==\'admintools\'',2,'2012-04-11 10:04:58'),(56259,'auguria',1,NULL,'left','home',56251,NULL,NULL,5,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\'admintools\'',2,'2012-04-11 10:04:58'),(56351,'auguria',1,NULL,'left','home',55952,NULL,NULL,3,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2012-04-11 10:04:58'),(56352,'auguria',1,NULL,'left','home',56351,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\'users\'',2,'2012-04-11 10:04:58'),(56353,'auguria',1,NULL,'left','home',56352,NULL,NULL,0,'/user/fiche.php?leftmenu=users&action=create','','NewUser','users',2,'','$user->rights->user->user->creer || $user->admin','$leftmenu==\'users\'',2,'2012-04-11 10:04:58'),(56354,'auguria',1,NULL,'left','home',56351,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin','$leftmenu==\'users\'',2,'2012-04-11 10:04:58'),(56355,'auguria',1,NULL,'left','home',56354,NULL,NULL,0,'/user/group/fiche.php?leftmenu=users&action=create','','NewGroup','users',2,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin','$leftmenu==\'users\'',2,'2012-04-11 10:04:58'),(56451,'auguria',1,NULL,'left','companies',55953,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2012-04-11 10:04:58'),(56452,'auguria',1,NULL,'left','companies',56451,NULL,NULL,0,'/societe/soc.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2012-04-11 10:04:58'),(56454,'auguria',1,NULL,'left','companies',56451,NULL,NULL,5,'/fourn/liste.php?leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2012-04-11 10:04:58'),(56455,'auguria',1,NULL,'left','companies',56454,NULL,NULL,0,'/societe/soc.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2012-04-11 10:04:58'),(56457,'auguria',1,NULL,'left','companies',56451,NULL,NULL,3,'/comm/prospect/list.php?leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2012-04-11 10:04:58'),(56458,'auguria',1,NULL,'left','companies',56457,NULL,NULL,0,'/societe/soc.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2012-04-11 10:04:58'),(56460,'auguria',1,NULL,'left','companies',56451,NULL,NULL,4,'/comm/list.php?leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2012-04-11 10:04:58'),(56461,'auguria',1,NULL,'left','companies',56460,NULL,NULL,0,'/societe/soc.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2012-04-11 10:04:58'),(56551,'auguria',1,NULL,'left','companies',55953,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses||Contacts@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2012-04-11 10:04:58'),(56552,'auguria',1,NULL,'left','companies',56551,NULL,NULL,0,'/contact/fiche.php?leftmenu=contacts&action=create','','NewContactAddress||NewContact@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2012-04-11 10:04:58'),(56553,'auguria',1,NULL,'left','companies',56551,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2012-04-11 10:04:58'),(56555,'auguria',1,NULL,'left','companies',56553,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','Prospects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2012-04-11 10:04:58'),(56556,'auguria',1,NULL,'left','companies',56553,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','Customers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2012-04-11 10:04:58'),(56557,'auguria',1,NULL,'left','companies',56553,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','Suppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2012-04-11 10:04:58'),(56558,'auguria',1,NULL,'left','companies',56553,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2012-04-11 10:04:58'),(56601,'auguria',1,NULL,'left','companies',55953,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2012-04-11 10:04:58'),(56602,'auguria',1,NULL,'left','companies',56601,NULL,NULL,0,'/categories/fiche.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2012-04-11 10:04:58'),(56611,'auguria',1,NULL,'left','companies',55953,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2012-04-11 10:04:58'),(56612,'auguria',1,NULL,'left','companies',56611,NULL,NULL,0,'/categories/fiche.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2012-04-11 10:04:58'),(57051,'auguria',1,NULL,'left','commercial',55956,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2012-04-11 10:04:58'),(57052,'auguria',1,NULL,'left','commercial',57051,NULL,NULL,0,'/societe/societe.php?leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2012-04-11 10:04:58'),(57053,'auguria',1,NULL,'left','commercial',57051,NULL,NULL,1,'/comm/propal.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2012-04-11 10:04:58'),(57054,'auguria',1,NULL,'left','commercial',57053,NULL,NULL,2,'/comm/propal.php?leftmenu=propals&viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2012-04-11 10:04:58'),(57055,'auguria',1,NULL,'left','commercial',57053,NULL,NULL,3,'/comm/propal.php?leftmenu=propals&viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2012-04-11 10:04:58'),(57056,'auguria',1,NULL,'left','commercial',57053,NULL,NULL,4,'/comm/propal.php?leftmenu=propals&viewstatut=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2012-04-11 10:04:58'),(57057,'auguria',1,NULL,'left','commercial',57053,NULL,NULL,5,'/comm/propal.php?leftmenu=propals&viewstatut=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2012-04-11 10:04:58'),(57058,'auguria',1,NULL,'left','commercial',57053,NULL,NULL,6,'/comm/propal.php?leftmenu=propals&viewstatut=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2012-04-11 10:04:58'),(57061,'auguria',1,NULL,'left','commercial',57051,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2012-04-11 10:04:58'),(57151,'auguria',1,NULL,'left','commercial',55956,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2012-04-11 10:04:58'),(57152,'auguria',1,NULL,'left','commercial',57151,NULL,NULL,0,'/societe/societe.php?leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2012-04-11 10:04:58'),(57153,'auguria',1,NULL,'left','commercial',57151,NULL,NULL,1,'/commande/liste.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2012-04-11 10:04:58'),(57154,'auguria',1,NULL,'left','commercial',57153,NULL,NULL,2,'/commande/liste.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2012-04-11 10:04:58'),(57155,'auguria',1,NULL,'left','commercial',57153,NULL,NULL,3,'/commande/liste.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2012-04-11 10:04:58'),(57156,'auguria',1,NULL,'left','commercial',57153,NULL,NULL,4,'/commande/liste.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2012-04-11 10:04:58'),(57157,'auguria',1,NULL,'left','commercial',57153,NULL,NULL,5,'/commande/liste.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2012-04-11 10:04:58'),(57158,'auguria',1,NULL,'left','commercial',57153,NULL,NULL,6,'/commande/liste.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2012-04-11 10:04:58'),(57159,'auguria',1,NULL,'left','commercial',57153,NULL,NULL,7,'/commande/liste.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2012-04-11 10:04:58'),(57160,'auguria',1,NULL,'left','commercial',57151,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2012-04-11 10:04:58'),(57251,'auguria',1,NULL,'left','commercial',55954,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2012-04-11 10:04:58'),(57252,'auguria',1,NULL,'left','commercial',57251,NULL,NULL,0,'/expedition/fiche.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2012-04-11 10:04:58'),(57253,'auguria',1,NULL,'left','commercial',57251,NULL,NULL,1,'/expedition/liste.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2012-04-11 10:04:58'),(57254,'auguria',1,NULL,'left','commercial',57251,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2012-04-11 10:04:58'),(57351,'auguria',1,NULL,'left','commercial',55956,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2012-04-11 10:04:58'),(57352,'auguria',1,NULL,'left','commercial',57351,NULL,NULL,0,'/societe/societe.php?leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2012-04-11 10:04:58'),(57353,'auguria',1,NULL,'left','commercial',57351,NULL,NULL,1,'/contrat/liste.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2012-04-11 10:04:58'),(57354,'auguria',1,NULL,'left','commercial',57351,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2012-04-11 10:04:58'),(57355,'auguria',1,NULL,'left','commercial',57354,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2012-04-11 10:04:58'),(57356,'auguria',1,NULL,'left','commercial',57354,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2012-04-11 10:04:58'),(57357,'auguria',1,NULL,'left','commercial',57354,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2012-04-11 10:04:58'),(57358,'auguria',1,NULL,'left','commercial',57354,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2012-04-11 10:04:58'),(57451,'auguria',1,NULL,'left','commercial',55956,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2012-04-11 10:04:58'),(57452,'auguria',1,NULL,'left','commercial',57451,NULL,NULL,0,'/fichinter/fiche.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2012-04-11 10:04:58'),(57453,'auguria',1,NULL,'left','commercial',57451,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2012-04-11 10:04:58'),(57551,'auguria',1,NULL,'left','accountancy',55957,NULL,NULL,3,'/fourn/facture/index.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2012-04-11 10:04:58'),(57552,'auguria',1,NULL,'left','accountancy',57551,NULL,NULL,0,'/fourn/facture/fiche.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->fournisseur->enabled',2,'2012-04-11 10:04:58'),(57553,'auguria',1,NULL,'left','accountancy',57551,NULL,NULL,1,'/fourn/facture/impayees.php?leftmenu=suppliers_bills','','Unpaid','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2012-04-11 10:04:58'),(57554,'auguria',1,NULL,'left','accountancy',57551,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2012-04-11 10:04:58'),(57555,'auguria',1,NULL,'left','accountancy',57551,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2012-04-11 10:04:58'),(57651,'auguria',1,NULL,'left','accountancy',55957,NULL,NULL,3,'/compta/facture.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2012-04-11 10:04:58'),(57652,'auguria',1,NULL,'left','accountancy',57651,NULL,NULL,3,'/compta/clients.php?action=facturer&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2012-04-11 10:04:58'),(57653,'auguria',1,NULL,'left','accountancy',57651,NULL,NULL,4,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','Repeatable','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2012-04-11 10:04:58'),(57654,'auguria',1,NULL,'left','accountancy',57651,NULL,NULL,5,'/compta/facture/impayees.php?action=facturer&leftmenu=customers_bills','','Unpaid','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2012-04-11 10:04:58'),(57655,'auguria',1,NULL,'left','accountancy',57651,NULL,NULL,6,'/compta/paiement/liste.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2012-04-11 10:04:58'),(57661,'auguria',1,NULL,'left','accountancy',57655,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2012-04-11 10:04:58'),(57662,'auguria',1,NULL,'left','accountancy',55965,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2012-04-11 10:04:58'),(57663,'auguria',1,NULL,'left','accountancy',57662,NULL,NULL,0,'/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new','','NewCheckDeposit','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2012-04-11 10:04:58'),(57664,'auguria',1,NULL,'left','accountancy',57662,NULL,NULL,1,'/compta/paiement/cheque/liste.php?leftmenu=checks','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2012-04-11 10:04:58'),(57665,'auguria',1,NULL,'left','accountancy',57651,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2012-04-11 10:04:58'),(57851,'auguria',1,NULL,'left','accountancy',55957,NULL,NULL,3,'/commande/liste.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2012-04-11 10:04:58'),(57951,'auguria',1,NULL,'left','accountancy',55957,NULL,NULL,4,'/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2012-04-11 10:04:58'),(57952,'auguria',1,NULL,'left','accountancy',57951,NULL,NULL,0,'/compta/dons/fiche.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2012-04-11 10:04:58'),(57953,'auguria',1,NULL,'left','accountancy',57951,NULL,NULL,1,'/compta/dons/liste.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2012-04-11 10:04:58'),(58051,'auguria',1,NULL,'left','accountancy',55957,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2012-04-11 10:04:58'),(58052,'auguria',1,NULL,'left','accountancy',58051,NULL,NULL,1,'/compta/deplacement/fiche.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2012-04-11 10:04:58'),(58053,'auguria',1,NULL,'left','accountancy',58051,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2012-04-11 10:04:58'),(58054,'auguria',1,NULL,'left','accountancy',58051,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2012-04-11 10:04:58'),(58151,'auguria',1,NULL,'left','accountancy',55957,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuTaxAndDividends','compta',0,'tax','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2012-04-11 10:04:58'),(58152,'auguria',1,NULL,'left','accountancy',58151,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2012-04-11 10:04:58'),(58153,'auguria',1,NULL,'left','accountancy',58152,NULL,NULL,2,'/compta/sociales/charges.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2012-04-11 10:04:58'),(58154,'auguria',1,NULL,'left','accountancy',58152,NULL,NULL,3,'/compta/charges/index.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2012-04-11 10:04:58'),(58251,'auguria',1,NULL,'left','accountancy',58151,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'tax_vat','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2012-04-11 10:04:58'),(58252,'auguria',1,NULL,'left','accountancy',58251,NULL,NULL,0,'/compta/tva/fiche.php?leftmenu=tax_vat&action=create','','NewPayment','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2012-04-11 10:04:58'),(58253,'auguria',1,NULL,'left','accountancy',58251,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','Payments','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2012-04-11 10:04:58'),(58254,'auguria',1,NULL,'left','accountancy',58251,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2012-04-11 10:04:58'),(58255,'auguria',1,NULL,'left','accountancy',58251,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2012-04-11 10:04:58'),(58351,'auguria',1,NULL,'left','accountancy',55957,NULL,NULL,8,'/compta/ventilation/index.php?leftmenu=ventil','','Ventilation','companies',0,'ventil','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2012-04-11 10:04:58'),(58352,'auguria',1,NULL,'left','accountancy',58351,NULL,NULL,0,'/compta/ventilation/liste.php','','ToDispatch','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2012-04-11 10:04:58'),(58353,'auguria',1,NULL,'left','accountancy',58351,NULL,NULL,1,'/compta/ventilation/lignes.php','','Dispatched','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2012-04-11 10:04:58'),(58354,'auguria',1,NULL,'left','accountancy',58351,NULL,NULL,2,'/compta/param/','','Setup','companies',1,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2012-04-11 10:04:58'),(58355,'auguria',1,NULL,'left','accountancy',58354,NULL,NULL,0,'/compta/param/comptes/liste.php','','List','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2012-04-11 10:04:58'),(58356,'auguria',1,NULL,'left','accountancy',58354,NULL,NULL,1,'/compta/param/comptes/fiche.php?action=create','','New','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2012-04-11 10:04:58'),(58357,'auguria',1,NULL,'left','accountancy',58351,NULL,NULL,3,'/compta/export/','','Export','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2012-04-11 10:04:58'),(58358,'auguria',1,NULL,'left','accountancy',58357,NULL,NULL,0,'/compta/export/index.php','','New','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2012-04-11 10:04:58'),(58359,'auguria',1,NULL,'left','accountancy',58357,NULL,NULL,1,'/compta/export/liste.php','','List','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2012-04-11 10:04:58'),(58451,'auguria',1,NULL,'left','accountancy',55965,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2012-04-11 10:04:58'),(58453,'auguria',1,NULL,'left','accountancy',58451,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2012-04-11 10:04:58'),(58454,'auguria',1,NULL,'left','accountancy',58451,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2012-04-11 10:04:58'),(58455,'auguria',1,NULL,'left','accountancy',58451,NULL,NULL,3,'/compta/prelevement/liste.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2012-04-11 10:04:58'),(58457,'auguria',1,NULL,'left','accountancy',58451,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2012-04-11 10:04:58'),(58458,'auguria',1,NULL,'left','accountancy',58451,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2012-04-11 10:04:58'),(58551,'auguria',1,NULL,'left','accountancy',55965,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2012-04-11 10:04:58'),(58552,'auguria',1,NULL,'left','accountancy',58551,NULL,NULL,0,'/compta/bank/fiche.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2012-04-11 10:04:58'),(58553,'auguria',1,NULL,'left','accountancy',58551,NULL,NULL,1,'/compta/bank/categ.php?leftmenu=bank','','Rubriques','categories',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2012-04-11 10:04:58'),(58554,'auguria',1,NULL,'left','accountancy',58551,NULL,NULL,2,'/compta/bank/search.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2012-04-11 10:04:58'),(58555,'auguria',1,NULL,'left','accountancy',58551,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2012-04-11 10:04:58'),(58557,'auguria',1,NULL,'left','accountancy',58551,NULL,NULL,5,'/compta/bank/virement.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2012-04-11 10:04:58'),(58651,'auguria',1,NULL,'left','accountancy',55957,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'ca','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2012-04-11 10:04:58'),(58652,'auguria',1,NULL,'left','accountancy',58651,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2012-04-11 10:04:58'),(58653,'auguria',1,NULL,'left','accountancy',58652,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2012-04-11 10:04:58'),(58654,'auguria',1,NULL,'left','accountancy',58651,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2012-04-11 10:04:58'),(58655,'auguria',1,NULL,'left','accountancy',58654,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2012-04-11 10:04:58'),(58656,'auguria',1,NULL,'left','accountancy',58654,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2012-04-11 10:04:58'),(58657,'auguria',1,NULL,'left','accountancy',58651,NULL,NULL,1,'/compta/journal/sellsjournal.php?leftmenu=ca','','SellsJournal','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2012-04-11 10:04:58'),(58658,'auguria',1,NULL,'left','accountancy',58651,NULL,NULL,1,'/compta/journal/purchasesjournal.php?leftmenu=ca','','PurchasesJournal','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2012-04-11 10:04:58'),(58751,'auguria',1,NULL,'left','products',55954,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2012-04-11 10:04:58'),(58752,'auguria',1,NULL,'left','products',58751,NULL,NULL,0,'/product/fiche.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2012-04-11 10:04:58'),(58753,'auguria',1,NULL,'left','products',58751,NULL,NULL,1,'/product/liste.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2012-04-11 10:04:58'),(58754,'auguria',1,NULL,'left','products',58751,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2012-04-11 10:04:58'),(58755,'auguria',1,NULL,'left','products',58751,NULL,NULL,5,'/product/popuprop.php?leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2012-04-11 10:04:58'),(58851,'auguria',1,NULL,'left','products',55954,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2012-04-11 10:04:58'),(58852,'auguria',1,NULL,'left','products',58851,NULL,NULL,0,'/product/fiche.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2012-04-11 10:04:58'),(58853,'auguria',1,NULL,'left','products',58851,NULL,NULL,1,'/product/liste.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2012-04-11 10:04:58'),(58854,'auguria',1,NULL,'left','products',58851,NULL,NULL,5,'/product/popuprop.php?leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2012-04-11 10:04:58'),(59051,'auguria',1,NULL,'left','products',55954,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2012-04-11 10:04:58'),(59052,'auguria',1,NULL,'left','products',59051,NULL,NULL,0,'/product/stock/fiche.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2012-04-11 10:04:58'),(59053,'auguria',1,NULL,'left','products',59051,NULL,NULL,1,'/product/stock/liste.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2012-04-11 10:04:58'),(59054,'auguria',1,NULL,'left','products',59051,NULL,NULL,2,'/product/stock/valo.php','','EnhancedValue','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2012-04-11 10:04:58'),(59055,'auguria',1,NULL,'left','products',59051,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2012-04-11 10:04:58'),(59151,'auguria',1,NULL,'left','products',55954,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2012-04-11 10:04:58'),(59152,'auguria',1,NULL,'left','products',59151,NULL,NULL,0,'/categories/fiche.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2012-04-11 10:04:58'),(59551,'auguria',1,NULL,'left','project',55958,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59552,'auguria',1,NULL,'left','project',59551,NULL,NULL,1,'/projet/fiche.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59553,'auguria',1,NULL,'left','project',59551,NULL,NULL,2,'/projet/liste.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59561,'auguria',1,NULL,'left','project',55958,NULL,NULL,0,'/projet/index.php?leftmenu=projects&mode=mine','','MyProjects','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59562,'auguria',1,NULL,'left','project',59561,NULL,NULL,1,'/projet/fiche.php?leftmenu=projects&action=create&mode=mine','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59563,'auguria',1,NULL,'left','project',59561,NULL,NULL,2,'/projet/liste.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59651,'auguria',1,NULL,'left','project',55958,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59652,'auguria',1,NULL,'left','project',59651,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59653,'auguria',1,NULL,'left','project',59651,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59654,'auguria',1,NULL,'left','project',59651,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59751,'auguria',1,NULL,'left','project',55958,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects&mode=mine','','MyActivities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59752,'auguria',1,NULL,'left','project',59751,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create&mode=mine','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59753,'auguria',1,NULL,'left','project',59751,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59754,'auguria',1,NULL,'left','project',59751,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects&mode=mine','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2012-04-11 10:04:58'),(59851,'auguria',1,NULL,'left','tools',55959,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2012-04-11 10:04:58'),(59852,'auguria',1,NULL,'left','tools',59851,NULL,NULL,0,'/comm/mailing/fiche.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2012-04-11 10:04:58'),(59853,'auguria',1,NULL,'left','tools',59851,NULL,NULL,1,'/comm/mailing/liste.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2012-04-11 10:04:58'),(60051,'auguria',1,NULL,'left','tools',55959,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2012-04-11 10:04:58'),(60052,'auguria',1,NULL,'left','tools',60051,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2012-04-11 10:04:58'),(60081,'auguria',1,NULL,'left','tools',55959,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2012-04-11 10:04:58'),(60082,'auguria',1,NULL,'left','tools',60081,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2012-04-11 10:04:58'),(60151,'auguria',1,NULL,'left','members',55964,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60152,'auguria',1,NULL,'left','members',60151,NULL,NULL,0,'/adherents/fiche.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60153,'auguria',1,NULL,'left','members',60151,NULL,NULL,1,'/adherents/liste.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60154,'auguria',1,NULL,'left','members',60153,NULL,NULL,2,'/adherents/liste.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60155,'auguria',1,NULL,'left','members',60153,NULL,NULL,3,'/adherents/liste.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60156,'auguria',1,NULL,'left','members',60153,NULL,NULL,4,'/adherents/liste.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60157,'auguria',1,NULL,'left','members',60153,NULL,NULL,5,'/adherents/liste.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60158,'auguria',1,NULL,'left','members',60153,NULL,NULL,6,'/adherents/liste.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60159,'auguria',1,NULL,'left','members',60151,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60251,'auguria',1,NULL,'left','members',55964,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60252,'auguria',1,NULL,'left','members',60251,NULL,NULL,0,'/adherents/liste.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60253,'auguria',1,NULL,'left','members',60251,NULL,NULL,1,'/adherents/cotisations.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60254,'auguria',1,NULL,'left','members',60251,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60451,'auguria',1,NULL,'left','members',55964,NULL,NULL,3,'/adherents/index.php?leftmenu=export&mainmenu=members','','Exports','members',0,'export','$user->rights->adherent->export','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60452,'auguria',1,NULL,'left','members',60451,NULL,NULL,0,'/exports/index.php?leftmenu=export','','Datas','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled && $conf->export->enabled',2,'2012-04-11 10:04:58'),(60453,'auguria',1,NULL,'left','members',60451,NULL,NULL,1,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60454,'auguria',1,NULL,'left','members',60451,NULL,NULL,2,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60651,'auguria',1,NULL,'left','members',55964,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60652,'auguria',1,NULL,'left','members',60651,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(60653,'auguria',1,NULL,'left','members',60651,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2012-04-11 10:04:58'),(61051,'auguria',1,NULL,'left','commercial',55956,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->commande->enabled',2,'2012-04-11 10:04:58'),(61052,'auguria',1,NULL,'left','commercial',61051,NULL,NULL,0,'/societe/societe.php?leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->commande->enabled',2,'2012-04-11 10:04:58'),(61053,'auguria',1,NULL,'left','commercial',61051,NULL,NULL,1,'/fourn/commande/liste.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled',2,'2012-04-11 10:04:58'),(61059,'auguria',1,NULL,'left','commercial',61051,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled',2,'2012-04-11 10:04:58'),(61151,'auguria',1,NULL,'left','members',55964,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2012-04-11 10:04:58'),(61152,'auguria',1,NULL,'left','members',61151,NULL,NULL,0,'/categories/fiche.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2012-04-11 10:04:58'); +/*!40000 ALTER TABLE `llx_menu` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_monitoring_probes` +-- + +DROP TABLE IF EXISTS `llx_monitoring_probes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_monitoring_probes` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(64) NOT NULL, + `groupname` varchar(64) DEFAULT NULL, + `url` varchar(250) NOT NULL, + `useproxy` int(11) DEFAULT '0', + `checkkey` varchar(250) DEFAULT NULL, + `maxval` int(11) DEFAULT NULL, + `frequency` int(11) DEFAULT '60', + `active` int(11) DEFAULT '1', + `status` int(11) DEFAULT '0', + `lastreset` datetime DEFAULT NULL, + `oldesterrortext` text, + `oldesterrordate` datetime DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_monitoring_probes` (`title`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_monitoring_probes` +-- + +LOCK TABLES `llx_monitoring_probes` WRITE; +/*!40000 ALTER TABLE `llx_monitoring_probes` DISABLE KEYS */; +INSERT INTO `llx_monitoring_probes` (`rowid`, `title`, `groupname`, `url`, `useproxy`, `checkkey`, `maxval`, `frequency`, `active`, `status`, `lastreset`, `oldesterrortext`, `oldesterrordate`) VALUES (1,'aaa',NULL,'http://www.chiensderace.com',0,'chiens',1000,10,1,1,'2011-04-20 23:46:41',NULL,NULL),(2,'ChatsDeRace',NULL,'http://www.chatsderace.com',0,'chats',1000,5,1,1,'2011-04-20 23:46:41',NULL,NULL); +/*!40000 ALTER TABLE `llx_monitoring_probes` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_notify` +-- + +DROP TABLE IF EXISTS `llx_notify`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_notify` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `daten` datetime DEFAULT NULL, + `fk_action` int(11) NOT NULL, + `fk_contact` int(11) DEFAULT NULL, + `fk_user` int(11) DEFAULT NULL, + `objet_type` varchar(24) NOT NULL, + `objet_id` int(11) NOT NULL, + `email` varchar(255) DEFAULT NULL, + `type` varchar(16) DEFAULT 'email', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_notify` +-- + +LOCK TABLES `llx_notify` WRITE; +/*!40000 ALTER TABLE `llx_notify` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_notify` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_notify_def` +-- + +DROP TABLE IF EXISTS `llx_notify_def`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_notify_def` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datec` date DEFAULT NULL, + `fk_action` int(11) NOT NULL, + `fk_soc` int(11) NOT NULL, + `fk_contact` int(11) DEFAULT NULL, + `fk_user` int(11) DEFAULT NULL, + `type` varchar(16) DEFAULT 'email', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_notify_def` +-- + +LOCK TABLES `llx_notify_def` WRITE; +/*!40000 ALTER TABLE `llx_notify_def` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_notify_def` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_paiement` +-- + +DROP TABLE IF EXISTS `llx_paiement`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_paiement` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `entity` int(11) NOT NULL DEFAULT '1', + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datep` datetime DEFAULT NULL, + `amount` double(24,8) DEFAULT NULL, + `fk_paiement` int(11) NOT NULL, + `num_paiement` varchar(50) DEFAULT NULL, + `note` text, + `fk_bank` int(11) NOT NULL DEFAULT '0', + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + `statut` smallint(6) NOT NULL DEFAULT '0', + `fk_export_compta` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_paiement` +-- + +LOCK TABLES `llx_paiement` WRITE; +/*!40000 ALTER TABLE `llx_paiement` DISABLE KEYS */; +INSERT INTO `llx_paiement` (`rowid`, `entity`, `datec`, `tms`, `datep`, `amount`, `fk_paiement`, `num_paiement`, `note`, `fk_bank`, `fk_user_creat`, `fk_user_modif`, `statut`, `fk_export_compta`) VALUES (1,1,'2010-07-10 14:59:41','2010-07-10 12:59:41','2010-07-10 12:00:00',0.02000000,4,'','',4,1,NULL,0,0),(2,1,'2011-07-18 20:50:24','2011-07-18 18:50:24','2011-07-08 12:00:00',20.00000000,6,'','',5,1,NULL,0,0),(3,1,'2011-07-18 20:50:47','2011-07-18 18:50:47','2011-07-08 12:00:00',10.00000000,4,'','',6,1,NULL,0,0),(5,1,'2011-08-01 03:34:11','2011-08-01 01:34:11','2011-08-01 03:34:11',5.63000000,6,'','Payment Invoice FA1108-0003',8,1,NULL,0,0),(6,1,'2011-08-06 20:33:54','2011-08-06 18:33:54','2011-08-06 20:33:53',5.98000000,4,'','Payment Invoice FA1108-0004',13,1,NULL,0,0),(8,1,'2011-08-08 02:53:40','2011-08-08 00:53:40','2011-08-08 12:00:00',26.10000000,4,'','',14,1,NULL,0,0),(9,1,'2011-08-08 02:55:58','2011-08-08 00:55:58','2011-08-08 12:00:00',26.96000000,1,'','',15,1,NULL,0,0); +/*!40000 ALTER TABLE `llx_paiement` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_paiement_facture` +-- + +DROP TABLE IF EXISTS `llx_paiement_facture`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_paiement_facture` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_paiement` int(11) DEFAULT NULL, + `fk_facture` int(11) DEFAULT NULL, + `amount` double(24,8) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_paiement_facture` (`fk_paiement`,`fk_facture`), + KEY `idx_paiement_facture_fk_facture` (`fk_facture`), + KEY `idx_paiement_facture_fk_paiement` (`fk_paiement`), + CONSTRAINT `fk_paiement_facture_fk_facture` FOREIGN KEY (`fk_facture`) REFERENCES `llx_facture` (`rowid`), + CONSTRAINT `fk_paiement_facture_fk_paiement` FOREIGN KEY (`fk_paiement`) REFERENCES `llx_paiement` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_paiement_facture` +-- + +LOCK TABLES `llx_paiement_facture` WRITE; +/*!40000 ALTER TABLE `llx_paiement_facture` DISABLE KEYS */; +INSERT INTO `llx_paiement_facture` (`rowid`, `fk_paiement`, `fk_facture`, `amount`) VALUES (1,1,1,0.02000000),(2,2,2,20.00000000),(3,3,2,10.00000000),(5,5,5,5.63000000),(6,6,6,5.98000000),(9,8,2,16.10000000),(10,8,8,10.00000000),(11,9,3,15.00000000),(12,9,9,11.96000000); +/*!40000 ALTER TABLE `llx_paiement_facture` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_paiementcharge` +-- + +DROP TABLE IF EXISTS `llx_paiementcharge`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_paiementcharge` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_charge` int(11) DEFAULT NULL, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datep` datetime DEFAULT NULL, + `amount` double DEFAULT '0', + `fk_typepaiement` int(11) NOT NULL, + `num_paiement` varchar(50) DEFAULT NULL, + `note` text, + `fk_bank` int(11) NOT NULL, + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_paiementcharge` +-- + +LOCK TABLES `llx_paiementcharge` WRITE; +/*!40000 ALTER TABLE `llx_paiementcharge` DISABLE KEYS */; +INSERT INTO `llx_paiementcharge` (`rowid`, `fk_charge`, `datec`, `tms`, `datep`, `amount`, `fk_typepaiement`, `num_paiement`, `note`, `fk_bank`, `fk_user_creat`, `fk_user_modif`) VALUES (4,4,'2011-08-05 23:11:37','2011-08-05 21:11:37','2011-08-05 12:00:00',10,2,'','',12,1,NULL); +/*!40000 ALTER TABLE `llx_paiementcharge` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_paiementfourn` +-- + +DROP TABLE IF EXISTS `llx_paiementfourn`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_paiementfourn` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datec` datetime DEFAULT NULL, + `datep` datetime DEFAULT NULL, + `amount` double DEFAULT '0', + `fk_user_author` int(11) DEFAULT NULL, + `fk_paiement` int(11) NOT NULL, + `num_paiement` varchar(50) DEFAULT NULL, + `note` text, + `fk_bank` int(11) NOT NULL, + `statut` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_paiementfourn` +-- + +LOCK TABLES `llx_paiementfourn` WRITE; +/*!40000 ALTER TABLE `llx_paiementfourn` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_paiementfourn` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_paiementfourn_facturefourn` +-- + +DROP TABLE IF EXISTS `llx_paiementfourn_facturefourn`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_paiementfourn_facturefourn` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_paiementfourn` int(11) DEFAULT NULL, + `fk_facturefourn` int(11) DEFAULT NULL, + `amount` double DEFAULT '0', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_paiementfourn_facturefourn` (`fk_paiementfourn`,`fk_facturefourn`), + KEY `idx_paiementfourn_facturefourn_fk_facture` (`fk_facturefourn`), + KEY `idx_paiementfourn_facturefourn_fk_paiement` (`fk_paiementfourn`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_paiementfourn_facturefourn` +-- + +LOCK TABLES `llx_paiementfourn_facturefourn` WRITE; +/*!40000 ALTER TABLE `llx_paiementfourn_facturefourn` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_paiementfourn_facturefourn` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_prelevement_bons` +-- + +DROP TABLE IF EXISTS `llx_prelevement_bons`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_prelevement_bons` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(12) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `datec` datetime DEFAULT NULL, + `amount` double DEFAULT '0', + `statut` smallint(6) DEFAULT '0', + `credite` smallint(6) DEFAULT '0', + `note` text, + `date_trans` datetime DEFAULT NULL, + `method_trans` smallint(6) DEFAULT NULL, + `fk_user_trans` int(11) DEFAULT NULL, + `date_credit` datetime DEFAULT NULL, + `fk_user_credit` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_prelevement_bons_ref` (`ref`,`entity`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_prelevement_bons` +-- + +LOCK TABLES `llx_prelevement_bons` WRITE; +/*!40000 ALTER TABLE `llx_prelevement_bons` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_prelevement_bons` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_prelevement_facture` +-- + +DROP TABLE IF EXISTS `llx_prelevement_facture`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_prelevement_facture` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_facture` int(11) NOT NULL, + `fk_prelevement_lignes` int(11) NOT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_prelevement_facture_fk_prelevement_lignes` (`fk_prelevement_lignes`), + CONSTRAINT `fk_prelevement_facture_fk_prelevement_lignes` FOREIGN KEY (`fk_prelevement_lignes`) REFERENCES `llx_prelevement_lignes` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_prelevement_facture` +-- + +LOCK TABLES `llx_prelevement_facture` WRITE; +/*!40000 ALTER TABLE `llx_prelevement_facture` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_prelevement_facture` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_prelevement_facture_demande` +-- + +DROP TABLE IF EXISTS `llx_prelevement_facture_demande`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_prelevement_facture_demande` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_facture` int(11) NOT NULL, + `amount` double NOT NULL, + `date_demande` datetime NOT NULL, + `traite` smallint(6) DEFAULT '0', + `date_traite` datetime DEFAULT NULL, + `fk_prelevement_bons` int(11) DEFAULT NULL, + `fk_user_demande` int(11) NOT NULL, + `code_banque` varchar(7) DEFAULT NULL, + `code_guichet` varchar(6) DEFAULT NULL, + `number` varchar(255) DEFAULT NULL, + `cle_rib` varchar(5) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_prelevement_facture_demande` +-- + +LOCK TABLES `llx_prelevement_facture_demande` WRITE; +/*!40000 ALTER TABLE `llx_prelevement_facture_demande` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_prelevement_facture_demande` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_prelevement_lignes` +-- + +DROP TABLE IF EXISTS `llx_prelevement_lignes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_prelevement_lignes` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_prelevement_bons` int(11) DEFAULT NULL, + `fk_soc` int(11) NOT NULL, + `statut` smallint(6) DEFAULT '0', + `client_nom` varchar(255) DEFAULT NULL, + `amount` double DEFAULT '0', + `code_banque` varchar(7) DEFAULT NULL, + `code_guichet` varchar(6) DEFAULT NULL, + `number` varchar(255) DEFAULT NULL, + `cle_rib` varchar(5) DEFAULT NULL, + `note` text, + PRIMARY KEY (`rowid`), + KEY `idx_prelevement_lignes_fk_prelevement_bons` (`fk_prelevement_bons`), + CONSTRAINT `fk_prelevement_lignes_fk_prelevement_bons` FOREIGN KEY (`fk_prelevement_bons`) REFERENCES `llx_prelevement_bons` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_prelevement_lignes` +-- + +LOCK TABLES `llx_prelevement_lignes` WRITE; +/*!40000 ALTER TABLE `llx_prelevement_lignes` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_prelevement_lignes` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_prelevement_rejet` +-- + +DROP TABLE IF EXISTS `llx_prelevement_rejet`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_prelevement_rejet` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_prelevement_lignes` int(11) DEFAULT NULL, + `date_rejet` datetime DEFAULT NULL, + `motif` int(11) DEFAULT NULL, + `date_creation` datetime DEFAULT NULL, + `fk_user_creation` int(11) DEFAULT NULL, + `note` text, + `afacturer` tinyint(4) DEFAULT '0', + `fk_facture` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_prelevement_rejet` +-- + +LOCK TABLES `llx_prelevement_rejet` WRITE; +/*!40000 ALTER TABLE `llx_prelevement_rejet` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_prelevement_rejet` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_product` +-- + +DROP TABLE IF EXISTS `llx_product`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_product` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `virtual` tinyint(4) NOT NULL DEFAULT '0', + `fk_parent` int(11) DEFAULT '0', + `ref` varchar(32) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `ref_ext` varchar(32) DEFAULT NULL, + `label` varchar(255) NOT NULL, + `description` text, + `note` text, + `customcode` varchar(32) DEFAULT NULL, + `fk_country` int(11) DEFAULT NULL, + `price` double(24,8) DEFAULT '0.00000000', + `price_ttc` double(24,8) DEFAULT '0.00000000', + `price_min` double(24,8) DEFAULT '0.00000000', + `price_min_ttc` double(24,8) DEFAULT '0.00000000', + `price_base_type` varchar(3) DEFAULT 'HT', + `tva_tx` double(6,3) DEFAULT NULL, + `recuperableonly` int(11) NOT NULL DEFAULT '0', + `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT '0.000', + `fk_user_author` int(11) DEFAULT NULL, + `tosell` tinyint(4) DEFAULT '1', + `tobuy` tinyint(4) DEFAULT '1', + `fk_product_type` int(11) DEFAULT '0', + `duration` varchar(6) DEFAULT NULL, + `seuil_stock_alerte` int(11) DEFAULT '0', + `barcode` varchar(255) DEFAULT NULL, + `fk_barcode_type` int(11) DEFAULT '0', + `accountancy_code_sell` varchar(15) DEFAULT NULL, + `accountancy_code_buy` varchar(15) DEFAULT NULL, + `partnumber` varchar(32) DEFAULT NULL, + `weight` float DEFAULT NULL, + `weight_units` tinyint(4) DEFAULT NULL, + `length` float DEFAULT NULL, + `length_units` tinyint(4) DEFAULT NULL, + `surface` float DEFAULT NULL, + `surface_units` tinyint(4) DEFAULT NULL, + `volume` float DEFAULT NULL, + `volume_units` tinyint(4) DEFAULT NULL, + `stock` int(11) DEFAULT NULL, + `pmp` double(24,8) NOT NULL DEFAULT '0.00000000', + `canvas` varchar(32) DEFAULT 'default@product', + `finished` tinyint(4) DEFAULT NULL, + `hidden` tinyint(4) DEFAULT '0', + `import_key` varchar(14) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_product_ref` (`ref`,`entity`), + KEY `idx_product_label` (`label`), + KEY `idx_product_barcode` (`barcode`), + KEY `idx_product_import_key` (`import_key`) +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_product` +-- + +LOCK TABLES `llx_product` WRITE; +/*!40000 ALTER TABLE `llx_product` DISABLE KEYS */; +INSERT INTO `llx_product` (`rowid`, `datec`, `tms`, `virtual`, `fk_parent`, `ref`, `entity`, `ref_ext`, `label`, `description`, `note`, `customcode`, `fk_country`, `price`, `price_ttc`, `price_min`, `price_min_ttc`, `price_base_type`, `tva_tx`, `recuperableonly`, `localtax1_tx`, `localtax2_tx`, `fk_user_author`, `tosell`, `tobuy`, `fk_product_type`, `duration`, `seuil_stock_alerte`, `barcode`, `fk_barcode_type`, `accountancy_code_sell`, `accountancy_code_buy`, `partnumber`, `weight`, `weight_units`, `length`, `length_units`, `surface`, `surface_units`, `volume`, `volume_units`, `stock`, `pmp`, `canvas`, `finished`, `hidden`, `import_key`) VALUES (1,'2010-07-08 14:33:17','2010-07-21 23:19:50',0,0,'PIDRESS',1,NULL,'Pink dress','A beatifull pink dress','',NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,1,0,'',20,NULL,0,'','',NULL,100,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,'default@product',1,0,NULL),(2,'2010-07-09 00:30:01','2010-07-21 23:19:50',0,0,'Product_P1',1,NULL,'Product P1','','',NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,1,0,'',NULL,NULL,0,'','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,'default@product',1,0,NULL),(3,'2010-07-09 00:30:25','2010-07-21 23:19:50',0,0,'Service_S1',1,NULL,'Service S1','','',NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,1,1,'1m',NULL,NULL,0,'','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,'service@product',0,0,NULL),(4,'2010-07-10 14:44:06','2011-07-31 22:34:27',0,0,'DECAP',1,NULL,'Decapsuleur','','',NULL,NULL,5.00000000,5.62500000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,1,0,'',NULL,NULL,0,'','',NULL,2,-3,NULL,0,NULL,0,NULL,0,NULL,10.00000000,'default@product',1,0,NULL),(5,'2011-07-20 23:11:38','2011-07-27 17:02:59',0,0,'aaaa',1,NULL,'aaaa','cccc','bbbb','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,1,1,0,'',NULL,NULL,0,'','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,'',1,0,NULL),(6,'2011-07-29 22:16:44','2011-07-29 20:16:44',0,0,'Copy_of_aaaa',1,NULL,'aaaa','cccc','bbbb','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,0,1,0,'',NULL,NULL,0,'','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,'',1,0,NULL),(7,'2011-07-29 22:31:21','2011-07-29 20:31:21',0,0,'Copy_of_Copy_of_aaaa',1,NULL,'aaaa','cccc','bbbb','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,0,0,0,'',NULL,NULL,0,'','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,'',1,0,NULL),(8,'2011-07-29 22:46:54','2012-04-11 10:11:34',0,0,'A_cloned_product',1,NULL,'aaaa','This is a cloned product from product aaaa then modified.','This was a test','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,0,0,0,'',NULL,NULL,0,'','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,'',1,0,NULL),(10,'2008-12-31 00:00:00','2011-07-29 21:23:10',0,0,'PR123456',1,NULL,'My product','This is a description example for record','Some note',NULL,NULL,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,0.000,NULL,0,0,0,'1y',0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,'default@product',NULL,0,'20110729232310'); +/*!40000 ALTER TABLE `llx_product` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_product_association` +-- + +DROP TABLE IF EXISTS `llx_product_association`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_product_association` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_product_pere` int(11) NOT NULL DEFAULT '0', + `fk_product_fils` int(11) NOT NULL DEFAULT '0', + `qty` double DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_product_association` (`fk_product_pere`,`fk_product_fils`), + KEY `idx_product_association` (`fk_product_fils`), + KEY `idx_product_association_fils` (`fk_product_fils`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_product_association` +-- + +LOCK TABLES `llx_product_association` WRITE; +/*!40000 ALTER TABLE `llx_product_association` DISABLE KEYS */; +INSERT INTO `llx_product_association` (`rowid`, `fk_product_pere`, `fk_product_fils`, `qty`) VALUES (1,4,1,2),(2,5,1,1); +/*!40000 ALTER TABLE `llx_product_association` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_product_ca` +-- + +DROP TABLE IF EXISTS `llx_product_ca`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_product_ca` ( + `fk_product` int(11) DEFAULT NULL, + `date_calcul` datetime DEFAULT NULL, + `year` smallint(5) unsigned DEFAULT NULL, + `ca_genere` float DEFAULT NULL, + UNIQUE KEY `fk_product` (`fk_product`,`year`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_product_ca` +-- + +LOCK TABLES `llx_product_ca` WRITE; +/*!40000 ALTER TABLE `llx_product_ca` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_product_ca` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_product_extrafields` +-- + +DROP TABLE IF EXISTS `llx_product_extrafields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_product_extrafields` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_object` int(11) NOT NULL, + `import_key` varchar(14) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_product_extrafields` (`fk_object`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_product_extrafields` +-- + +LOCK TABLES `llx_product_extrafields` WRITE; +/*!40000 ALTER TABLE `llx_product_extrafields` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_product_extrafields` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_product_fournisseur` +-- + +DROP TABLE IF EXISTS `llx_product_fournisseur`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_product_fournisseur` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_product` int(11) DEFAULT NULL, + `fk_soc` int(11) DEFAULT NULL, + `ref_fourn` varchar(30) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `fk_user_author` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_product_fournisseur_ref` (`ref_fourn`,`fk_soc`,`entity`), + KEY `idx_product_fourn_fk_product` (`fk_product`,`entity`), + KEY `idx_product_fourn_fk_soc` (`fk_soc`,`entity`), + CONSTRAINT `fk_product_fournisseur_fk_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_product_fournisseur` +-- + +LOCK TABLES `llx_product_fournisseur` WRITE; +/*!40000 ALTER TABLE `llx_product_fournisseur` DISABLE KEYS */; +INSERT INTO `llx_product_fournisseur` (`rowid`, `datec`, `tms`, `fk_product`, `fk_soc`, `ref_fourn`, `entity`, `fk_user_author`) VALUES (1,'2010-07-11 18:45:42','2010-07-11 16:45:42',4,1,'ABCD',1,1); +/*!40000 ALTER TABLE `llx_product_fournisseur` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_product_fournisseur_price` +-- + +DROP TABLE IF EXISTS `llx_product_fournisseur_price`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_product_fournisseur_price` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_product` int(11) DEFAULT NULL, + `fk_soc` int(11) DEFAULT NULL, + `ref_fourn` varchar(30) DEFAULT NULL, + `fk_product_fournisseur` int(11) NOT NULL, + `fk_availability` int(11) DEFAULT NULL, + `price` double(24,8) DEFAULT '0.00000000', + `quantity` double DEFAULT NULL, + `unitprice` double(24,8) DEFAULT '0.00000000', + `tva_tx` double(6,3) NOT NULL DEFAULT '0.000', + `fk_user` int(11) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_product_fournisseur_price_ref` (`ref_fourn`,`fk_soc`,`quantity`,`entity`), + KEY `idx_product_fournisseur_price_fk_user` (`fk_user`), + KEY `idx_product_fourn_price_fk_product` (`fk_product`,`entity`), + KEY `idx_product_fourn_price_fk_soc` (`fk_soc`,`entity`), + CONSTRAINT `fk_product_fournisseur_price_fk_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`), + CONSTRAINT `fk_product_fournisseur_price_fk_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_product_fournisseur_price` +-- + +LOCK TABLES `llx_product_fournisseur_price` WRITE; +/*!40000 ALTER TABLE `llx_product_fournisseur_price` DISABLE KEYS */; +INSERT INTO `llx_product_fournisseur_price` (`rowid`, `datec`, `tms`, `fk_product`, `fk_soc`, `ref_fourn`, `fk_product_fournisseur`, `fk_availability`, `price`, `quantity`, `unitprice`, `tva_tx`, `fk_user`, `entity`) VALUES (1,'2010-07-11 18:45:42','2012-04-11 10:03:58',4,1,'ABCD',1,NULL,10.00000000,1,10.00000000,0.000,1,1); +/*!40000 ALTER TABLE `llx_product_fournisseur_price` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_product_fournisseur_price_log` +-- + +DROP TABLE IF EXISTS `llx_product_fournisseur_price_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_product_fournisseur_price_log` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `fk_product_fournisseur` int(11) NOT NULL, + `price` double(24,8) DEFAULT '0.00000000', + `quantity` double DEFAULT NULL, + `fk_user` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_product_fournisseur_price_log` +-- + +LOCK TABLES `llx_product_fournisseur_price_log` WRITE; +/*!40000 ALTER TABLE `llx_product_fournisseur_price_log` DISABLE KEYS */; +INSERT INTO `llx_product_fournisseur_price_log` (`rowid`, `datec`, `fk_product_fournisseur`, `price`, `quantity`, `fk_user`) VALUES (1,'2010-07-11 18:45:42',1,10.00000000,1,1); +/*!40000 ALTER TABLE `llx_product_fournisseur_price_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_product_lang` +-- + +DROP TABLE IF EXISTS `llx_product_lang`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_product_lang` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_product` int(11) NOT NULL DEFAULT '0', + `lang` varchar(5) NOT NULL DEFAULT '0', + `label` varchar(255) NOT NULL, + `description` text, + `note` text, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_product_lang` (`fk_product`,`lang`), + CONSTRAINT `fk_product_lang_fk_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_product_lang` +-- + +LOCK TABLES `llx_product_lang` WRITE; +/*!40000 ALTER TABLE `llx_product_lang` DISABLE KEYS */; +INSERT INTO `llx_product_lang` (`rowid`, `fk_product`, `lang`, `label`, `description`, `note`) VALUES (1,1,'en_US','Pink dress','A beatifull pink dress',''),(2,2,'en_US','Product P1','',''),(3,3,'en_US','Service S1','',''),(4,4,'fr_FR','Decapsuleur','',''),(5,5,'en_US','aaaa','cccc','bbbb'),(6,6,'en_US','aaaa','cccc','bbbb'),(7,7,'en_US','aaaa','cccc','bbbb'),(8,8,'en_US','aaaa','This is a cloned product from product aaaa then modified.','This was a test'); +/*!40000 ALTER TABLE `llx_product_lang` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_product_price` +-- + +DROP TABLE IF EXISTS `llx_product_price`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_product_price` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `entity` int(11) NOT NULL DEFAULT '1', + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_product` int(11) NOT NULL, + `date_price` datetime NOT NULL, + `price_level` smallint(6) DEFAULT '1', + `price` double(24,8) DEFAULT NULL, + `price_ttc` double(24,8) DEFAULT NULL, + `price_min` double(24,8) DEFAULT NULL, + `price_min_ttc` double(24,8) DEFAULT NULL, + `price_base_type` varchar(3) DEFAULT 'HT', + `tva_tx` double(6,3) NOT NULL, + `recuperableonly` int(11) NOT NULL DEFAULT '0', + `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT '0.000', + `fk_user_author` int(11) DEFAULT NULL, + `tosell` tinyint(4) DEFAULT '1', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_product_price` +-- + +LOCK TABLES `llx_product_price` WRITE; +/*!40000 ALTER TABLE `llx_product_price` DISABLE KEYS */; +INSERT INTO `llx_product_price` (`rowid`, `entity`, `tms`, `fk_product`, `date_price`, `price_level`, `price`, `price_ttc`, `price_min`, `price_min_ttc`, `price_base_type`, `tva_tx`, `recuperableonly`, `localtax1_tx`, `localtax2_tx`, `fk_user_author`, `tosell`) VALUES (1,1,'2010-07-08 12:33:17',1,'2010-07-08 14:33:17',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1),(2,1,'2010-07-08 22:30:01',2,'2010-07-09 00:30:01',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1),(3,1,'2010-07-08 22:30:25',3,'2010-07-09 00:30:25',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1),(4,1,'2010-07-10 12:44:06',4,'2010-07-10 14:44:06',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1),(5,1,'2011-07-20 21:11:38',5,'2011-07-20 23:11:38',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,1),(6,1,'2011-07-27 17:02:59',5,'2011-07-27 19:02:59',1,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,1),(7,1,'2011-07-29 20:16:44',6,'2011-07-29 22:16:44',1,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,0),(8,1,'2011-07-29 20:31:21',7,'2011-07-29 22:31:21',1,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,0),(9,1,'2011-07-29 20:46:54',8,'2011-07-29 22:46:54',1,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,0),(10,1,'2011-07-31 22:34:27',4,'2011-08-01 00:34:27',1,5.00000000,5.62500000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1); +/*!40000 ALTER TABLE `llx_product_price` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_product_stock` +-- + +DROP TABLE IF EXISTS `llx_product_stock`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_product_stock` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_product` int(11) NOT NULL, + `fk_entrepot` int(11) NOT NULL, + `reel` double DEFAULT NULL, + `pmp` double(24,8) NOT NULL DEFAULT '0.00000000', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_product_stock` (`fk_product`,`fk_entrepot`), + KEY `idx_product_stock_fk_product` (`fk_product`), + KEY `idx_product_stock_fk_entrepot` (`fk_entrepot`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_product_stock` +-- + +LOCK TABLES `llx_product_stock` WRITE; +/*!40000 ALTER TABLE `llx_product_stock` DISABLE KEYS */; +INSERT INTO `llx_product_stock` (`rowid`, `tms`, `fk_product`, `fk_entrepot`, `reel`, `pmp`) VALUES (1,'2010-07-08 22:43:51',2,2,1000,0.00000000),(3,'2010-07-10 23:02:20',4,2,1000,0.00000000),(4,'2010-07-11 16:49:44',4,1,2,10.00000000),(5,'2010-07-11 16:49:44',1,1,4,0.00000000); +/*!40000 ALTER TABLE `llx_product_stock` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_product_subproduct` +-- + +DROP TABLE IF EXISTS `llx_product_subproduct`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_product_subproduct` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_product` int(11) NOT NULL, + `fk_product_subproduct` int(11) NOT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `fk_product` (`fk_product`,`fk_product_subproduct`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_product_subproduct` +-- + +LOCK TABLES `llx_product_subproduct` WRITE; +/*!40000 ALTER TABLE `llx_product_subproduct` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_product_subproduct` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_projet` +-- + +DROP TABLE IF EXISTS `llx_projet`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_projet` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_soc` int(11) DEFAULT NULL, + `datec` date DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `dateo` date DEFAULT NULL, + `datee` date DEFAULT NULL, + `ref` varchar(50) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `title` varchar(255) NOT NULL, + `description` text, + `fk_user_creat` int(11) NOT NULL, + `public` int(11) DEFAULT NULL, + `fk_statut` smallint(6) NOT NULL DEFAULT '0', + `note_private` text, + `note_public` text, + `model_pdf` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_projet_ref` (`ref`,`entity`), + KEY `idx_projet_fk_soc` (`fk_soc`), + CONSTRAINT `fk_projet_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_projet` +-- + +LOCK TABLES `llx_projet` WRITE; +/*!40000 ALTER TABLE `llx_projet` DISABLE KEYS */; +INSERT INTO `llx_projet` (`rowid`, `fk_soc`, `datec`, `tms`, `dateo`, `datee`, `ref`, `entity`, `title`, `description`, `fk_user_creat`, `public`, `fk_statut`, `note_private`, `note_public`, `model_pdf`) VALUES (1,NULL,'2010-07-09','2010-07-11 13:28:28','2010-07-09',NULL,'PROJ1',1,'Project One','',1,0,1,NULL,NULL,'baleine'),(2,NULL,'2010-07-09','2010-07-08 22:49:56','2010-07-09',NULL,'PROJ2',1,'Project Two','',1,0,0,NULL,NULL,NULL),(3,1,'2010-07-09','2010-07-08 22:50:19','2010-07-09',NULL,'PROJABC',1,'Project to create ABC company','',1,0,0,NULL,NULL,NULL),(4,NULL,'2010-07-09','2010-07-08 22:50:49','2010-07-09',NULL,'PROJSHARED',1,'The Global project','',1,1,1,NULL,NULL,NULL),(5,NULL,'2010-07-11','2010-07-11 14:22:49','2010-07-11','2011-07-14','RMLL',1,'Projet gestion RMLL 2011','',1,1,1,NULL,NULL,NULL); +/*!40000 ALTER TABLE `llx_projet` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_projet_task` +-- + +DROP TABLE IF EXISTS `llx_projet_task`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_projet_task` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_projet` int(11) NOT NULL, + `fk_task_parent` int(11) NOT NULL DEFAULT '0', + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `dateo` datetime DEFAULT NULL, + `datee` datetime DEFAULT NULL, + `datev` datetime DEFAULT NULL, + `label` varchar(255) NOT NULL, + `description` text, + `duration_effective` double NOT NULL DEFAULT '0', + `progress` int(11) DEFAULT '0', + `priority` int(11) DEFAULT '0', + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `fk_statut` smallint(6) NOT NULL DEFAULT '0', + `note_private` text, + `note_public` text, + `rang` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`), + KEY `idx_projet_task_fk_projet` (`fk_projet`), + KEY `idx_projet_task_fk_user_creat` (`fk_user_creat`), + KEY `idx_projet_task_fk_user_valid` (`fk_user_valid`), + CONSTRAINT `fk_projet_task_fk_projet` FOREIGN KEY (`fk_projet`) REFERENCES `llx_projet` (`rowid`), + CONSTRAINT `fk_projet_task_fk_user_creat` FOREIGN KEY (`fk_user_creat`) REFERENCES `llx_user` (`rowid`), + CONSTRAINT `fk_projet_task_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_projet_task` +-- + +LOCK TABLES `llx_projet_task` WRITE; +/*!40000 ALTER TABLE `llx_projet_task` DISABLE KEYS */; +INSERT INTO `llx_projet_task` (`rowid`, `fk_projet`, `fk_task_parent`, `datec`, `tms`, `dateo`, `datee`, `datev`, `label`, `description`, `duration_effective`, `progress`, `priority`, `fk_user_creat`, `fk_user_valid`, `fk_statut`, `note_private`, `note_public`, `rang`) VALUES (1,1,0,'2010-07-11 15:15:55','2011-02-06 11:20:20','2010-07-11 12:00:00',NULL,NULL,'Work on module','',25920000,0,0,1,NULL,0,NULL,NULL,0),(2,5,0,'2010-07-11 16:23:53','2010-07-11 14:25:39','2010-07-11 12:00:00','2011-07-14 12:00:00',NULL,'Heberger site RMLL','',0,0,0,1,NULL,0,NULL,NULL,0); +/*!40000 ALTER TABLE `llx_projet_task` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_projet_task_time` +-- + +DROP TABLE IF EXISTS `llx_projet_task_time`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_projet_task_time` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_task` int(11) NOT NULL, + `task_date` date DEFAULT NULL, + `task_duration` double DEFAULT NULL, + `fk_user` int(11) DEFAULT NULL, + `note` text, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_projet_task_time` +-- + +LOCK TABLES `llx_projet_task_time` WRITE; +/*!40000 ALTER TABLE `llx_projet_task_time` DISABLE KEYS */; +INSERT INTO `llx_projet_task_time` (`rowid`, `fk_task`, `task_date`, `task_duration`, `fk_user`, `note`) VALUES (1,1,'2010-07-11',25920000,1,''); +/*!40000 ALTER TABLE `llx_projet_task_time` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_propal` +-- + +DROP TABLE IF EXISTS `llx_propal`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_propal` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_soc` int(11) DEFAULT NULL, + `fk_projet` int(11) DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `ref` varchar(30) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `ref_ext` varchar(255) DEFAULT NULL, + `ref_int` varchar(255) DEFAULT NULL, + `ref_client` varchar(255) DEFAULT NULL, + `datec` datetime DEFAULT NULL, + `datep` date DEFAULT NULL, + `fin_validite` datetime DEFAULT NULL, + `date_valid` datetime DEFAULT NULL, + `date_cloture` datetime DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `fk_user_cloture` int(11) DEFAULT NULL, + `fk_statut` smallint(6) NOT NULL DEFAULT '0', + `price` double DEFAULT '0', + `remise_percent` double DEFAULT '0', + `remise_absolue` double DEFAULT '0', + `remise` double DEFAULT '0', + `total_ht` double(24,8) DEFAULT '0.00000000', + `tva` double(24,8) DEFAULT '0.00000000', + `localtax1` double(24,8) DEFAULT '0.00000000', + `localtax2` double(24,8) DEFAULT '0.00000000', + `total` double(24,8) DEFAULT '0.00000000', + `fk_account` int(11) DEFAULT NULL, + `fk_currency` varchar(2) DEFAULT NULL, + `fk_cond_reglement` int(11) DEFAULT NULL, + `fk_mode_reglement` int(11) DEFAULT NULL, + `note` text, + `note_public` text, + `model_pdf` varchar(255) DEFAULT NULL, + `date_livraison` date DEFAULT NULL, + `fk_availability` int(11) DEFAULT NULL, + `fk_adresse_livraison` int(11) DEFAULT NULL, + `fk_demand_reason` int(11) DEFAULT '0', + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_propal_ref` (`ref`,`entity`), + KEY `idx_propal_fk_soc` (`fk_soc`), + KEY `idx_propal_fk_user_author` (`fk_user_author`), + KEY `idx_propal_fk_user_valid` (`fk_user_valid`), + KEY `idx_propal_fk_user_cloture` (`fk_user_cloture`), + KEY `idx_propal_fk_projet` (`fk_projet`), + KEY `idx_propal_fk_account` (`fk_account`), + KEY `idx_propal_fk_currency` (`fk_currency`), + CONSTRAINT `fk_propal_fk_currency` FOREIGN KEY (`fk_currency`) REFERENCES `llx_c_currencies` (`code_iso`), + CONSTRAINT `fk_propal_fk_projet` FOREIGN KEY (`fk_projet`) REFERENCES `llx_projet` (`rowid`), + CONSTRAINT `fk_propal_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), + CONSTRAINT `fk_propal_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), + CONSTRAINT `fk_propal_fk_user_cloture` FOREIGN KEY (`fk_user_cloture`) REFERENCES `llx_user` (`rowid`), + CONSTRAINT `fk_propal_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_propal` +-- + +LOCK TABLES `llx_propal` WRITE; +/*!40000 ALTER TABLE `llx_propal` DISABLE KEYS */; +INSERT INTO `llx_propal` (`rowid`, `fk_soc`, `fk_projet`, `tms`, `ref`, `entity`, `ref_ext`, `ref_int`, `ref_client`, `datec`, `datep`, `fin_validite`, `date_valid`, `date_cloture`, `fk_user_author`, `fk_user_valid`, `fk_user_cloture`, `fk_statut`, `price`, `remise_percent`, `remise_absolue`, `remise`, `total_ht`, `tva`, `localtax1`, `localtax2`, `total`, `fk_account`, `fk_currency`, `fk_cond_reglement`, `fk_mode_reglement`, `note`, `note_public`, `model_pdf`, `date_livraison`, `fk_availability`, `fk_adresse_livraison`, `fk_demand_reason`, `import_key`, `extraparams`) VALUES (1,2,NULL,'2012-04-11 10:03:49','PR1007-0001',1,NULL,NULL,'','2010-07-09 01:33:49','2010-07-09','2010-07-24 12:00:00','2011-08-08 14:24:18',NULL,1,1,NULL,1,0,NULL,NULL,0,30.00000000,3.84000000,0.00000000,0.00000000,33.84000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,0,NULL,NULL),(2,1,NULL,'2012-04-11 10:03:49','PR1007-0002',1,NULL,NULL,'','2010-07-10 02:11:44','2010-07-10','2010-07-25 12:00:00','2010-07-10 02:12:55','2011-07-20 15:23:12',1,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,1,'','','azur',NULL,NULL,NULL,0,NULL,NULL),(3,4,NULL,'2012-04-11 10:03:49','PR1007-0003',1,NULL,NULL,'','2010-07-18 11:35:11','2010-07-18','2010-08-02 12:00:00','2010-07-18 11:36:18','2011-07-20 15:21:15',1,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,0,NULL,NULL),(4,17,NULL,'2012-04-11 10:03:49','PR1108-0004',1,NULL,NULL,'','2011-08-04 23:36:23','2011-08-05','2011-08-20 12:00:00','2011-08-08 14:24:24',NULL,1,1,NULL,1,0,NULL,NULL,0,30.00000000,5.88000000,0.00000000,0.00000000,35.88000000,NULL,NULL,1,0,'','','azur',NULL,0,NULL,0,NULL,NULL); +/*!40000 ALTER TABLE `llx_propal` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_propaldet` +-- + +DROP TABLE IF EXISTS `llx_propaldet`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_propaldet` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_propal` int(11) DEFAULT NULL, + `fk_parent_line` int(11) DEFAULT NULL, + `fk_product` int(11) DEFAULT NULL, + `description` text, + `fk_remise_except` int(11) DEFAULT NULL, + `tva_tx` double(6,3) DEFAULT '0.000', + `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT '0.000', + `qty` double DEFAULT NULL, + `remise_percent` double DEFAULT '0', + `remise` double DEFAULT '0', + `price` double DEFAULT NULL, + `subprice` double(24,8) DEFAULT '0.00000000', + `total_ht` double(24,8) DEFAULT '0.00000000', + `total_tva` double(24,8) DEFAULT '0.00000000', + `total_localtax1` double(24,8) DEFAULT '0.00000000', + `total_localtax2` double(24,8) DEFAULT '0.00000000', + `total_ttc` double(24,8) DEFAULT '0.00000000', + `product_type` int(11) DEFAULT '0', + `date_start` datetime DEFAULT NULL, + `date_end` datetime DEFAULT NULL, + `info_bits` int(11) DEFAULT '0', + `pa_ht` double(24,8) DEFAULT '0.00000000', + `marge_tx` double(6,3) DEFAULT '0.000', + `marque_tx` double(6,3) DEFAULT '0.000', + `special_code` int(10) unsigned DEFAULT '0', + `rang` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`), + KEY `idx_propaldet_fk_propal` (`fk_propal`), + KEY `idx_propaldet_fk_product` (`fk_product`), + CONSTRAINT `fk_propaldet_fk_propal` FOREIGN KEY (`fk_propal`) REFERENCES `llx_propal` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_propaldet` +-- + +LOCK TABLES `llx_propaldet` WRITE; +/*!40000 ALTER TABLE `llx_propaldet` DISABLE KEYS */; +INSERT INTO `llx_propaldet` (`rowid`, `fk_propal`, `fk_parent_line`, `fk_product`, `description`, `fk_remise_except`, `tva_tx`, `localtax1_tx`, `localtax2_tx`, `qty`, `remise_percent`, `remise`, `price`, `subprice`, `total_ht`, `total_tva`, `total_localtax1`, `total_localtax2`, `total_ttc`, `product_type`, `date_start`, `date_end`, `info_bits`, `pa_ht`, `marge_tx`, `marque_tx`, `special_code`, `rang`) VALUES (1,1,NULL,NULL,'Une machine à café',NULL,12.500,0.000,0.000,1,0,0,NULL,10.00000000,10.00000000,1.25000000,0.00000000,0.00000000,11.25000000,0,NULL,NULL,0,0.00000000,NULL,NULL,0,1),(2,2,NULL,NULL,'Product 1',NULL,0.000,0.000,0.000,1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,0.00000000,NULL,NULL,0,1),(3,2,NULL,2,'',NULL,0.000,0.000,0.000,1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,0.00000000,NULL,NULL,0,2),(4,3,NULL,NULL,'A new marvelous product',NULL,0.000,0.000,0.000,1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,0.00000000,NULL,NULL,0,1),(5,1,NULL,5,'cccc',NULL,19.600,0.000,0.000,1,0,0,NULL,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,0.00000000,NULL,NULL,0,2),(11,1,NULL,4,'',NULL,0.000,0.000,0.000,1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,0.00000000,NULL,NULL,0,3),(12,1,NULL,4,'',NULL,0.000,0.000,0.000,1,0,0,NULL,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,0.00000000,NULL,NULL,0,4),(13,1,NULL,4,'',NULL,12.500,0.000,0.000,1,0,0,NULL,5.00000000,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,0.00000000,NULL,NULL,0,5),(19,4,NULL,NULL,'bvbcvbcvbcbcbcb',NULL,19.600,0.000,0.000,1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,0.00000000,NULL,NULL,0,1),(20,4,NULL,NULL,'ghjhgjghjgh',NULL,19.600,0.000,0.000,1,0,0,NULL,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,0.00000000,NULL,NULL,0,2),(21,4,NULL,NULL,'ghjghjhgjg',NULL,19.600,0.000,0.000,2,0,0,10,10.00000000,20.00000000,3.92000000,0.00000000,0.00000000,23.92000000,1,NULL,NULL,0,0.00000000,0.000,0.000,0,3); +/*!40000 ALTER TABLE `llx_propaldet` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_rights_def` +-- + +DROP TABLE IF EXISTS `llx_rights_def`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_rights_def` ( + `id` int(11) NOT NULL DEFAULT '0', + `libelle` varchar(255) DEFAULT NULL, + `module` varchar(64) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `perms` varchar(50) DEFAULT NULL, + `subperms` varchar(50) DEFAULT NULL, + `type` varchar(1) DEFAULT NULL, + `bydefault` tinyint(4) DEFAULT '0', + PRIMARY KEY (`id`,`entity`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_rights_def` +-- + +LOCK TABLES `llx_rights_def` WRITE; +/*!40000 ALTER TABLE `llx_rights_def` DISABLE KEYS */; +INSERT INTO `llx_rights_def` (`id`, `libelle`, `module`, `entity`, `perms`, `subperms`, `type`, `bydefault`) VALUES (11,'Lire les factures','facture',1,'lire',NULL,'a',1),(12,'Creer/modifier les factures','facture',1,'creer',NULL,'a',0),(13,'Dévalider les factures','facture',1,'invoice_advance','unvalidate','a',0),(14,'Valider les factures','facture',1,'valider',NULL,'a',0),(15,'Envoyer les factures par mail','facture',1,'invoice_advance','send','a',0),(16,'Emettre des paiements sur les factures','facture',1,'paiement',NULL,'a',0),(19,'Supprimer les factures','facture',1,'supprimer',NULL,'a',0),(21,'Lire les propositions commerciales','propale',1,'lire',NULL,'r',1),(22,'Creer/modifier les propositions commerciales','propale',1,'creer',NULL,'w',0),(24,'Valider les propositions commerciales','propale',1,'valider',NULL,'d',0),(25,'Envoyer les propositions commerciales aux clients','propale',1,'propal_advance','send','d',0),(26,'Cloturer les propositions commerciales','propale',1,'cloturer',NULL,'d',0),(27,'Supprimer les propositions commerciales','propale',1,'supprimer',NULL,'d',0),(28,'Exporter les propositions commerciales et attributs','propale',1,'export',NULL,'r',0),(31,'Lire les produits','produit',1,'lire',NULL,'r',1),(32,'Creer/modifier les produits','produit',1,'creer',NULL,'w',0),(34,'Supprimer les produits','produit',1,'supprimer',NULL,'d',0),(38,'Exporter les produits','produit',1,'export',NULL,'r',0),(41,'Lire les projets et taches (partagés ou dont je suis contact)','projet',1,'lire',NULL,'r',1),(42,'Creer/modifier les projets et taches (partagés ou dont je suis contact)','projet',1,'creer',NULL,'w',0),(44,'Supprimer les projets et taches (partagés ou dont je suis contact)','projet',1,'supprimer',NULL,'d',0),(61,'Lire les fiches d\'intervention','ficheinter',1,'lire',NULL,'r',1),(62,'Creer/modifier les fiches d\'intervention','ficheinter',1,'creer',NULL,'w',0),(64,'Supprimer les fiches d\'intervention','ficheinter',1,'supprimer',NULL,'d',0),(67,'Exporter les fiches interventions','ficheinter',1,'export',NULL,'r',0),(68,'Envoyer les fiches d\'intervention par courriel','ficheinter',1,'ficheinter_advance','send','r',0),(71,'Read members\' card','adherent',1,'lire',NULL,'r',1),(72,'Create/modify members (need also user module permissions if member linked to a user)','adherent',1,'creer',NULL,'w',1),(74,'Remove members','adherent',1,'supprimer',NULL,'d',1),(75,'Setup types and attributes of members','adherent',1,'configurer',NULL,'w',1),(76,'Export members','adherent',1,'export',NULL,'r',0),(78,'Read subscriptions','adherent',1,'cotisation','lire','r',1),(79,'Create/modify/remove subscriptions','adherent',1,'cotisation','creer','w',1),(81,'Lire les commandes clients','commande',1,'lire',NULL,'r',1),(82,'Creer/modifier les commandes clients','commande',1,'creer',NULL,'w',0),(84,'Valider les commandes clients','commande',1,'valider',NULL,'d',0),(86,'Envoyer les commandes clients','commande',1,'order_advance','send','d',0),(87,'Cloturer les commandes clients','commande',1,'cloturer',NULL,'d',0),(88,'Annuler les commandes clients','commande',1,'annuler',NULL,'d',0),(89,'Supprimer les commandes clients','commande',1,'supprimer',NULL,'d',0),(91,'Lire les charges','tax',1,'charges','lire','r',1),(92,'Creer/modifier les charges','tax',1,'charges','creer','w',0),(93,'Supprimer les charges','tax',1,'charges','supprimer','d',0),(94,'Exporter les charges','tax',1,'charges','export','r',0),(95,'Lire CA, bilans, resultats','compta',1,'resultat','lire','r',1),(96,'Parametrer la ventilation','compta',1,'ventilation','parametrer','r',0),(97,'Lire les ventilations de factures','compta',1,'ventilation','lire','r',1),(98,'Ventiler les lignes de factures','compta',1,'ventilation','creer','r',0),(101,'Lire les expeditions','expedition',1,'lire',NULL,'r',1),(102,'Creer modifier les expeditions','expedition',1,'creer',NULL,'w',0),(104,'Valider les expeditions','expedition',1,'valider',NULL,'d',0),(105,'Envoyer les expeditions aux clients','expedition',1,'shipping_advance','send','d',0),(109,'Supprimer les expeditions','expedition',1,'supprimer',NULL,'d',0),(111,'Lire les comptes bancaires','banque',1,'lire',NULL,'r',1),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',1,'modifier',NULL,'w',0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',1,'configurer',NULL,'a',0),(114,'Rapprocher les ecritures bancaires','banque',1,'consolidate',NULL,'w',0),(115,'Exporter transactions et releves','banque',1,'export',NULL,'r',0),(116,'Virements entre comptes','banque',1,'transfer',NULL,'w',0),(117,'Gerer les envois de cheques','banque',1,'cheque',NULL,'w',0),(121,'Lire les societes','societe',1,'lire',NULL,'r',1),(122,'Creer modifier les societes','societe',1,'creer',NULL,'w',0),(125,'Supprimer les societes','societe',1,'supprimer',NULL,'d',0),(126,'Exporter les societes','societe',1,'export',NULL,'r',0),(141,'Lire tous les projets et taches (y compris prives qui ne me sont pas affectes)','projet',1,'all','lire','r',0),(142,'Creer/modifier tous les projets et taches (y compris prives qui ne me sont pas affectes)','projet',1,'all','creer','w',0),(144,'Supprimer tous les projets et taches (y compris prives qui ne me sont pas affectes)','projet',1,'all','supprimer','d',0),(151,'Read withdrawals','prelevement',1,'bons','lire','r',1),(152,'Create/modify a withdrawals','prelevement',1,'bons','creer','w',0),(153,'Send withdrawals to bank','prelevement',1,'bons','send','a',0),(154,'credit/refuse withdrawals','prelevement',1,'bons','credit','a',0),(161,'Lire les contrats','contrat',1,'lire',NULL,'r',1),(162,'Creer / modifier les contrats','contrat',1,'creer',NULL,'w',0),(163,'Activer un service d\'un contrat','contrat',1,'activer',NULL,'w',0),(164,'Desactiver un service d\'un contrat','contrat',1,'desactiver',NULL,'w',0),(165,'Supprimer un contrat','contrat',1,'supprimer',NULL,'d',0),(171,'Lire les deplacements','deplacement',1,'lire',NULL,'r',1),(172,'Creer/modifier les deplacements','deplacement',1,'creer',NULL,'w',0),(173,'Supprimer les deplacements','deplacement',1,'supprimer',NULL,'d',0),(178,'Exporter les deplacements','deplacement',1,'export',NULL,'d',0),(221,'Consulter les mailings','mailing',1,'lire',NULL,'r',1),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',1,'creer',NULL,'w',1),(223,'Valider les mailings (permet leur envoi)','mailing',1,'valider',NULL,'w',0),(229,'Supprimer les mailings)','mailing',1,'supprimer',NULL,'d',1),(241,'Lire les categories','categorie',1,'lire',NULL,'r',1),(242,'Creer/modifier les categories','categorie',1,'creer',NULL,'w',1),(243,'Supprimer les categories','categorie',1,'supprimer',NULL,'d',1),(251,'Consulter les autres utilisateurs','user',1,'user','lire','r',0),(252,'Consulter les permissions des autres utilisateurs','user',1,'user_advance','readperms','r',0),(253,'Creer/modifier utilisateurs internes et externes','user',1,'user','creer','w',0),(254,'Creer/modifier utilisateurs externes seulement','user',1,'user_advance','write','w',0),(255,'Modifier le mot de passe des autres utilisateurs','user',1,'user','password','w',0),(256,'Supprimer ou desactiver les autres utilisateurs','user',1,'user','supprimer','d',0),(262,'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).','societe',1,'client','voir','r',1),(281,'Lire les contacts','societe',1,'contact','lire','r',1),(282,'Creer modifier les contacts','societe',1,'contact','creer','w',0),(283,'Supprimer les contacts','societe',1,'contact','supprimer','d',0),(286,'Exporter les contacts','societe',1,'contact','export','d',0),(331,'Lire les bookmarks','bookmark',1,'lire',NULL,'r',1),(332,'Creer/modifier les bookmarks','bookmark',1,'creer',NULL,'r',0),(333,'Supprimer les bookmarks','bookmark',1,'supprimer',NULL,'r',0),(341,'Consulter ses propres permissions','user',1,'self_advance','readperms','r',1),(342,'Creer/modifier ses propres infos utilisateur','user',1,'self','creer','w',1),(343,'Modifier son propre mot de passe','user',1,'self','password','w',1),(344,'Modifier ses propres permissions','user',1,'self_advance','writeperms','w',1),(351,'Consulter les groupes','user',1,'group_advance','read','r',0),(352,'Consulter les permissions des groupes','user',1,'group_advance','readperms','r',0),(353,'Creer/modifier les groupes et leurs permissions','user',1,'group_advance','write','w',0),(354,'Supprimer ou desactiver les groupes','user',1,'group_advance','delete','d',0),(358,'Exporter les utilisateurs','user',1,'user','export','r',0),(531,'Lire les services','service',1,'lire',NULL,'r',1),(532,'Creer/modifier les services','service',1,'creer',NULL,'w',0),(534,'Supprimer les services','service',1,'supprimer',NULL,'d',0),(538,'Exporter les services','service',1,'export',NULL,'r',0),(700,'Lire les dons','don',1,'lire',NULL,'r',1),(701,'Creer/modifier les dons','don',1,'creer',NULL,'w',0),(702,'Supprimer les dons','don',1,'supprimer',NULL,'d',0),(703,'Supprimer les dons','don',1,'supprimer',NULL,'d',0),(1001,'Lire les stocks','stock',1,'lire',NULL,'r',1),(1002,'Creer/Modifier les stocks','stock',1,'creer',NULL,'w',1),(1003,'Supprimer les stocks','stock',1,'supprimer',NULL,'d',1),(1004,'Lire mouvements de stocks','stock',1,'mouvement','lire','r',1),(1005,'Creer/modifier mouvements de stocks','stock',1,'mouvement','creer','w',1),(1101,'Lire les bons de livraison','expedition',1,'livraison','lire','r',1),(1102,'Creer modifier les bons de livraison','expedition',1,'livraison','creer','w',0),(1104,'Valider les bons de livraison','expedition',1,'livraison','valider','d',0),(1109,'Supprimer les bons de livraison','expedition',1,'livraison','supprimer','d',0),(1181,'Consulter les fournisseurs','fournisseur',1,'lire',NULL,'r',1),(1182,'Consulter les commandes fournisseur','fournisseur',1,'commande','lire','r',1),(1183,'Creer une commande fournisseur','fournisseur',1,'commande','creer','w',0),(1184,'Valider une commande fournisseur','fournisseur',1,'commande','valider','w',0),(1185,'Approuver une commande fournisseur','fournisseur',1,'commande','approuver','w',0),(1186,'Commander une commande fournisseur','fournisseur',1,'commande','commander','w',0),(1187,'Receptionner une commande fournisseur','fournisseur',1,'commande','receptionner','d',0),(1188,'Supprimer une commande fournisseur','fournisseur',1,'commande','supprimer','d',0),(1201,'Lire les exports','export',1,'lire',NULL,'r',1),(1202,'Creer/modifier un export','export',1,'creer',NULL,'w',1),(1231,'Consulter les factures fournisseur','fournisseur',1,'facture','lire','r',1),(1232,'Creer une facture fournisseur','fournisseur',1,'facture','creer','w',0),(1233,'Valider une facture fournisseur','fournisseur',1,'facture','valider','w',0),(1234,'Supprimer une facture fournisseur','fournisseur',1,'facture','supprimer','d',0),(1235,'Envoyer les factures par mail','fournisseur',1,'supplier_invoice_advance','send','a',0),(1236,'Exporter les factures fournisseurs, attributs et reglements','fournisseur',1,'facture','export','r',0),(1251,'Run mass imports of external data (data load)','import',1,'run',NULL,'r',0),(1321,'Exporter les factures clients, attributs et reglements','facture',1,'facture','export','r',0),(1421,'Exporter les commandes clients et attributs','commande',1,'commande','export','r',0),(2401,'Read actions/tasks linked to his account','agenda',1,'myactions','read','r',1),(2402,'Create/modify actions/tasks linked to his account','agenda',1,'myactions','create','w',0),(2403,'Delete actions/tasks linked to his account','agenda',1,'myactions','delete','w',0),(2411,'Read actions/tasks of others','agenda',1,'allactions','read','r',0),(2412,'Create/modify actions/tasks of others','agenda',1,'allactions','create','w',0),(2413,'Delete actions/tasks of others','agenda',1,'allactions','delete','w',0),(2501,'Consulter/Télécharger les documents','ecm',1,'read',NULL,'r',1),(2503,'Soumettre ou supprimer des documents','ecm',1,'upload',NULL,'w',1),(2515,'Administrer les rubriques de documents','ecm',1,'setup',NULL,'w',1); +/*!40000 ALTER TABLE `llx_rights_def` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_societe` +-- + +DROP TABLE IF EXISTS `llx_societe`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_societe` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `statut` tinyint(4) DEFAULT '0', + `parent` int(11) DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datec` datetime DEFAULT NULL, + `datea` datetime DEFAULT NULL, + `nom` varchar(60) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `ref_ext` varchar(60) DEFAULT NULL, + `ref_int` varchar(60) DEFAULT NULL, + `code_client` varchar(24) DEFAULT NULL, + `code_fournisseur` varchar(24) DEFAULT NULL, + `code_compta` varchar(24) DEFAULT NULL, + `code_compta_fournisseur` varchar(24) DEFAULT NULL, + `address` varchar(255) DEFAULT NULL, + `cp` varchar(10) DEFAULT NULL, + `ville` varchar(50) DEFAULT NULL, + `fk_departement` int(11) DEFAULT '0', + `fk_pays` int(11) DEFAULT '0', + `tel` varchar(20) DEFAULT NULL, + `fax` varchar(20) DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `email` varchar(128) DEFAULT NULL, + `fk_secteur` int(11) DEFAULT '0', + `fk_effectif` int(11) DEFAULT '0', + `fk_typent` int(11) DEFAULT '0', + `fk_forme_juridique` int(11) DEFAULT '0', + `fk_currency` int(11) DEFAULT '0', + `siren` varchar(128) DEFAULT NULL, + `siret` varchar(128) DEFAULT NULL, + `ape` varchar(128) DEFAULT NULL, + `idprof4` varchar(128) DEFAULT NULL, + `tva_intra` varchar(20) DEFAULT NULL, + `capital` double DEFAULT NULL, + `description` text, + `fk_stcomm` int(11) NOT NULL, + `note` text, + `services` tinyint(4) DEFAULT '0', + `prefix_comm` varchar(5) DEFAULT NULL, + `client` tinyint(4) DEFAULT '0', + `fournisseur` tinyint(4) DEFAULT '0', + `supplier_account` varchar(32) DEFAULT NULL, + `fk_prospectlevel` varchar(12) DEFAULT NULL, + `customer_bad` tinyint(4) DEFAULT '0', + `customer_rate` double DEFAULT '0', + `supplier_rate` double DEFAULT '0', + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + `remise_client` double DEFAULT '0', + `mode_reglement` tinyint(4) DEFAULT NULL, + `cond_reglement` tinyint(4) DEFAULT NULL, + `tva_assuj` tinyint(4) DEFAULT '1', + `localtax1_assuj` tinyint(4) DEFAULT '0', + `localtax2_assuj` tinyint(4) DEFAULT '0', + `barcode` varchar(255) DEFAULT NULL, + `price_level` int(11) DEFAULT NULL, + `default_lang` varchar(6) DEFAULT NULL, + `canvas` varchar(32) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `status` tinyint(4) DEFAULT '1', + `logo` varchar(255) DEFAULT NULL, + `idprof5` varchar(128) DEFAULT NULL, + `fk_barcode_type` int(11) DEFAULT '0', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_societe_prefix_comm` (`prefix_comm`,`entity`), + UNIQUE KEY `uk_societe_code_client` (`code_client`,`entity`), + KEY `idx_societe_user_creat` (`fk_user_creat`), + KEY `idx_societe_user_modif` (`fk_user_modif`) +) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_societe` +-- + +LOCK TABLES `llx_societe` WRITE; +/*!40000 ALTER TABLE `llx_societe` DISABLE KEYS */; +INSERT INTO `llx_societe` (`rowid`, `statut`, `parent`, `tms`, `datec`, `datea`, `nom`, `entity`, `ref_ext`, `ref_int`, `code_client`, `code_fournisseur`, `code_compta`, `code_compta_fournisseur`, `address`, `cp`, `ville`, `fk_departement`, `fk_pays`, `tel`, `fax`, `url`, `email`, `fk_secteur`, `fk_effectif`, `fk_typent`, `fk_forme_juridique`, `fk_currency`, `siren`, `siret`, `ape`, `idprof4`, `tva_intra`, `capital`, `description`, `fk_stcomm`, `note`, `services`, `prefix_comm`, `client`, `fournisseur`, `supplier_account`, `fk_prospectlevel`, `customer_bad`, `customer_rate`, `supplier_rate`, `fk_user_creat`, `fk_user_modif`, `remise_client`, `mode_reglement`, `cond_reglement`, `tva_assuj`, `localtax1_assuj`, `localtax2_assuj`, `barcode`, `price_level`, `default_lang`, `canvas`, `import_key`, `status`, `logo`, `idprof5`, `fk_barcode_type`) VALUES (1,0,NULL,'2011-07-20 13:23:12','2010-07-08 14:21:44','2010-07-10 18:35:31','ABC and Co',1,NULL,NULL,NULL,NULL,'7050','6050','1 alalah road',NULL,'Delhi',297,117,NULL,NULL,NULL,NULL,0,NULL,4,NULL,0,'','','','','',5000,NULL,1,NULL,0,NULL,1,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,'en_IN',NULL,NULL,1,NULL,NULL,0),(2,0,NULL,'2011-07-31 22:35:08','2010-07-08 14:23:48','2011-08-01 00:35:08','Belin SARL',1,NULL,NULL,'CU1108-0001','SU1108-0001',NULL,NULL,'11 rue de la paix.','75000','Paris',0,117,NULL,NULL,'dolibarr.fr',NULL,0,NULL,3,NULL,0,'123456789','','ACE14','','',10000,NULL,0,NULL,0,NULL,3,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,'fr_FR',NULL,NULL,1,NULL,NULL,0),(3,0,NULL,'2010-07-08 20:42:12','2010-07-08 22:42:12','2010-07-08 22:42:12','Spanish Comp',1,NULL,NULL,'SPANISHCOMP',NULL,NULL,NULL,'1 via mallere',NULL,'Madrid',123,4,NULL,NULL,NULL,NULL,0,3,4,408,0,'','','','','',10000,NULL,0,NULL,0,NULL,3,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,'es_AR',NULL,NULL,1,NULL,NULL,0),(4,0,NULL,'2011-07-20 13:21:15','2010-07-08 22:48:18','2010-07-08 22:48:18','Prospector Vaalen',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,'Bruxelles',103,2,NULL,NULL,NULL,NULL,0,3,4,201,0,'12345678','','','','',0,NULL,0,NULL,0,NULL,1,0,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0),(5,0,NULL,'2010-07-08 21:37:56','2010-07-08 23:22:57','2010-07-08 23:37:56','NoCountry Co',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,193,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,'','','','','',0,NULL,0,NULL,0,NULL,0,0,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0),(6,0,NULL,'2010-07-08 22:25:06','2010-07-09 00:15:09','2010-07-09 00:25:06','Swiss customer supplier',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,'Genevia',0,6,NULL,NULL,NULL,'abademail@aa.com',0,2,2,601,0,'','','','','',56000,NULL,0,NULL,0,NULL,3,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0),(7,0,NULL,'2010-07-08 23:24:53','2010-07-09 01:24:26','2010-07-09 01:24:26','Generic customer',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,7,NULL,NULL,NULL,NULL,0,NULL,8,NULL,0,'','','','','',0,NULL,0,'Generic customer to use for Point Of Sale module.
',0,NULL,1,0,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0),(8,0,NULL,'2010-07-10 12:54:27','2010-07-10 14:54:27','2010-07-10 14:54:27','Client salon',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,'','','','','',0,NULL,0,NULL,0,NULL,0,0,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0),(9,0,NULL,'2010-07-10 12:55:11','2010-07-10 14:54:44','2010-07-10 14:55:11','Client salon invidivdu',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,NULL,0,NULL,8,NULL,0,'','','','','',0,NULL,0,NULL,0,NULL,3,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0),(10,0,NULL,'2010-07-10 13:13:08','2010-07-10 15:13:08','2010-07-10 15:13:08','Smith Vick',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,102,NULL,NULL,NULL,'vsmith@email.com',0,NULL,0,NULL,0,'','','','','',0,NULL,0,NULL,0,NULL,1,0,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0),(11,0,NULL,'2010-07-11 12:35:22','2010-07-10 18:35:57','2010-07-10 18:36:24','Mon client',1,NULL,NULL,NULL,NULL,'7051',NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,'','','','','',0,NULL,0,NULL,0,NULL,3,0,NULL,'PL_LOW',0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0),(12,0,NULL,'2010-07-11 14:18:08','2010-07-11 16:18:08','2010-07-11 16:18:08','Dupont Alain',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,'toto@aa.com',0,NULL,0,NULL,0,'','','','','',0,NULL,0,NULL,0,NULL,1,0,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0),(13,0,NULL,'2010-07-11 15:13:20','2010-07-11 17:13:20','2010-07-11 17:13:20','Vendeur de chips',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,'','','','','',0,NULL,0,NULL,0,NULL,0,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0),(15,0,NULL,'2012-04-11 10:10:21','2011-08-01 02:31:24','2012-04-11 12:10:21','From Island and Co',1,NULL,NULL,'CU1108-0002','SU1108-0002',NULL,NULL,'','78180','mmm',0,31,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,'','','','','',0,NULL,0,NULL,0,NULL,3,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0),(16,0,NULL,'2012-04-11 10:10:04','2011-08-01 02:31:43','2012-04-11 12:10:04','ProCust company',1,NULL,NULL,'CU1108-0003','SU1108-0003',NULL,NULL,'','78180','mmm',103,2,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,'','','','','',0,NULL,0,NULL,0,NULL,3,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0),(17,0,NULL,'2011-08-04 21:24:24','2011-08-01 02:41:26','2011-08-04 23:24:24','FFF SARL',1,NULL,NULL,'CU1108-0004','SU1108-0004',NULL,NULL,'The French Company',NULL,NULL,0,1,NULL,NULL,NULL,NULL,0,1,3,NULL,0,'','','','','',0,NULL,0,NULL,0,NULL,3,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0); +/*!40000 ALTER TABLE `llx_societe` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_societe_address` +-- + +DROP TABLE IF EXISTS `llx_societe_address`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_societe_address` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `label` varchar(30) DEFAULT NULL, + `fk_soc` int(11) DEFAULT '0', + `name` varchar(60) DEFAULT NULL, + `address` varchar(255) DEFAULT NULL, + `cp` varchar(10) DEFAULT NULL, + `ville` varchar(50) DEFAULT NULL, + `fk_pays` int(11) DEFAULT '0', + `tel` varchar(20) DEFAULT NULL, + `fax` varchar(20) DEFAULT NULL, + `note` text, + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_societe_address` +-- + +LOCK TABLES `llx_societe_address` WRITE; +/*!40000 ALTER TABLE `llx_societe_address` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_societe_address` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_societe_commerciaux` +-- + +DROP TABLE IF EXISTS `llx_societe_commerciaux`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_societe_commerciaux` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_soc` int(11) DEFAULT NULL, + `fk_user` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_societe_commerciaux` (`fk_soc`,`fk_user`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_societe_commerciaux` +-- + +LOCK TABLES `llx_societe_commerciaux` WRITE; +/*!40000 ALTER TABLE `llx_societe_commerciaux` DISABLE KEYS */; +INSERT INTO `llx_societe_commerciaux` (`rowid`, `fk_soc`, `fk_user`) VALUES (1,2,2),(2,3,2),(3,15,1),(4,16,1),(5,17,1); +/*!40000 ALTER TABLE `llx_societe_commerciaux` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_societe_extrafields` +-- + +DROP TABLE IF EXISTS `llx_societe_extrafields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_societe_extrafields` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_object` int(11) NOT NULL, + `jjjj` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_societe_extrafields` (`fk_object`) +) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_societe_extrafields` +-- + +LOCK TABLES `llx_societe_extrafields` WRITE; +/*!40000 ALTER TABLE `llx_societe_extrafields` DISABLE KEYS */; +INSERT INTO `llx_societe_extrafields` (`rowid`, `tms`, `fk_object`, `jjjj`, `import_key`) VALUES (1,'2011-06-22 16:23:01',40,'kkkk',NULL),(2,'2011-06-22 16:23:16',41,'jjj',NULL),(4,'2011-06-23 07:40:40',39,'lll',NULL),(12,'2011-06-29 13:03:12',42,NULL,NULL),(14,'2011-07-02 01:24:03',57,NULL,NULL),(16,'2011-07-02 14:11:29',60,NULL,NULL),(17,'2011-07-18 10:26:55',35,NULL,NULL),(18,'2011-07-31 22:35:08',2,NULL,NULL),(27,'2011-08-04 21:24:24',17,NULL,NULL),(28,'2012-04-11 10:10:04',16,NULL,NULL),(29,'2012-04-11 10:10:21',15,NULL,NULL); +/*!40000 ALTER TABLE `llx_societe_extrafields` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_societe_log` +-- + +DROP TABLE IF EXISTS `llx_societe_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_societe_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `datel` datetime DEFAULT NULL, + `fk_soc` int(11) DEFAULT NULL, + `fk_statut` int(11) DEFAULT NULL, + `fk_user` int(11) DEFAULT NULL, + `author` varchar(30) DEFAULT NULL, + `label` varchar(128) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_societe_log` +-- + +LOCK TABLES `llx_societe_log` WRITE; +/*!40000 ALTER TABLE `llx_societe_log` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_societe_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_societe_prices` +-- + +DROP TABLE IF EXISTS `llx_societe_prices`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_societe_prices` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_soc` int(11) DEFAULT '0', + `tms` timestamp NULL DEFAULT NULL, + `datec` datetime DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `price_level` tinyint(4) DEFAULT '1', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_societe_prices` +-- + +LOCK TABLES `llx_societe_prices` WRITE; +/*!40000 ALTER TABLE `llx_societe_prices` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_societe_prices` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_societe_remise` +-- + +DROP TABLE IF EXISTS `llx_societe_remise`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_societe_remise` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_soc` int(11) NOT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datec` datetime DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `remise_client` double(6,3) NOT NULL DEFAULT '0.000', + `note` text, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_societe_remise` +-- + +LOCK TABLES `llx_societe_remise` WRITE; +/*!40000 ALTER TABLE `llx_societe_remise` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_societe_remise` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_societe_remise_except` +-- + +DROP TABLE IF EXISTS `llx_societe_remise_except`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_societe_remise_except` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_soc` int(11) NOT NULL, + `datec` datetime DEFAULT NULL, + `amount_ht` double(24,8) NOT NULL, + `amount_tva` double(24,8) NOT NULL DEFAULT '0.00000000', + `amount_ttc` double(24,8) NOT NULL DEFAULT '0.00000000', + `tva_tx` double(6,3) NOT NULL DEFAULT '0.000', + `fk_user` int(11) NOT NULL, + `fk_facture_line` int(11) DEFAULT NULL, + `fk_facture` int(11) DEFAULT NULL, + `fk_facture_source` int(11) DEFAULT NULL, + `description` varchar(255) NOT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_societe_remise_except_fk_user` (`fk_user`), + KEY `idx_societe_remise_except_fk_soc` (`fk_soc`), + KEY `idx_societe_remise_except_fk_facture_line` (`fk_facture_line`), + KEY `idx_societe_remise_except_fk_facture` (`fk_facture`), + KEY `idx_societe_remise_except_fk_facture_source` (`fk_facture_source`), + CONSTRAINT `fk_societe_remise_fk_facture` FOREIGN KEY (`fk_facture`) REFERENCES `llx_facture` (`rowid`), + CONSTRAINT `fk_societe_remise_fk_facture_line` FOREIGN KEY (`fk_facture_line`) REFERENCES `llx_facturedet` (`rowid`), + CONSTRAINT `fk_societe_remise_fk_facture_source` FOREIGN KEY (`fk_facture_source`) REFERENCES `llx_facture` (`rowid`), + CONSTRAINT `fk_societe_remise_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), + CONSTRAINT `fk_societe_remise_fk_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_societe_remise_except` +-- + +LOCK TABLES `llx_societe_remise_except` WRITE; +/*!40000 ALTER TABLE `llx_societe_remise_except` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_societe_remise_except` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_societe_rib` +-- + +DROP TABLE IF EXISTS `llx_societe_rib`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_societe_rib` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_soc` int(11) NOT NULL, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `label` varchar(30) DEFAULT NULL, + `bank` varchar(255) DEFAULT NULL, + `code_banque` varchar(7) DEFAULT NULL, + `code_guichet` varchar(6) DEFAULT NULL, + `number` varchar(255) DEFAULT NULL, + `cle_rib` varchar(5) DEFAULT NULL, + `bic` varchar(10) DEFAULT NULL, + `iban_prefix` varchar(34) DEFAULT NULL, + `domiciliation` varchar(255) DEFAULT NULL, + `proprio` varchar(60) DEFAULT NULL, + `adresse_proprio` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_societe_rib` +-- + +LOCK TABLES `llx_societe_rib` WRITE; +/*!40000 ALTER TABLE `llx_societe_rib` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_societe_rib` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_socpeople` +-- + +DROP TABLE IF EXISTS `llx_socpeople`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_socpeople` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_soc` int(11) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `civilite` varchar(6) DEFAULT NULL, + `name` varchar(50) DEFAULT NULL, + `firstname` varchar(50) DEFAULT NULL, + `address` varchar(255) DEFAULT NULL, + `cp` varchar(25) DEFAULT NULL, + `ville` varchar(255) DEFAULT NULL, + `fk_departement` int(11) DEFAULT NULL, + `fk_pays` int(11) DEFAULT '0', + `birthday` date DEFAULT NULL, + `poste` varchar(80) DEFAULT NULL, + `phone` varchar(30) DEFAULT NULL, + `phone_perso` varchar(30) DEFAULT NULL, + `phone_mobile` varchar(30) DEFAULT NULL, + `fax` varchar(30) DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `jabberid` varchar(255) DEFAULT NULL, + `priv` smallint(6) NOT NULL DEFAULT '0', + `fk_user_creat` int(11) DEFAULT '0', + `fk_user_modif` int(11) DEFAULT NULL, + `note` text, + `default_lang` varchar(6) DEFAULT NULL, + `canvas` varchar(32) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_socpeople_fk_soc` (`fk_soc`), + KEY `idx_socpeople_fk_user_creat` (`fk_user_creat`), + CONSTRAINT `fk_socpeople_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), + CONSTRAINT `fk_socpeople_user_creat_user_rowid` FOREIGN KEY (`fk_user_creat`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_socpeople` +-- + +LOCK TABLES `llx_socpeople` WRITE; +/*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; +INSERT INTO `llx_socpeople` (`rowid`, `datec`, `tms`, `fk_soc`, `entity`, `civilite`, `name`, `firstname`, `address`, `cp`, `ville`, `fk_departement`, `fk_pays`, `birthday`, `poste`, `phone`, `phone_perso`, `phone_mobile`, `fax`, `email`, `jabberid`, `priv`, `fk_user_creat`, `fk_user_modif`, `note`, `default_lang`, `canvas`, `import_key`) VALUES (1,'2010-07-08 14:26:14','2010-07-08 20:45:28',1,1,'MR','Samira','Aljoun','','','',297,117,'2010-07-08','Project leader','','','','','','',0,1,1,'Met during a congress at Dubai',NULL,NULL,NULL),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL),(3,'2010-07-08 22:59:02','2010-07-08 20:59:35',NULL,1,'MR','Freeman','Private','','','',NULL,11,NULL,'','','','','','','',1,1,1,'This is a private contact',NULL,NULL,NULL),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',0,1,1,'The bank director',NULL,NULL,NULL),(5,'2010-07-10 14:54:44','2010-07-10 12:54:44',9,1,'','Client salon invidivdu','','','','',NULL,NULL,NULL,'','','','','','','',0,1,1,'',NULL,NULL,NULL),(6,'2011-08-01 02:41:26','2011-08-01 00:41:26',17,1,'','aaa','','aaa','','',289,117,NULL,'','','','','','','',0,1,1,'',NULL,NULL,NULL); +/*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_stock_mouvement` +-- + +DROP TABLE IF EXISTS `llx_stock_mouvement`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_stock_mouvement` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datem` datetime DEFAULT NULL, + `fk_product` int(11) NOT NULL, + `fk_entrepot` int(11) NOT NULL, + `value` int(11) DEFAULT NULL, + `price` float(13,4) DEFAULT '0.0000', + `type_mouvement` smallint(6) DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `label` varchar(128) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_stock_mouvement_fk_product` (`fk_product`), + KEY `idx_stock_mouvement_fk_entrepot` (`fk_entrepot`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_stock_mouvement` +-- + +LOCK TABLES `llx_stock_mouvement` WRITE; +/*!40000 ALTER TABLE `llx_stock_mouvement` DISABLE KEYS */; +INSERT INTO `llx_stock_mouvement` (`rowid`, `tms`, `datem`, `fk_product`, `fk_entrepot`, `value`, `price`, `type_mouvement`, `fk_user_author`, `label`) VALUES (1,'2010-07-08 22:43:51','2010-07-09 00:43:51',2,2,1000,0.0000,0,1,'Correct stock'),(3,'2010-07-10 22:56:18','2010-07-11 00:56:18',4,2,500,0.0000,0,1,'Init'),(4,'2010-07-10 23:02:20','2010-07-11 01:02:20',4,2,500,0.0000,0,1,''),(5,'2010-07-11 16:49:44','2010-07-11 18:49:44',4,1,2,10.0000,3,1,''),(6,'2010-07-11 16:49:44','2010-07-11 18:49:44',1,1,4,0.0000,3,1,''); +/*!40000 ALTER TABLE `llx_stock_mouvement` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_submitew_targets` +-- + +DROP TABLE IF EXISTS `llx_submitew_targets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_submitew_targets` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `label` varchar(64) NOT NULL, + `targetcode` varchar(16) NOT NULL, + `langcode` varchar(5) DEFAULT 'en_US', + `url` varchar(250) DEFAULT NULL, + `login` varchar(128) DEFAULT NULL, + `pass` varchar(128) DEFAULT NULL, + `comment` varchar(250) DEFAULT NULL, + `position` int(11) DEFAULT '0', + `titlelength` int(11) DEFAULT '32', + `descshortlength` int(11) DEFAULT '256', + `desclonglength` int(11) DEFAULT '2000', + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_submitewtargets` (`label`,`langcode`) +) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_submitew_targets` +-- + +LOCK TABLES `llx_submitew_targets` WRITE; +/*!40000 ALTER TABLE `llx_submitew_targets` DISABLE KEYS */; +INSERT INTO `llx_submitew_targets` (`rowid`, `label`, `targetcode`, `langcode`, `url`, `login`, `pass`, `comment`, `position`, `titlelength`, `descshortlength`, `desclonglength`) VALUES (17,'hhho','email','fr_FR','',NULL,NULL,NULL,0,0,-1,0),(34,'pppp','facebook','fr_FR',NULL,'eldy','ld101010-fk',NULL,0,-1,-1,-1),(35,'hfghfgh','web','de_DE','http://wwww','ffffmmm','null',NULL,0,-1,-1,-1),(37,'llll','linkedin','fr_FR','',NULL,NULL,NULL,0,32,256,2000),(55,'fff','dig','fr_FR',NULL,'hfgh','hfghgf',NULL,0,-1,-1,-1),(56,'aaaaaaa','linkedin','da_DK',NULL,'aa','aaa',NULL,0,32,256,2000),(57,'ddd','dig','en_US',NULL,'dd',NULL,NULL,0,32,256,2000),(59,'dddff','dig','en_US',NULL,NULL,NULL,NULL,0,32,256,2000),(68,'dddffe','dig','en_US',NULL,NULL,NULL,NULL,0,32,256,2000),(70,'dddffef','dig','en_US','http://www.dig.com',NULL,NULL,NULL,0,32,256,2000),(71,'ffff','dig','en_US','http://www.dig.com',NULL,NULL,NULL,0,32,256,2000); +/*!40000 ALTER TABLE `llx_submitew_targets` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_submitew_targets_params` +-- + +DROP TABLE IF EXISTS `llx_submitew_targets_params`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_submitew_targets_params` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_target` int(11) NOT NULL, + `paramkey` varchar(16) NOT NULL, + `paramvalue` varchar(128) DEFAULT '', + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_submitewtargets_fk_target` (`fk_target`), + UNIQUE KEY `uk_submitewtargets_params` (`fk_target`,`paramkey`,`paramvalue`), + CONSTRAINT `fk_submitewtargets_fk_target` FOREIGN KEY (`fk_target`) REFERENCES `llx_submitew_targets` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_submitew_targets_params` +-- + +LOCK TABLES `llx_submitew_targets_params` WRITE; +/*!40000 ALTER TABLE `llx_submitew_targets_params` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_submitew_targets_params` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_texts` +-- + +DROP TABLE IF EXISTS `llx_texts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_texts` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `module` varchar(32) DEFAULT NULL, + `typemodele` varchar(32) DEFAULT NULL, + `sortorder` smallint(6) DEFAULT NULL, + `private` smallint(6) NOT NULL DEFAULT '0', + `fk_user` int(11) DEFAULT NULL, + `title` varchar(128) DEFAULT NULL, + `filename` varchar(128) DEFAULT NULL, + `content` text, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_texts` +-- + +LOCK TABLES `llx_texts` WRITE; +/*!40000 ALTER TABLE `llx_texts` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_texts` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_tva` +-- + +DROP TABLE IF EXISTS `llx_tva`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_tva` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datep` date DEFAULT NULL, + `datev` date DEFAULT NULL, + `amount` double NOT NULL DEFAULT '0', + `label` varchar(255) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `note` text, + `fk_bank` int(11) DEFAULT NULL, + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_tva` +-- + +LOCK TABLES `llx_tva` WRITE; +/*!40000 ALTER TABLE `llx_tva` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_tva` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_user` +-- + +DROP TABLE IF EXISTS `llx_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_user` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `login` varchar(24) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `civilite` varchar(6) DEFAULT NULL, + `ref_ext` varchar(50) DEFAULT NULL, + `ref_int` varchar(50) DEFAULT NULL, + `pass` varchar(32) DEFAULT NULL, + `pass_crypted` varchar(128) DEFAULT NULL, + `pass_temp` varchar(32) DEFAULT NULL, + `name` varchar(50) DEFAULT NULL, + `firstname` varchar(50) DEFAULT NULL, + `office_phone` varchar(20) DEFAULT NULL, + `office_fax` varchar(20) DEFAULT NULL, + `user_mobile` varchar(20) DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `signature` text, + `admin` smallint(6) DEFAULT '0', + `webcal_login` varchar(25) DEFAULT NULL, + `phenix_login` varchar(25) DEFAULT NULL, + `phenix_pass` varchar(128) DEFAULT NULL, + `module_comm` smallint(6) DEFAULT '1', + `module_compta` smallint(6) DEFAULT '1', + `fk_societe` int(11) DEFAULT NULL, + `fk_socpeople` int(11) DEFAULT NULL, + `fk_member` int(11) DEFAULT NULL, + `note` text, + `datelastlogin` datetime DEFAULT NULL, + `datepreviouslogin` datetime DEFAULT NULL, + `egroupware_id` int(11) DEFAULT NULL, + `ldap_sid` varchar(255) DEFAULT NULL, + `statut` tinyint(4) DEFAULT '1', + `photo` varchar(255) DEFAULT NULL, + `lang` varchar(6) DEFAULT NULL, + `openid` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_user_login` (`login`,`entity`), + UNIQUE KEY `uk_user_fk_socpeople` (`fk_socpeople`), + UNIQUE KEY `uk_user_fk_member` (`fk_member`), + KEY `uk_user_fk_societe` (`fk_societe`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_user` +-- + +LOCK TABLES `llx_user` WRITE; +/*!40000 ALTER TABLE `llx_user` DISABLE KEYS */; +INSERT INTO `llx_user` (`rowid`, `datec`, `tms`, `login`, `entity`, `civilite`, `ref_ext`, `ref_int`, `pass`, `pass_crypted`, `pass_temp`, `name`, `firstname`, `office_phone`, `office_fax`, `user_mobile`, `email`, `signature`, `admin`, `webcal_login`, `phenix_login`, `phenix_pass`, `module_comm`, `module_compta`, `fk_societe`, `fk_socpeople`, `fk_member`, `note`, `datelastlogin`, `datepreviouslogin`, `egroupware_id`, `ldap_sid`, `statut`, `photo`, `lang`, `openid`) VALUES (1,'2010-07-08 13:20:11','2010-07-18 09:37:04','admin',0,NULL,NULL,NULL,'admin','21232f297a57a5a743894a0e4a801fc3',NULL,'SuperAdminName','Firstname','','','','',NULL,1,'','','',1,1,NULL,NULL,NULL,'','2012-04-11 12:05:03','2011-08-08 19:32:42',NULL,'',1,NULL,NULL,NULL),(2,'2010-07-08 13:54:48','2010-07-08 11:54:48','demo',1,NULL,NULL,NULL,'demo','fe01ce2a7fbac8fafaed7c982a04e229',NULL,'John','Doe','09123123','','','johndoe@mycompany.com',NULL,0,'','','',1,1,NULL,NULL,NULL,'','2010-07-08 14:12:02',NULL,NULL,'',1,NULL,NULL,NULL),(3,'2010-07-11 16:18:59','2010-07-11 14:18:59','adupont',1,NULL,NULL,NULL,'sng2bdf6','c4cb8e25c3d261afac062a8d1274212c',NULL,'Dupont','Alain','','','','toto@aa.com',NULL,0,'','','',1,1,NULL,NULL,2,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL); +/*!40000 ALTER TABLE `llx_user` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_user_alert` +-- + +DROP TABLE IF EXISTS `llx_user_alert`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_user_alert` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `type` int(11) DEFAULT NULL, + `fk_contact` int(11) DEFAULT NULL, + `fk_user` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_user_alert` +-- + +LOCK TABLES `llx_user_alert` WRITE; +/*!40000 ALTER TABLE `llx_user_alert` DISABLE KEYS */; +INSERT INTO `llx_user_alert` (`rowid`, `type`, `fk_contact`, `fk_user`) VALUES (1,1,1,1); +/*!40000 ALTER TABLE `llx_user_alert` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_user_clicktodial` +-- + +DROP TABLE IF EXISTS `llx_user_clicktodial`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_user_clicktodial` ( + `fk_user` int(11) NOT NULL, + `login` varchar(32) DEFAULT NULL, + `pass` varchar(64) DEFAULT NULL, + `poste` varchar(20) DEFAULT NULL, + PRIMARY KEY (`fk_user`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_user_clicktodial` +-- + +LOCK TABLES `llx_user_clicktodial` WRITE; +/*!40000 ALTER TABLE `llx_user_clicktodial` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_user_clicktodial` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_user_param` +-- + +DROP TABLE IF EXISTS `llx_user_param`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_user_param` ( + `fk_user` int(11) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `param` varchar(64) NOT NULL, + `value` varchar(255) NOT NULL, + UNIQUE KEY `uk_user_param` (`fk_user`,`param`,`entity`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_user_param` +-- + +LOCK TABLES `llx_user_param` WRITE; +/*!40000 ALTER TABLE `llx_user_param` DISABLE KEYS */; +INSERT INTO `llx_user_param` (`fk_user`, `entity`, `param`, `value`) VALUES (1,1,'MAIN_BOXES_0','1'),(1,1,'MAIN_LANG_DEFAULT','en_US'); +/*!40000 ALTER TABLE `llx_user_param` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_user_rights` +-- + +DROP TABLE IF EXISTS `llx_user_rights`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_user_rights` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_user` int(11) NOT NULL, + `fk_id` int(11) NOT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_user_rights` (`fk_user`,`fk_id`), + CONSTRAINT `fk_user_rights_fk_user_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=5186 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_user_rights` +-- + +LOCK TABLES `llx_user_rights` WRITE; +/*!40000 ALTER TABLE `llx_user_rights` DISABLE KEYS */; +INSERT INTO `llx_user_rights` (`rowid`, `fk_user`, `fk_id`) VALUES (4787,1,11),(4780,1,12),(4781,1,13),(4783,1,14),(4784,1,15),(4786,1,16),(4788,1,19),(4032,1,21),(4024,1,22),(4026,1,24),(4027,1,25),(4029,1,26),(4031,1,27),(4033,1,28),(2300,1,31),(2297,1,32),(2299,1,34),(1910,1,36),(2301,1,38),(1778,1,41),(1777,1,42),(1779,1,44),(4113,1,61),(4110,1,62),(4112,1,64),(4114,1,67),(4115,1,68),(1678,1,71),(1673,1,72),(1675,1,74),(1679,1,75),(1677,1,76),(1681,1,78),(1682,1,79),(4775,1,81),(4767,1,82),(4769,1,84),(4770,1,86),(4772,1,87),(4774,1,88),(4776,1,89),(3874,1,91),(3871,1,92),(3873,1,93),(3875,1,94),(4158,1,95),(4159,1,96),(4161,1,97),(4162,1,98),(4055,1,101),(4051,1,102),(4053,1,104),(4054,1,105),(4056,1,109),(4201,1,111),(4192,1,112),(4194,1,113),(4196,1,114),(4198,1,115),(4200,1,116),(4202,1,117),(4748,1,121),(4745,1,122),(4747,1,125),(4749,1,126),(1783,1,141),(1782,1,142),(1784,1,144),(2307,1,151),(2304,1,152),(2306,1,153),(2308,1,154),(4099,1,161),(4094,1,162),(4096,1,163),(4098,1,164),(4100,1,165),(1585,1,170),(4841,1,171),(4838,1,172),(4840,1,173),(4842,1,178),(1693,1,221),(1690,1,222),(1692,1,223),(1694,1,229),(1686,1,241),(1685,1,242),(1687,1,243),(4834,1,251),(4815,1,252),(4817,1,253),(4818,1,254),(4820,1,255),(4822,1,256),(1617,1,258),(4750,1,262),(4756,1,281),(4753,1,282),(4755,1,283),(4757,1,286),(1763,1,331),(1762,1,332),(1764,1,333),(4823,1,341),(4824,1,342),(4825,1,343),(4826,1,344),(4832,1,351),(4829,1,352),(4831,1,353),(4833,1,354),(4835,1,358),(4763,1,531),(4760,1,532),(4762,1,534),(1625,1,536),(4764,1,538),(4847,1,700),(4844,1,701),(4846,1,702),(4848,1,703),(1755,1,1001),(1754,1,1002),(1756,1,1003),(1758,1,1004),(1759,1,1005),(4062,1,1101),(4059,1,1102),(4061,1,1104),(4063,1,1109),(4790,1,1181),(4802,1,1182),(4793,1,1183),(4795,1,1184),(4797,1,1185),(4799,1,1186),(4801,1,1187),(4803,1,1188),(1578,1,1201),(1579,1,1202),(4812,1,1231),(4806,1,1232),(4808,1,1233),(4810,1,1234),(4811,1,1235),(4813,1,1236),(1736,1,1251),(4789,1,1321),(4777,1,1421),(4736,1,2401),(4735,1,2402),(4737,1,2403),(4741,1,2411),(4740,1,2412),(4742,1,2413),(1618,1,2500),(4852,1,2501),(4851,1,2503),(4853,1,2515),(3564,1,100700),(3565,1,100701),(3582,1,102000),(3583,1,102001),(132,2,11),(133,2,12),(134,2,13),(135,2,14),(136,2,16),(137,2,19),(138,2,21),(139,2,22),(140,2,24),(141,2,25),(142,2,26),(143,2,27),(144,2,31),(145,2,32),(146,2,36),(147,2,41),(148,2,42),(149,2,44),(150,2,61),(151,2,62),(152,2,64),(153,2,71),(154,2,72),(155,2,74),(156,2,75),(157,2,78),(158,2,79),(159,2,81),(160,2,82),(161,2,84),(162,2,86),(163,2,87),(164,2,88),(165,2,89),(166,2,91),(167,2,92),(168,2,93),(2475,2,95),(2476,2,96),(2477,2,97),(2478,2,98),(169,2,101),(170,2,102),(171,2,104),(172,2,109),(173,2,111),(174,2,112),(175,2,113),(176,2,114),(177,2,116),(178,2,117),(179,2,121),(180,2,122),(181,2,125),(182,2,141),(183,2,142),(184,2,144),(2479,2,151),(2480,2,152),(2481,2,153),(2482,2,154),(185,2,161),(186,2,162),(187,2,163),(188,2,164),(189,2,165),(190,2,170),(2471,2,171),(192,2,172),(2472,2,173),(193,2,221),(194,2,222),(195,2,229),(196,2,241),(197,2,242),(198,2,243),(199,2,251),(200,2,255),(201,2,262),(202,2,281),(203,2,282),(204,2,283),(205,2,331),(2483,2,531),(207,2,532),(2484,2,534),(208,2,536),(2473,2,700),(210,2,701),(211,2,702),(2474,2,703),(212,2,1001),(213,2,1002),(214,2,1003),(215,2,1004),(216,2,1005),(217,2,1101),(218,2,1102),(219,2,1104),(220,2,1109),(221,2,1181),(222,2,1182),(223,2,1183),(224,2,1184),(225,2,1185),(226,2,1186),(227,2,1187),(228,2,1188),(229,2,1201),(230,2,1202),(231,2,1231),(232,2,1232),(233,2,1233),(234,2,1234),(235,2,1421),(236,2,2401),(237,2,2402),(238,2,2403),(239,2,2411),(240,2,2412),(241,2,2413),(242,2,2500),(2470,2,2501),(243,2,2515),(1807,3,11),(1808,3,31),(1809,3,36),(1810,3,41),(1811,3,61),(1812,3,71),(1813,3,72),(1814,3,74),(1815,3,75),(1816,3,78),(1817,3,79),(1818,3,91),(1819,3,95),(1820,3,97),(1821,3,111),(1822,3,121),(1823,3,122),(1824,3,125),(1825,3,161),(1826,3,170),(1827,3,171),(1828,3,172),(1829,3,221),(1830,3,222),(1831,3,229),(1832,3,241),(1833,3,242),(1834,3,243),(1835,3,251),(1836,3,255),(1837,3,256),(1838,3,262),(1839,3,281),(1840,3,282),(1841,3,283),(1842,3,331),(1843,3,531),(1844,3,536),(1845,3,700),(1846,3,1001),(1847,3,1002),(1848,3,1003),(1849,3,1004),(1850,3,1005),(1851,3,1181),(1852,3,1182),(1853,3,1201),(1854,3,1202),(1855,3,1231),(1856,3,2401),(1857,3,2402),(1858,3,2403),(1859,3,2411),(1860,3,2412),(1861,3,2413),(1862,3,2500),(1863,3,2515); +/*!40000 ALTER TABLE `llx_user_rights` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_usergroup` +-- + +DROP TABLE IF EXISTS `llx_usergroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_usergroup` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `nom` varchar(255) NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `note` text, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_usergroup_name` (`nom`,`entity`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_usergroup` +-- + +LOCK TABLES `llx_usergroup` WRITE; +/*!40000 ALTER TABLE `llx_usergroup` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_usergroup` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_usergroup_rights` +-- + +DROP TABLE IF EXISTS `llx_usergroup_rights`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_usergroup_rights` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_usergroup` int(11) NOT NULL, + `fk_id` int(11) NOT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `fk_usergroup` (`fk_usergroup`,`fk_id`), + CONSTRAINT `fk_usergroup_rights_fk_usergroup` FOREIGN KEY (`fk_usergroup`) REFERENCES `llx_usergroup` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_usergroup_rights` +-- + +LOCK TABLES `llx_usergroup_rights` WRITE; +/*!40000 ALTER TABLE `llx_usergroup_rights` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_usergroup_rights` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_usergroup_user` +-- + +DROP TABLE IF EXISTS `llx_usergroup_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_usergroup_user` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `entity` int(11) NOT NULL DEFAULT '1', + `fk_user` int(11) NOT NULL, + `fk_usergroup` int(11) NOT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_usergroup_user` (`entity`,`fk_user`,`fk_usergroup`), + KEY `fk_usergroup_user_fk_user` (`fk_user`), + KEY `fk_usergroup_user_fk_usergroup` (`fk_usergroup`), + CONSTRAINT `fk_usergroup_user_fk_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`), + CONSTRAINT `fk_usergroup_user_fk_usergroup` FOREIGN KEY (`fk_usergroup`) REFERENCES `llx_usergroup` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_usergroup_user` +-- + +LOCK TABLES `llx_usergroup_user` WRITE; +/*!40000 ALTER TABLE `llx_usergroup_user` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_usergroup_user` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2012-04-11 12:11:50 diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index f9901feb7bd..9cf6604ce9b 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -81,6 +81,7 @@ class modMyModule extends DolibarrModules // 'models' => 0, // Set this to 1 if module has its own models directory // 'css' => '/mymodule/css/mymodule.css.php', // Set this to relative path of css if module has its own css file // 'hooks' => array('hookcontext1','hookcontext2') // Set here all hooks context managed by module + // 'workflow' => array('order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE')) // Set here all workflow context managed by module // ); $this->module_parts = array(); diff --git a/doc/images/dolibarr_120x90.png b/doc/images/dolibarr_120x90.png index c0aa357f41b..070bb00ddf6 100644 Binary files a/doc/images/dolibarr_120x90.png and b/doc/images/dolibarr_120x90.png differ diff --git a/doc/images/dolibarr_124x124.png b/doc/images/dolibarr_124x124.png new file mode 100644 index 00000000000..be80eac84b9 Binary files /dev/null and b/doc/images/dolibarr_124x124.png differ diff --git a/doc/images/dolibarr_125x125.png b/doc/images/dolibarr_125x125.png deleted file mode 100644 index 74588c18a5a..00000000000 Binary files a/doc/images/dolibarr_125x125.png and /dev/null differ diff --git a/doc/images/dolibarr_192x192.png b/doc/images/dolibarr_192x192.png deleted file mode 100644 index c151d46fbcd..00000000000 Binary files a/doc/images/dolibarr_192x192.png and /dev/null differ diff --git a/doc/images/dolibarr_256x256.png b/doc/images/dolibarr_256x256.png new file mode 100644 index 00000000000..c408baab9db Binary files /dev/null and b/doc/images/dolibarr_256x256.png differ diff --git a/doc/images/dolibarr_48x48.png b/doc/images/dolibarr_48x48.png index a3aa237d1cb..070f749fa88 100644 Binary files a/doc/images/dolibarr_48x48.png and b/doc/images/dolibarr_48x48.png differ diff --git a/doc/images/dolibarr_73x73.png b/doc/images/dolibarr_73x73.png index 607def2ec1b..13d63555ca5 100755 Binary files a/doc/images/dolibarr_73x73.png and b/doc/images/dolibarr_73x73.png differ diff --git a/doc/images/dolibarr_logo.jpg b/doc/images/dolibarr_logo.jpg new file mode 100644 index 00000000000..6025ca9d201 Binary files /dev/null and b/doc/images/dolibarr_logo.jpg differ diff --git a/doc/images/dolibarr_logo.png b/doc/images/dolibarr_logo.png index 0bca8326b5c..5e4d2f69b4e 100755 Binary files a/doc/images/dolibarr_logo.png and b/doc/images/dolibarr_logo.png differ diff --git a/doc/images/dolibarr_logo1.jpg b/doc/images/dolibarr_logo1.jpg deleted file mode 100644 index 357b2d570f7..00000000000 Binary files a/doc/images/dolibarr_logo1.jpg and /dev/null differ diff --git a/doc/images/dolibarr_logo1.png b/doc/images/dolibarr_logo1.png deleted file mode 100644 index af9c89885b7..00000000000 Binary files a/doc/images/dolibarr_logo1.png and /dev/null differ diff --git a/doc/images/dolibarr_logo2.png b/doc/images/dolibarr_logo2.png deleted file mode 100644 index 8cb195b93db..00000000000 Binary files a/doc/images/dolibarr_logo2.png and /dev/null differ diff --git a/htdocs/accountancy/class/accountancyaccount.class.php b/htdocs/accountancy/class/accountancyaccount.class.php index dfd591ae6cd..3d5814d143a 100644 --- a/htdocs/accountancy/class/accountancyaccount.class.php +++ b/htdocs/accountancy/class/accountancyaccount.class.php @@ -59,9 +59,11 @@ class AccountancyAccount */ function create($user) { + $now=dol_now(); + $sql = "INSERT INTO ".MAIN_DB_PREFIX."accountingaccount"; $sql.= " (date_creation, fk_user_author, numero,intitule)"; - $sql.= " VALUES (".$this->db->idate(gmmktime()).",".$user->id.",'".$this->numero."','".$this->intitule."')"; + $sql.= " VALUES (".$this->db->idate($now).",".$user->id.",'".$this->numero."','".$this->intitule."')"; $resql = $this->db->query($sql); if ($resql) diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index c856b0df32f..c636200bdf4 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -4,8 +4,8 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2011-2012 Juanjo Menent * * 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 @@ -39,7 +39,7 @@ if (! $user->admin) accessforbidden(); $type=array('yesno','texte','chaine'); -$action = GETPOST("action"); +$action = GETPOST('action','alpha'); /* @@ -49,8 +49,8 @@ $action = GETPOST("action"); // Action mise a jour ou ajout d'une constante if ($action == 'update' || $action == 'add') { - $constname=GETPOST("constname"); - $constvalue=GETPOST("constvalue"); + $constname=GETPOST('constname','alpha'); + $constvalue=(GETPOST('constvalue_'.$constname,'alpha') ? GETPOST('constvalue_'.$constname,'alpha') : GETPOST('constvalue','alpha')); if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue=''; if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice @@ -59,9 +59,8 @@ if ($action == 'update' || $action == 'add') else $constvalue=1; } - if (in_array($constname,array('ADHERENT_MAIL_VALID','ADHERENT_MAIL_COTIS','ADHERENT_MAIL_RESIL'))) $constvalue=$_POST["constvalue".$constname]; - $consttype=$_POST["consttype"]; - $constnote=GETPOST("constnote"); + $consttype=GETPOST('consttype','alpha'); + $constnote=GETPOST('constnote','alpha'); $res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity); if (! $res > 0) $error++; @@ -79,7 +78,7 @@ if ($action == 'update' || $action == 'add') // Action activation d'un sous module du module adherent if ($action == 'set') { - $result=dolibarr_set_const($db, $_GET["name"],$_GET["value"],'',0,'',$conf->entity); + $result=dolibarr_set_const($db, GETPOST('name','alpha'),GETPOST('value','alpha'),'',0,'',$conf->entity); if ($result < 0) { print $db->error(); @@ -89,7 +88,7 @@ if ($action == 'set') // Action desactivation d'un sous module du module adherent if ($action == 'unset') { - $result=dolibarr_del_const($db,$_GET["name"],$conf->entity); + $result=dolibarr_del_const($db,GETPOST('name','alpha'),$conf->entity); if ($result < 0) { print $db->error(); diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php index c442ac05a28..a716b92ba62 100755 --- a/htdocs/adherents/admin/public.php +++ b/htdocs/adherents/admin/public.php @@ -125,7 +125,6 @@ print $langs->trans("EnablePublicSubscriptionForm"); print ''; print $form->selectyesno("MEMBER_ENABLE_PUBLIC",$conf->global->MEMBER_ENABLE_PUBLIC,1); print "\n"; -print ''; // Type /*$var=! $var; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 82f817e2f21..d7b4390890e 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -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 diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 778835bbb67..709d7690c74 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -182,54 +182,56 @@ class Adherent extends CommonObject * @param string $text Text to make substitution to * @return string Value of input text string with substitutions done */ - function makeSubstitution($text) - { - global $langs; - - $birthday = dol_print_date($this->naiss,'day'); - - $msgishtml = 0; - if (dol_textishtml($text,1)) $msgishtml = 1; - - $infos=''; - if ($this->civilite_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel(1)."\n"; - $infos.= $langs->transnoentities("Lastname").": ".$this->lastname."\n"; - $infos.= $langs->transnoentities("Firstname").": ".$this->firstname."\n"; - $infos.= $langs->transnoentities("Company").": ".$this->societe."\n"; - $infos.= $langs->transnoentities("Address").": ".$this->address."\n"; - $infos.= $langs->transnoentities("Zip").": ".$this->zip."\n"; - $infos.= $langs->transnoentities("Town").": ".$this->town."\n"; - $infos.= $langs->transnoentities("Country").": ".$this->country."\n"; - $infos.= $langs->transnoentities("EMail").": ".$this->email."\n"; - $infos.= $langs->transnoentities("Login").": ".$this->login."\n"; - $infos.= $langs->transnoentities("Password").": ".$this->pass."\n"; - $infos.= $langs->transnoentities("Birthday").": ".$birthday."\n"; - $infos.= $langs->transnoentities("Photo").": ".$this->photo."\n"; - $infos.= $langs->transnoentities("Public").": ".yn($this->public); - - // Substitutions - $substitutionarray=array( - '%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT, - '%INFOS%'=>$msgishtml?dol_htmlentitiesbr($infos):$infos, - '%CIVILITE%'=>$this->getCivilityLabel($msgishtml?0:1), - '%PRENOM%'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname, - '%NOM%'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname, - '%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe, - '%ADRESSE%'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address, - '%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip, - '%VILLE%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town, - '%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country, - '%EMAIL%'=>$msgishtml?dol_htmlentitiesbr($this->email):$this->email, - '%NAISS%'=>$msgishtml?dol_htmlentitiesbr($birthday):$birthday, - '%PHOTO%'=>$msgishtml?dol_htmlentitiesbr($this->photo):$this->photo, - '%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login, - '%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass - ); - - complete_substitutions_array($substitutionarray, $langs); - - return make_substitutions($text,$substitutionarray); - } + function makeSubstitution($text) + { + global $langs; + + $birthday = dol_print_date($this->naiss,'day'); + + $msgishtml = 0; + if (dol_textishtml($text,1)) $msgishtml = 1; + + $infos=''; + if ($this->civilite_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel(1)."\n"; + $infos.= $langs->transnoentities("id").": ".$this->id."\n"; + $infos.= $langs->transnoentities("Lastname").": ".$this->lastname."\n"; + $infos.= $langs->transnoentities("Firstname").": ".$this->firstname."\n"; + $infos.= $langs->transnoentities("Company").": ".$this->societe."\n"; + $infos.= $langs->transnoentities("Address").": ".$this->address."\n"; + $infos.= $langs->transnoentities("Zip").": ".$this->zip."\n"; + $infos.= $langs->transnoentities("Town").": ".$this->town."\n"; + $infos.= $langs->transnoentities("Country").": ".$this->country."\n"; + $infos.= $langs->transnoentities("EMail").": ".$this->email."\n"; + $infos.= $langs->transnoentities("Login").": ".$this->login."\n"; + $infos.= $langs->transnoentities("Password").": ".$this->pass."\n"; + $infos.= $langs->transnoentities("Birthday").": ".$birthday."\n"; + $infos.= $langs->transnoentities("Photo").": ".$this->photo."\n"; + $infos.= $langs->transnoentities("Public").": ".yn($this->public); + + // Substitutions + $substitutionarray=array( + '%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT, + '%ID%'=>$msgishtml?dol_htmlentitiesbr($this->id):$this->id, + '%INFOS%'=>$msgishtml?dol_htmlentitiesbr($infos):$infos, + '%CIVILITE%'=>$this->getCivilityLabel($msgishtml?0:1), + '%PRENOM%'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname, + '%NOM%'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname, + '%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe, + '%ADRESSE%'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address, + '%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip, + '%VILLE%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town, + '%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country, + '%EMAIL%'=>$msgishtml?dol_htmlentitiesbr($this->email):$this->email, + '%NAISS%'=>$msgishtml?dol_htmlentitiesbr($birthday):$birthday, + '%PHOTO%'=>$msgishtml?dol_htmlentitiesbr($this->photo):$this->photo, + '%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login, + '%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass + ); + + complete_substitutions_array($substitutionarray, $langs); + + return make_substitutions($text,$substitutionarray); + } /** @@ -966,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,"; @@ -987,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); diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index f62b7781be8..5552cc84bd4 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2005-2007 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010 Juanjo Menent * * 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 '
'; } // 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 "

"; } @@ -226,9 +229,7 @@ else print $langs->trans("ErrorRecordNotFound"); } -$db->close(); - llxFooter(); - +$db->close(); ?> diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 0f756e5eaf2..c7d2c2b162d 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -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; diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php index d7b86d7202d..cd179364519 100644 --- a/htdocs/adherents/fiche_subscription.php +++ b/htdocs/adherents/fiche_subscription.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2007-2012 Laurent Destailleur * * 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 @@ -150,12 +150,7 @@ llxHeader('',$langs->trans("SubscriptionCard"),'EN:Module_Foundations|FR:Module_ $form = new Form($db); - -if ($errmsg) -{ - print '
'.$errmsg.'
'; - print "\n"; -} +dol_htmloutput_errors($errmsg); if ($user->rights->adherent->cotisation->creer && $action == 'edit') @@ -316,9 +311,14 @@ if ($rowid && $action != 'edit') print ''.$langs->trans("Member").''.$adh->getNomUrl(1,0,'subscription').''; print ''; + // Date record + /*print ''; + print ''.$langs->trans("DateSubscription").''.dol_print_date($subscription->datec,'dayhour').''; + print '';*/ + // Date subscription print ''; - print ''.$langs->trans("DateSubscription").''.dol_print_date($subscription->dateh,'dayhour').''; + print ''.$langs->trans("DateSubscription").''.dol_print_date($subscription->dateh,'day').''; print ''; // Date end subscription diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index dc3d8f3c689..c6f3d6dc46d 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -1,7 +1,8 @@ - * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2011 Laurent Destailleur +/* Copyright (C) 2001-2002 Rodolphe Quiedeville + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin * * 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); @@ -87,14 +91,16 @@ if ($result) $db->free($result); } +$now=dol_now(); // List members up to date // current rule: uptodate = the end date is in future whatever is type // 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(gmmktime()).')'; -$sql.= " WHERE d.statut = 1 AND d.datefin >= ".$db->idate(gmmktime()); +$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"; @@ -128,8 +134,12 @@ print "\n"; $var=false; print ""; print ''; -print $langs->trans("Name").':'; -print ''; +print $langs->trans("Ref").':'; +print ''; +print ""; +print ''; +print $langs->trans("Name").':'; +print ''; print ""; print ''; print $langs->trans("Other").':'; @@ -207,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); @@ -259,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); @@ -321,7 +333,7 @@ foreach ($AdherentType as $key => $adhtype) print ''.img_object($langs->trans("ShowType"),"group").' '.$adhtype->getNomUrl(0,dol_size(16)).''; print ''.(isset($MemberToValidate[$key]) && $MemberToValidate[$key] > 0?$MemberToValidate[$key]:'').' '.$staticmember->LibStatut(-1,$adhtype->cotisation,0,3).''; print ''.(isset($MembersValidated[$key]) && ($MembersValidated[$key]-$MemberUpToDate[$key] > 0) ? $MembersValidated[$key]-$MemberUpToDate[$key]:'').' '.$staticmember->LibStatut(1,$adhtype->cotisation,0,3).''; - print ''.(isset($MemberUpToDate[$key]) && $MemberUpToDate[$key] > 0 ? $MemberUpToDate[$key]:'').' '.$staticmember->LibStatut(1,$adhtype->cotisation,gmmktime(),3).''; + print ''.(isset($MemberUpToDate[$key]) && $MemberUpToDate[$key] > 0 ? $MemberUpToDate[$key]:'').' '.$staticmember->LibStatut(1,$adhtype->cotisation,$now,3).''; print ''.(isset($MembersResiliated[$key]) && $MembersResiliated[$key]> 0 ?$MembersResiliated[$key]:'').' '.$staticmember->LibStatut(0,$adhtype->cotisation,0,3).''; print "\n"; } @@ -329,7 +341,7 @@ print ''; print ''.$langs->trans("Total").''; print ''.$SommeA.' '.$staticmember->LibStatut(-1,$adhtype->cotisation,0,3).''; print ''.$SommeB.' '.$staticmember->LibStatut(1,$adhtype->cotisation,0,3).''; -print ''.$SommeC.' '.$staticmember->LibStatut(1,$adhtype->cotisation,gmmktime(),3).''; +print ''.$SommeC.' '.$staticmember->LibStatut(1,$adhtype->cotisation,$now,3).''; print ''.$SommeD.' '.$staticmember->LibStatut(0,$adhtype->cotisation,0,3).''; print ''; @@ -345,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%'"; @@ -401,7 +414,6 @@ print ''; print ''; -$db->close(); - llxFooter(); +$db->close(); ?> diff --git a/htdocs/adherents/info.php b/htdocs/adherents/info.php index 7fc5b055798..067ce7fcf27 100644 --- a/htdocs/adherents/info.php +++ b/htdocs/adherents/info.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2006 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 ''; print ''; -$db->close(); - llxFooter(); +$db->close(); ?> diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 57eb88dee8e..9b9d631bf28 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -1,7 +1,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2012 Laurent Destailleur * * 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,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php"); $langs->load("members"); $langs->load("companies"); -$sall=isset($_GET["sall"])?$_GET["sall"]:$_POST["sall"]; - $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -43,27 +41,32 @@ $pagenext = $page + 1; if (! $sortorder) { $sortorder="ASC"; } if (! $sortfield) { $sortfield="d.nom"; } -$filter=$_GET["filter"]; -$statut=isset($_GET["statut"])?$_GET["statut"]:''; +$action=GETPOST("action"); +$filter=GETPOST("filter"); +$statut=GETPOST("statut"); +$search=GETPOST("search"); +$search_ref=GETPOST("search_ref"); +$search_nom=GETPOST("search_nom"); +$search_prenom=GETPOST("search_prenom"); +$search_login=GETPOST("search_login"); +$type=GETPOST("type"); +$search_email=GETPOST("search_email"); +$search_categ=GETPOST("search_categ"); +$sall=GETPOST("sall",'int'); - -if ($_REQUEST["button_removefilter"]) +if (GETPOST("button_removefilter")) { - $_GET["search_nom"]=""; - $_REQUEST["search_nom"]=""; - $_GET["search_prenom"]=""; - $_REQUEST["search_prenom"]=""; - $_GET["type"]=""; - $_REQUEST["type"]=""; - $_GET["search_email"]=""; - $_REQUEST["search_email"]=""; - $_GET["search_categ"]=""; - $_REQUEST["search_categ"]=""; + $search=""; + $search_ref=""; + $search_nom=""; + $search_prenom=""; + $search_login=""; + $type=""; + $search_email=""; + $search_categ=""; $sall=""; } -// Load categ filters -$search_categ = isset($_GET["search_categ"])?$_GET["search_categ"]:$_POST["search_categ"]; /* @@ -90,44 +93,44 @@ if ($search_categ) $sql.= " AND d.rowid = cf.fk_member"; // Join for the needed $sql.= " AND d.entity = ".$conf->entity; if ($sall) { - $sql.=" AND (d.prenom like '%".$sall."%' OR d.nom like '%".$sall."%' OR d.societe like '%".$sall."%'"; - $sql.=" OR d.email like '%".$sall."%' OR d.login like '%".$sall."%' OR d.adresse like '%".$sall."%'"; - $sql.=" OR d.ville like '%".$sall."%' OR d.note like '%".$sall."%')"; + $sql.=" AND ("; + if (is_numeric($sall)) $sql.= "d.rowid = ".$sall." OR "; + $sql.=" d.prenom LIKE '%".$sall."%' OR d.nom LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; + $sql.=" OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.adresse LIKE '%".$sall."%'"; + $sql.=" OR d.ville LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } -if ($_REQUEST["type"] > 0) +if ($type > 0) { - $sql.=" AND t.rowid=".$_REQUEST["type"]; + $sql.=" AND t.rowid=".$type; } -if (isset($_GET["statut"])) +if (isset($_GET["statut"]) || isset($_POST["statut"])) { - $sql.=" AND d.statut in ($statut)"; // Peut valoir un nombre ou liste de nombre separes par virgules + $sql.=" AND d.statut in (".$statut.")"; // Peut valoir un nombre ou liste de nombre separes par virgules } -if ( $_POST["action"] == 'search') +if ($search_ref) { - if (isset($_POST['search']) && $_POST['search'] != '') - { - $sql.= " AND (d.prenom LIKE '%".$_POST['search']."%' OR d.nom LIKE '%".$_POST['search']."%')"; - } + if (is_numeric($search_ref)) $sql.= " AND (d.rowid = ".$search_ref.")"; + else $sql.=" AND 1 = 2"; // Always wrong } -if ($_GET["search_nom"]) +if ($search_nom) { - $sql.= " AND (d.prenom LIKE '%".$_GET["search_nom"]."%' OR d.nom LIKE '%".$_GET["search_nom"]."%')"; + $sql.= " AND (d.prenom LIKE '%".$search_nom."%' OR d.nom LIKE '%".$search_nom."%')"; } -if ($_GET["search_login"]) +if ($search_login) { - $sql.= " AND d.login LIKE '%".$_GET["search_login"]."%'"; + $sql.= " AND d.login LIKE '%".$search_login."%'"; } -if ($_GET["search_email"]) +if ($search_email) { - $sql.= " AND (d.email LIKE '%".$_GET["search_email"]."%')"; + $sql.= " AND (d.email LIKE '%".$search_email."%')"; } if ($filter == 'uptodate') { - $sql.=" AND datefin >= ".$db->idate($now); + $sql.=" AND datefin >= '".$db->idate($now)."'"; } if ($filter == 'outofdate') { - $sql.=" AND datefin < ".$db->idate($now); + $sql.=" AND datefin < '".$db->idate($now)."'"; } // Insert categ filter if ($search_categ) @@ -147,6 +150,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); +dol_syslog("get list sql=".$sql); $resql = $db->query($sql); if ($resql) { @@ -163,12 +167,12 @@ if ($resql) if ($statut == '1' && $filter=='outofdate') { $titre=$langs->trans("MembersListNotUpToDate"); } if ($statut == '0') { $titre=$langs->trans("MembersListResiliated"); } } - elseif ($_POST["action"] == 'search') + elseif ($action == 'search') { $titre=$langs->trans("MembersListQualified"); } - if ($_REQUEST["type"] > 0) + if ($type > 0) { $membertype=new AdherentType($db); $result=$membertype->fetch($_REQUEST["type"]); @@ -176,16 +180,16 @@ if ($resql) } $param=""; - if (isset($_GET["statut"])) $param.="&statut=".$_GET["statut"]; - if (isset($_GET["search_nom"])) $param.="&search_nom=".$_GET["search_nom"]; - if (isset($_GET["search_login"])) $param.="&search_login=".$_GET["search_login"]; - if (isset($_GET["search_email"])) $param.="&search_email=".$_GET["search_email"]; - if (isset($_GET["filter"])) $param.="&filter=".$_GET["filter"]; + if (isset($_GET["statut"])) $param.="&statut=".$statut; + if ($search_nom) $param.="&search_nom=".$search_nom; + if ($search_login) $param.="&search_login=".$search_login; + if ($search_email) $param.="&search_email=".$search_email; + if ($filter) $param.="&filter=".$filter; print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); if ($sall) { - print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall; + print $langs->trans("Filter")." (".$langs->trans("Ref").", ".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall; } print '
'; @@ -202,40 +206,44 @@ if ($resql) if ($moreforfilter) { print ''; - print ''; + print ''; print $moreforfilter; print ''; } print ''; - print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),"liste.php","d.nom",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Login"),"liste.php","d.login",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Type"),"liste.php","t.libelle",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Person"),"liste.php","d.morphy",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("EMail"),"liste.php","d.email",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),"liste.php","d.statut,d.datefin",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("EndSubscription"),"liste.php","d.datefin",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Action"),"liste.php","",$param,"",'width="60" align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.nom",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Login"),$_SERVER["PHP_SELF"],"d.login",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"t.libelle",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Person"),$_SERVER["PHP_SELF"],"d.morphy",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"d.email",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"d.statut,d.datefin",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("EndSubscription"),$_SERVER["PHP_SELF"],"d.datefin",$param,"",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"",$param,"",'width="60" align="center"',$sortfield,$sortorder); print "\n"; // Lignes des champs de filtre print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; + + print ''; + print ''; print ''; $listetype=$membertypestatic->liste_array(); - print $form->selectarray("type", $listetype, $_REQUEST["type"], 1, 0, 0, '', 0, 12); + print $form->selectarray("type", $listetype, $type, 1, 0, 0, '', 0, 12); print ''; print ' '; print ''; - print ''; + print ''; print ' '; @@ -254,19 +262,27 @@ if ($resql) $objp = $db->fetch_object($resql); $datefin=$db->jdate($objp->datefin); - - // Nom - $var=!$var; - print ""; + $memberstatic->id=$objp->rowid; + $memberstatic->ref=$objp->rowid; $memberstatic->lastname=$objp->lastname; $memberstatic->firstname=$objp->firstname; + + $var=!$var; + print ""; + + // Ref + print ""; + print $memberstatic->getNomUrl(1); + print "\n"; + + // Lastname if ($objp->societe != '') { - print "rowid\">".img_object($langs->trans("ShowMember"),"user").' '.dol_trunc($memberstatic->getFullName($langs))." / ".dol_trunc($objp->societe,12)."\n"; + print "rowid\">".dol_trunc($memberstatic->getFullName($langs))." / ".dol_trunc($objp->societe,12)."\n"; } else { - print "rowid\">".img_object($langs->trans("ShowMember"),"user").' '.dol_trunc($memberstatic->getFullName($langs))."\n"; + print "rowid\">".dol_trunc($memberstatic->getFullName($langs))."\n"; } // Login @@ -343,7 +359,7 @@ else } -$db->close(); - llxFooter(); + +$db->close(); ?> diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index 0cae0490222..a99ae057925 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -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(); ?> diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index c0453f5a951..1c5c0c998bd 100755 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -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; } @@ -194,7 +197,11 @@ else // Show graphics if ($mode == 'memberbycountry') { + $color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/graph-color.php'; + if (is_readable($color_file)) include_once($color_file); + // Assume we've already included the proper headers so just call our script inline + // More doc: https://developers.google.com/chart/interactive/docs/gallery/geomap?hl=fr-FR print "\n'."\n"; + + if (is_object($db)) $db->close(); +} + +?> diff --git a/htdocs/core/ajax/ajaxfiletree.php b/htdocs/core/ajax/ajaxdirtree.php similarity index 77% rename from htdocs/core/ajax/ajaxfiletree.php rename to htdocs/core/ajax/ajaxdirtree.php index c29408dcd08..89345535187 100644 --- a/htdocs/core/ajax/ajaxfiletree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2007-2012 Laurent Destailleur * * 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 @@ -12,12 +12,11 @@ * 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 . */ /** - * \file htdocs/core/ajax/ajaxFileTree.php + * \file htdocs/core/ajax/ajaxdirtree.php * \ingroup ecm * \brief This script returns content of a directory for filetree * \version $Id: ajaxFileTree.php,v 1.8 2011/07/06 17:03:41 eldy Exp $ @@ -33,10 +32,6 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -// C'est un wrapper, donc header vierge -function llxHeader() { } - -$res=0; $res=@include("../../main.inc.php"); include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'); include_once(DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'); @@ -76,6 +71,7 @@ if ($modulepart == 'ecm') /* * View */ + $userstatic=new User($db); $form=new Form($db); $ecmdirstatic = new EcmDirectory($db); @@ -94,6 +90,8 @@ foreach($sqltree as $keycursor => $val) } } +//var_dump($sqltree); + if( file_exists($fullpathselecteddir) ) { $files = @scandir($fullpathselecteddir); @@ -102,40 +100,41 @@ if( file_exists($fullpathselecteddir) ) natcasesort($files); if( count($files) > 2 ) /* The 2 accounts for . and .. */ { - echo "
    \n"; + echo "
      \n"; // All dirs - foreach( $files as $file ) // $file can be '.', '..', or 'My dir' + foreach( $files as $file ) // $file can be '.', '..', or 'My dir' or 'My file' { $nbofsubdir=0; $nboffilesinsubdir=0; // Try to find key into $sqltree - $ecmdir_id=-1; - foreach($sqltree as $ecmdir_idcursor => $val) + $val=array(); + foreach($sqltree as $key => $tmpval) { //print "-- ".$val['fullrelativename']." vs ".(($selecteddir != '/'?$selecteddir.'/':'').$file).'
      '; - if ($val['fullrelativename'] == (($selecteddir != '/'?$selecteddir.'/':'').$file)) - { - $ecmdir_id = $ecmdir_idcursor; - $resarray=tree_showpad($sqltree,$ecmdir_id,1); + if ($tmpval['fullrelativename'] == (($selecteddir != '/'?$selecteddir.'/':'').$file)) + { + $val=$tmpval; + $resarray=tree_showpad($sqltree,$key,1); $a=$resarray[0]; $nbofsubdir=$resarray[1]; $nboffilesinsubdir=$resarray[2]; - } + break; + } } //if (file_exists($fullpathselecteddir . $file) && $file != '.' && $file != '..' && is_dir($fullpathselecteddir . $file)) - if ($file != '.' && $file != '..' && ($ecmdir_id >= 0 || dol_is_dir($fullpathselecteddir . $file))) + if ($file != '.' && $file != '..' && ((! empty($val['fullrelativename']) && $val['id'] >= 0) || dol_is_dir($fullpathselecteddir . $file))) { print '\n"; } } - // All files - /* - foreach( $files as $file ) - { - if( file_exists($fullpathselecteddir . $file) && $file != '.' && $file != '..' && !is_dir($fullpathselecteddir . $file) ) - { - $ext = preg_replace('/^.*\./', '', $file); - print "
    • "; - print "" . dol_escape_htmltag($file) . ""; - print "
    • \n"; - } - } - */ - - // Enable tooltips + // Enable jquery handlers on new generated HTML objects print ''; echo "
    \n"; diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 72901e87a18..259a31ea998 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -87,7 +87,7 @@ class box_contracts extends ModeleBoxes if ($resql) { $num = $db->num_rows($resql); - $now=gmmktime(); + $now=dol_now(); $i = 0; diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index fc18d2ee453..736c13ce88a 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -93,7 +93,7 @@ class box_factures extends ModeleBoxes if ($result) { $num = $db->num_rows($result); - $now=gmmktime(); + $now=dol_now(); $i = 0; $l_due_date = $langs->trans('Late').' ('.strtolower($langs->trans('DateEcheance')).': %s)'; diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index 394934438fd..45cccf95a97 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -93,7 +93,7 @@ class box_factures_fourn extends ModeleBoxes if ($result) { $num = $db->num_rows($result); - $now=gmmktime(); + $now=dol_now(); $i = 0; $l_due_date = $langs->trans('Late').' ('.strtolower($langs->trans('DateEcheance')).': %s)'; diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index ebbba5def70..571d3c3e558 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -91,7 +91,7 @@ class box_factures_fourn_imp extends ModeleBoxes if ($result) { $num = $db->num_rows($result); - $now=gmmktime(); + $now=dol_now(); $i = 0; $l_due_date = $langs->trans('Late').' ('.$langs->trans('DateEcheance').': %s)'; diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index a98ec274bfc..70487fca5ad 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -94,7 +94,7 @@ class box_factures_imp extends ModeleBoxes if ($result) { $num = $db->num_rows($result); - $now=gmmktime(); + $now=dol_now(); $i = 0; $l_due_date = $langs->trans('Late').' ('.strtolower($langs->trans('DateEcheance')).': %s)'; diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index a45900672b6..10d85f10cda 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -130,7 +130,7 @@ class box_produits extends ModeleBoxes $this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => $price); - $this->info_box_contents[$i][3] = array('td' => 'align="center" width="20" nowrap="nowrap"', + $this->info_box_contents[$i][3] = array('td' => 'align="left" nowrap="nowrap"', 'text' => $price_base_type); $this->info_box_contents[$i][4] = array('td' => 'align="right"', diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index dee694e72f6..9f818bc63f7 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -90,7 +90,7 @@ class box_propales extends ModeleBoxes if ($result) { $num = $db->num_rows($result); - $now=gmmktime(); + $now=dol_now(); $i = 0; diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index a706254ee0b..646be1ca90c 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -95,7 +95,7 @@ class box_services_contracts extends ModeleBoxes if ($result) { $num = $db->num_rows($result); - $now=gmmktime(); + $now=dol_now(); $i = 0; diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 73713118b51..41bab9dee8a 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -132,7 +132,7 @@ class Canvas { if (empty($this->template_dir)) return 0; - if (file_exists($this->template_dir.($this->card?$this->card.'_':'').$this->action.'.tpl.php')) return 1; + if (file_exists($this->template_dir.($this->card?$this->card.'_':'').$this->actiontype.'.tpl.php')) return 1; else return 0; } @@ -148,7 +148,7 @@ class Canvas global $db, $conf, $langs, $user, $canvas; global $form, $formfile; - include($this->template_dir.($this->card?$this->card.'_':'').$this->action.'.tpl.php'); // Include native PHP template + include($this->template_dir.($this->card?$this->card.'_':'').$this->actiontype.'.tpl.php'); // Include native PHP template } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index dc62d653afe..66d5308fa51 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1439,18 +1439,19 @@ abstract class CommonObject /** * Update total_ht, total_ttc and total_vat for an object (sum of lines) * - * @param int $exclspec Exclude special product (product_type=9) - * @param int $roundingadjust -1=Use default method (MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND or 0), 0=Use total of rounding, 1=Use rounding of total - * @return int <0 if KO, >0 if OK + * @param int $exclspec Exclude special product (product_type=9) + * @param int $roundingadjust -1=Use default method (MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND or 0), 0=Use total of rounding, 1=Use rounding of total + * @param int $nodatabaseupdate 1=Do not update database. Update only properties of object. + * @return int <0 if KO, >0 if OK */ - function update_price($exclspec=0,$roundingadjust=-1) + function update_price($exclspec=0,$roundingadjust=-1,$nodatabaseupdate=0) { include_once(DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'); if ($roundingadjust < 0 && isset($conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND)) $roundingadjust=$conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND; if ($roundingadjust < 0) $roundingadjust=0; - $err=0; + $error=0; // Define constants to find lines to sum $fieldtva='total_tva'; @@ -1462,7 +1463,12 @@ abstract class CommonObject $sql.= ' tva_tx as vatrate'; $sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line; $sql.= ' WHERE '.$this->fk_element.' = '.$this->id; - if ($exclspec) $sql.= ' AND product_type <> 9'; + if ($exclspec) + { + $product_field='product_type'; + if ($this->table_element_line == 'contratdet') $product_field=''; // contratdet table has no product_type field + if ($product_field) $sql.= ' AND '.$product_field.' <> 9'; + } dol_syslog(get_class($this)."::update_price sql=".$sql); $resql = $this->db->query($sql); @@ -1537,32 +1543,39 @@ abstract class CommonObject if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier') $fieldtva='total_tva'; if ($this->element == 'propal') $fieldttc='total'; - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET'; - $sql .= " ".$fieldht."='".price2num($this->total_ht)."',"; - $sql .= " ".$fieldtva."='".price2num($this->total_tva)."',"; - $sql .= " ".$fieldlocaltax1."='".price2num($this->total_localtax1)."',"; - $sql .= " ".$fieldlocaltax2."='".price2num($this->total_localtax2)."',"; - $sql .= " ".$fieldttc."='".price2num($this->total_ttc)."'"; - $sql .= ' WHERE rowid = '.$this->id; + if (empty($nodatabaseupdate)) + { + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET'; + $sql .= " ".$fieldht."='".price2num($this->total_ht)."',"; + $sql .= " ".$fieldtva."='".price2num($this->total_tva)."',"; + $sql .= " ".$fieldlocaltax1."='".price2num($this->total_localtax1)."',"; + $sql .= " ".$fieldlocaltax2."='".price2num($this->total_localtax2)."',"; + $sql .= " ".$fieldttc."='".price2num($this->total_ttc)."'"; + $sql .= ' WHERE rowid = '.$this->id; - //print "xx".$sql; - dol_syslog(get_class($this)."::update_price sql=".$sql); - $resql=$this->db->query($sql); - if ($resql) + //print "xx".$sql; + dol_syslog(get_class($this)."::update_price sql=".$sql); + $resql=$this->db->query($sql); + if (! $resql) + { + $error++; + $this->error=$this->db->error(); + dol_syslog(get_class($this)."::update_price error=".$this->error,LOG_ERR); + } + } + + if (! $error) { return 1; } else { - $this->error=$this->db->error(); - dol_syslog(get_class($this)."::update_price error=".$this->error,LOG_ERR); return -1; } } else { - $this->error=$this->db->error(); - dol_syslog(get_class($this)."::update_price error=".$this->error,LOG_ERR); + dol_print_error($this->db,'Bad request in update_price'); return -1; } } @@ -1873,9 +1886,9 @@ abstract class CommonObject $sql = "SELECT rowid, canvas"; $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element; - $sql.= " WHERE entity = ".$conf->entity; - if (!empty($id)) $sql.= " AND rowid = ".$id; - if (!empty($ref)) $sql.= " AND ref = '".$ref."'"; + $sql.= " WHERE entity IN (".getEntity($this->element, 1).")"; + if (! empty($id)) $sql.= " AND rowid = ".$id; + if (! empty($ref)) $sql.= " AND ref = '".$ref."'"; $resql = $this->db->query($sql); if ($resql) @@ -2140,10 +2153,12 @@ abstract class CommonObject function setExtraParameters() { $this->db->begin(); + + $extraparams = (! empty($this->extraparams) ? json_encode($this->extraparams) : null); - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql.= ' SET extraparams = "'.$this->db->escape(json_encode($this->extraparams)).'"'; - $sql.= ' WHERE rowid = '.$this->id; + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; + $sql.= " SET extraparams = ".(! empty($extraparams) ? "'".$this->db->escape($extraparams)."'" : "null"); + $sql.= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::setExtraParameters sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); @@ -2162,6 +2177,52 @@ abstract class CommonObject } + /** + * Return if a country is inside the EEC (European Economic Community) + * + * @return boolean true = country inside EEC, false = country outside EEC + */ + function isInEEC() + { + // List of all country codes that are in europe for european vat rules + // List found on http://ec.europa.eu/taxation_customs/vies/lang.do?fromWhichPage=vieshome + $country_code_in_EEC=array( + 'AT', // Austria + 'BE', // Belgium + 'BG', // Bulgaria + 'CY', // Cyprus + 'CZ', // Czech republic + 'DE', // Germany + 'DK', // Danemark + 'EE', // Estonia + 'ES', // Spain + 'FI', // Finland + 'FR', // France + 'GB', // Royaume-uni + 'GR', // Greece + 'NL', // Holland + 'HU', // Hungary + 'IE', // Ireland + 'IT', // Italy + 'LT', // Lithuania + 'LU', // Luxembourg + 'LV', // Latvia + 'MC', // Monaco Seems to use same IntraVAT than France (http://www.gouv.mc/devwww/wwwnew.nsf/c3241c4782f528bdc1256d52004f970b/9e370807042516a5c1256f81003f5bb3!OpenDocument) + 'MT', // Malta + //'NO', // Norway + 'PL', // Poland + 'PT', // Portugal + 'RO', // Romania + 'SE', // Sweden + 'SK', // Slovakia + 'SI', // Slovenia + //'CH', // Switzerland - No. Swizerland in not in EEC + ); + //print "dd".$this->country_code; + return in_array($this->country_code,$country_code_in_EEC); + } + + // -------------------- // TODO: All functions here must be redesigned and moved as they are not business functions but output functions // -------------------- @@ -2345,183 +2406,161 @@ abstract class CommonObject /* This is to show array of line of details */ - /** - * Return HTML table for object lines - * TODO Move this into an output class file (htmlline.class.php) - * If lines are into a template, title must also be into a template - * But for the moment we don't know if it'st possible as we keep a method available on overloaded objects. - * - * @param string $action Action code - * @param string $seller Object of seller third party - * @param string $buyer Object of buyer third party - * @param string $selected Object line selected - * @param int $dateSelector 1=Show also date range input fields - * @param HookManager $hookmanager Hookmanager - * @return void - */ - function printObjectLines($action,$seller,$buyer,$selected=0,$dateSelector=0,$hookmanager=false) - { - global $conf,$langs; + /** + * Return HTML table for object lines + * TODO Move this into an output class file (htmlline.class.php) + * If lines are into a template, title must also be into a template + * But for the moment we don't know if it'st possible as we keep a method available on overloaded objects. + * + * @param string $action Action code + * @param string $seller Object of seller third party + * @param string $buyer Object of buyer third party + * @param string $selected Object line selected + * @param int $dateSelector 1=Show also date range input fields + * @param HookManager $hookmanager Hookmanager + * @return void + */ + function printObjectLines($action,$seller,$buyer,$selected=0,$dateSelector=0,$hookmanager=false) + { + global $conf,$langs; - // TODO test using div instead of tables - /* - print '
    '; - print '
    '; - print '
    '; - print '
    '.$langs->trans('Description').'
    '; - print '
    '.$langs->trans('VAT').'
    '; - print '
    '.$langs->trans('PriceUHT').'
    '; - print '
    '.$langs->trans('Qty').'
    '; - print '
    '.$langs->trans('ReductionShort').'
    '; - print '
    '.$langs->trans('TotalHTShort').'
    '; - print '
     
    '; - print '
     
    '; - print '
     
    '; - print '
    '; - */ + print ''; + if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) + { + print ' '; + } + print ''.$langs->trans('Description').''; + print ''.$langs->trans('VAT').''; + print ''.$langs->trans('PriceUHT').''; + print ''.$langs->trans('Qty').''; + print ''.$langs->trans('ReductionShort').''; + print ''.$langs->trans('TotalHTShort').''; + print ' '; + print ' '; + print ' '; // No width to allow autodim + print "\n"; - print ''; - if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) - { - print ' '; - } - print ''.$langs->trans('Description').''; - print ''.$langs->trans('VAT').''; - print ''.$langs->trans('PriceUHT').''; - print ''.$langs->trans('Qty').''; - print ''.$langs->trans('ReductionShort').''; - print ''.$langs->trans('TotalHTShort').''; - print ' '; - print ' '; - print ' '; // No width to allow autodim - print "\n"; + $num = count($this->lines); + $var = true; + $i = 0; - $num = count($this->lines); - $var = true; - $i = 0; + foreach ($this->lines as $line) + { + $var=!$var; - //print '
    '; + if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line))) + { + if (empty($line->fk_parent_line)) + { + $parameters = array('line'=>$line,'var'=>$var,'num'=>$num,'i'=>$i,'dateSelector'=>$dateSelector,'seller'=>$seller,'buyer'=>$buyer,'selected'=>$selected); + $reshook=$hookmanager->executeHooks('printObjectLine',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + } + } + else + { + $this->printObjectLine($action,$line,$var,$num,$i,$dateSelector,$seller,$buyer,$selected,$hookmanager); + } - foreach ($this->lines as $line) - { - $var=!$var; + $i++; + } + } - if (is_object($hookmanager) && ( ($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line) ) ) - { - if (empty($line->fk_parent_line)) - { - $parameters = array('line'=>$line,'var'=>$var,'num'=>$num,'i'=>$i,'dateSelector'=>$dateSelector,'seller'=>$seller,'buyer'=>$buyer,'selected'=>$selected); - $reshook=$hookmanager->executeHooks('printObjectLine',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks - } - } - else - { - $this->printObjectLine($action,$line,$var,$num,$i,$dateSelector,$seller,$buyer,$selected,$hookmanager); - } - - $i++; - } - - //print '
    '; - } - - /** - * Return HTML content of a detail line - * TODO Move this into an output class file (htmlline.class.php) - * If lines are into a template, title must also be into a template - * But for the moment we don't know if it's possible as we keep a method available on overloaded objects. - * - * @param string $action GET/POST action - * @param array $line Selected object line to output - * @param string $var Is it a an odd line (true) - * @param int $num Number of line (0) - * @param int $i I - * @param int $dateSelector 1=Show also date range input fields - * @param string $seller Object of seller third party - * @param string $buyer Object of buyer third party - * @param string $selected Object line selected - * @param HookManager $hookmanager Hook manager - * @return void + /** + * Return HTML content of a detail line + * TODO Move this into an output class file (htmlline.class.php) + * If lines are into a template, title must also be into a template + * But for the moment we don't know if it's possible as we keep a method available on overloaded objects. + * + * @param string $action GET/POST action + * @param array $line Selected object line to output + * @param string $var Is it a an odd line (true) + * @param int $num Number of line (0) + * @param int $i I + * @param int $dateSelector 1=Show also date range input fields + * @param string $seller Object of seller third party + * @param string $buyer Object of buyer third party + * @param string $selected Object line selected + * @param HookManager $hookmanager Hook manager + * @return void */ function printObjectLine($action,$line,$var,$num,$i,$dateSelector,$seller,$buyer,$selected=0,$hookmanager=false) { global $conf,$langs,$user; global $form,$bc,$bcdd; - $element = $this->element; - if ($element == 'propal') $element = 'propale'; // To work with non standard path + $element=$this->element; - // Show product and description - $type=$line->product_type?$line->product_type:$line->fk_product_type; - // Try to enhance type detection using date_start and date_end for free lines where type - // was not saved. - if (! empty($line->date_start)) $type=1; - if (! empty($line->date_end)) $type=1; + // Show product and description + $type=$line->product_type?$line->product_type:$line->fk_product_type; + // Try to enhance type detection using date_start and date_end for free lines where type + // was not saved. + if (! empty($line->date_start)) $type=1; + if (! empty($line->date_end)) $type=1; - // Ligne en mode visu - if ($action != 'editline' || $selected != $line->id) - { - // Produit - if ($line->fk_product > 0) - { - $product_static = new Product($this->db); + // Ligne en mode visu + if ($action != 'editline' || $selected != $line->id) + { + // Produit + if ($line->fk_product > 0) + { + $product_static = new Product($this->db); - // Define output language - if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) - { - $this->fetch_thirdparty(); - $prod = new Product($this->db, $line->fk_product); + // Define output language + if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) + { + $this->fetch_thirdparty(); + $prod = new Product($this->db, $line->fk_product); - $outputlangs = $langs; - $newlang=''; - if (empty($newlang) && GETPOST('lang_id')) $newlang=GETPOST('lang_id'); - if (empty($newlang)) $newlang=$this->client->default_lang; - if (! empty($newlang)) - { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($newlang); - } + $outputlangs = $langs; + $newlang=''; + if (empty($newlang) && GETPOST('lang_id')) $newlang=GETPOST('lang_id'); + if (empty($newlang)) $newlang=$this->client->default_lang; + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } - $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $line->product_label; - } - else { - $label = $line->product_label; - } + $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $line->product_label; + } + else + { + $label = $line->product_label; + } - $product_static->type=$line->fk_product_type; - $product_static->id=$line->fk_product; - $product_static->ref=$line->ref; - $product_static->libelle=$label; - $text=$product_static->getNomUrl(1); - $text.= ' - '.$label; - $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($line->description)); + $product_static->type=$line->fk_product_type; + $product_static->id=$line->fk_product; + $product_static->ref=$line->ref; + $product_static->libelle=$label; + $text=$product_static->getNomUrl(1); + $text.= ' - '.$label; + $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($line->description)); - // Use global variables + $seller and $buyer - include(DOL_DOCUMENT_ROOT.'/core/tpl/predefinedproductline_view.tpl.php'); - //include(DOL_DOCUMENT_ROOT.'/core/tpl/predefinedproductlinediv_view.tpl.php'); - } - else - { - // Use global variables + $dateSelector + $seller and $buyer - include(DOL_DOCUMENT_ROOT.'/core/tpl/freeproductline_view.tpl.php'); - } - } + // Use global variables + $seller and $buyer + include(DOL_DOCUMENT_ROOT.'/core/tpl/predefinedproductline_view.tpl.php'); + } + else + { + // Use global variables + $dateSelector + $seller and $buyer + include(DOL_DOCUMENT_ROOT.'/core/tpl/freeproductline_view.tpl.php'); + } + } - // Ligne en mode update - if ($this->statut == 0 && $action == 'editline' && $selected == $line->id) - { - if ($line->fk_product > 0) - { - // Use global variables + $dateSelector + $seller and $buyer - include(DOL_DOCUMENT_ROOT.'/core/tpl/predefinedproductline_edit.tpl.php'); - } - else - { - // Use global variables + $dateSelector + $seller and $buyer - include(DOL_DOCUMENT_ROOT.'/core/tpl/freeproductline_edit.tpl.php'); - } - } - } + // Ligne en mode update + if ($this->statut == 0 && $action == 'editline' && $selected == $line->id) + { + if ($line->fk_product > 0) + { + // Use global variables + $dateSelector + $seller and $buyer + include(DOL_DOCUMENT_ROOT.'/core/tpl/predefinedproductline_edit.tpl.php'); + } + else + { + // Use global variables + $dateSelector + $seller and $buyer + include(DOL_DOCUMENT_ROOT.'/core/tpl/freeproductline_edit.tpl.php'); + } + } + } /* This is to show array of line of details of source object */ diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index e8dc3fbbe80..a2c19812434 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -84,49 +84,36 @@ class Conf */ function Conf() { - // Avoid warnings when filling this->xxx - $this->file = (object) array(); - $this->db = (object) array(); - $this->global = (object) array(); - $this->mycompany = (object) array(); - $this->admin = (object) array(); - $this->user = (object) array(); - $this->syslog = (object) array(); - $this->browser = (object) array(); - $this->multicompany = (object) array(); - - $this->expedition_bon = (object) array(); - $this->livraison_bon = (object) array(); - $this->fournisseur = (object) array(); - $this->fournisseur->commande = (object) array(); - $this->fournisseur->facture = (object) array(); - $this->product = (object) array(); - $this->service = (object) array(); - $this->contrat = (object) array(); - $this->actions = (object) array(); - $this->commande = (object) array(); - $this->commande->client = (object) array(); - $this->commande->fournisseur = (object) array(); - $this->propal = (object) array(); - $this->propal->cloture = (object) array(); - $this->propal->facturation = (object) array(); - $this->facture = (object) array(); - $this->facture->client = (object) array(); - $this->facture->fournisseur = (object) array(); - $this->contrat = (object) array(); - $this->contrat->services = (object) array(); - $this->contrat->services->inactifs = (object) array(); - $this->contrat->services->expires = (object) array(); - $this->adherent = (object) array(); - $this->adherent->cotisation = (object) array(); - $this->bank = (object) array(); - $this->bank->rappro = (object) array(); - $this->bank->cheque = (object) array(); - $this->notification = (object) array(); - $this->mailing = (object) array(); - - //! Charset for HTML output and for storing data in memory - $this->file->character_set_client='UTF-8'; // UTF-8, ISO-8859-1 + // Avoid warnings when filling this->xxx + $this->file = (object) array(); + $this->db = (object) array(); + $this->global = (object) array(); + $this->mycompany = (object) array(); + $this->admin = (object) array(); + $this->user = (object) array(); + $this->syslog = (object) array(); + $this->browser = (object) array(); + $this->multicompany = (object) array(); + + // First level object + $this->expedition_bon = (object) array(); + $this->livraison_bon = (object) array(); + $this->fournisseur = (object) array(); + $this->product = (object) array(); + $this->service = (object) array(); + $this->contrat = (object) array(); + $this->actions = (object) array(); + $this->commande = (object) array(); + $this->propal = (object) array(); + $this->facture = (object) array(); + $this->contrat = (object) array(); + $this->adherent = (object) array(); + $this->bank = (object) array(); + $this->notification = (object) array(); + $this->mailing = (object) array(); + + //! Charset for HTML output and for storing data in memory + $this->file->character_set_client='UTF-8'; // UTF-8, ISO-8859-1 } @@ -220,12 +207,36 @@ class Conf } $i++; } - + $db->free($resql); } //var_dump($this->modules); //var_dump($this->modules_parts); + // Object $mc + if (! defined('NOREQUIREMC') && ! empty($this->multicompany->enabled)) + { + global $mc; + $ret = @dol_include_once('/multicompany/class/actions_multicompany.class.php'); + if ($ret) $mc = new ActionsMulticompany($db); + } + + // Second or others levels object + $this->propal->cloture = (object) array(); + $this->propal->facturation = (object) array(); + $this->commande->client = (object) array(); + $this->commande->fournisseur = (object) array(); + $this->facture->client = (object) array(); + $this->facture->fournisseur = (object) array(); + $this->fournisseur->commande = (object) array(); + $this->fournisseur->facture = (object) array(); + $this->contrat->services = (object) array(); + $this->contrat->services->inactifs = (object) array(); + $this->contrat->services->expires = (object) array(); + $this->adherent->cotisation = (object) array(); + $this->bank->rappro = (object) array(); + $this->bank->cheque = (object) array(); + // Clean some variables if (empty($this->global->MAIN_MENU_STANDARD)) $this->global->MAIN_MENU_STANDARD="eldy_backoffice.php"; if (empty($this->global->MAIN_MENUFRONT_STANDARD)) $this->global->MAIN_MENUFRONT_STANDARD="eldy_frontoffice.php"; @@ -249,23 +260,19 @@ class Conf $rootfordata = DOL_DATA_ROOT; $rootforuser = DOL_DATA_ROOT; // If multicompany module is enabled, we redefine the root of data - if (! empty($this->global->MAIN_MODULE_MULTICOMPANY) && ! empty($this->entity) && $this->entity > 1) + if (! empty($this->multicompany->enabled) && ! empty($this->entity) && $this->entity > 1) { $rootfordata.='/'.$this->entity; - //var_dump($mc->sharings); - //var_dump($mc->referent); - //var_dump($mc->entities); } - // For backward compatibility - // TODO Replace this->xxx->enabled by this->modulename->enabled to remove this code - if (isset($this->categorie->enabled)) $this->category->enabled=$this->categorie->enabled; - // Define default dir_output and dir_temp for directories of modules foreach($this->modules as $module) { - $this->$module->dir_output=$rootfordata."/".$module; - $this->$module->dir_temp=$rootfordata."/".$module."/temp"; + $this->$module->multidir_output = array($this->entity => $rootfordata."/".$module); + $this->$module->multidir_temp = array($this->entity => $rootfordata."/".$module."/temp"); + // For backward compatibility + $this->$module->dir_output = $rootfordata."/".$module; + $this->$module->dir_temp = $rootfordata."/".$module."/temp"; } // For mycompany storage @@ -277,9 +284,12 @@ class Conf $this->admin->dir_temp=$rootfordata.'/admin/temp'; // For user storage + $this->user->multidir_output = array($this->entity => $rootfordata."/users"); + $this->user->multidir_temp = array($this->entity => $rootfordata."/users/temp"); + // For backward compatibility $this->user->dir_output=$rootforuser."/users"; $this->user->dir_temp=$rootforuser."/users/temp"; - + // For propal storage $this->propal->dir_output=$rootforuser."/propale"; $this->propal->dir_temp=$rootforuser."/propale/temp"; @@ -297,11 +307,18 @@ class Conf $this->fournisseur->commande->dir_temp =$rootfordata."/fournisseur/commande/temp"; $this->fournisseur->facture->dir_output =$rootfordata."/fournisseur/facture"; $this->fournisseur->facture->dir_temp =$rootfordata."/fournisseur/facture/temp"; + // Module product/service - $this->product->dir_output=$rootfordata."/produit"; - $this->product->dir_temp =$rootfordata."/produit/temp"; - $this->service->dir_output=$rootfordata."/produit"; + $this->product->multidir_output=array($this->entity => $rootfordata."/produit"); + $this->product->multidir_temp =array($this->entity => $rootfordata."/produit/temp"); + $this->service->multidir_output=array($this->entity => $rootfordata."/produit"); + $this->service->multidir_temp =array($this->entity => $rootfordata."/produit/temp"); + // For backward compatibility + $this->product->dir_output=$rootfordata."/produit"; + $this->product->dir_temp =$rootfordata."/produit/temp"; + $this->service->dir_output=$rootfordata."/produit"; $this->service->dir_temp =$rootfordata."/produit/temp"; + // Module contrat $this->contrat->dir_output=$rootfordata."/contracts"; $this->contrat->dir_temp =$rootfordata."/contracts/temp"; @@ -397,7 +414,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 - $this->produit=$this->product; + 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 @@ -414,18 +435,11 @@ class Conf // For backward compatibility if ($this->top_menu == 'eldy.php') $this->top_menu='eldy_backoffice.php'; elseif ($this->top_menu == 'rodolphe.php') $this->top_menu='eldy_backoffice.php'; - + // Object $mc if (! defined('NOREQUIREMC') && ! empty($this->multicompany->enabled)) - { - global $mc; - - $ret = @dol_include_once('/multicompany/class/actions_multicompany.class.php'); - if ($ret) - { - $mc = new ActionsMulticompany($db); - $mc->setValues($this); - } + { + if (is_object($mc)) $mc->setValues($this); } } } diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index eb0e02b49b9..4f16862c82e 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -47,8 +47,8 @@ class DolEditor /** * Create an object to build an HTML area to edit a large string content * - * @param string $htmlname HTML name of WYSIWIG form - * @param string $content Content of WYSIWIG form + * @param string $htmlname HTML name of WYSIWIG field + * @param string $content Content of WYSIWIG field * @param int $width Width in pixel of edit area (auto by default) * @param int $height Height in pixel of edit area (200px by default) * @param string $toolbarname Name of bar set to use ('Full', 'dolibarr_notes', 'dolibarr_details', 'dolibarr_mailings') diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 67d2d96883d..971ab45376b 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -189,8 +189,8 @@ class Form else { if ($typeofdata == 'email') $ret.=dol_print_email($value,0,0,0,0,1); + elseif (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) $ret.=dol_htmlentitiesbr($value); elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret.=dol_print_date($value,'day'); - elseif ($typeofdata == 'text' || $typeofdata == 'textarea') $ret.=dol_htmlentitiesbr($value); else if (preg_match('/^select;/',$typeofdata)) { $arraydata=explode(',',preg_replace('/^select;/','',$typeofdata)); @@ -2138,7 +2138,7 @@ class Form * @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=preoutput confirm box with div id=dialog-confirm-xxx * @param int $height Force height of box * @param int $width Force width of bow - * @return string 'ajax' if a confirm ajax popup is shown, 'html' if it's an html form + * @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form */ function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500) { @@ -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"; @@ -2913,7 +2915,7 @@ class Form } else { - $this->error = ''.$langs->trans("ErrorNoVATRateDefinedForSellerCountry",$code_pays).''; + $this->error = ''.$langs->trans("ErrorNoVATRateDefinedForSellerCountry",$country_code).''; return -1; } } @@ -3390,6 +3392,8 @@ class Form { global $langs; + if ($value_as_key) $array=array_combine($array, $array); + $out=''."\n"; + if (is_array($array) && ! empty($array)) + { + if ($value_as_key) $array=array_combine($array, $array); + + if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && is_array($selected) && ! empty($selected)) + { + foreach ($selected as $selected_value) + { + foreach($array as $key => $value) + { + if ($selected_value == $key) + { + $value=$array[$selected_value]; + $out.= ''."\n"; + unset($array[$key]); + } + } + } + + if (! empty($array)) + { + foreach ($array as $key => $value) + { + $out.= ''."\n"; + } + } + } + else + { + foreach ($array as $key => $value) + { + $out.= ''."\n"; + } + } + } + $out.= ''."\n"; + + return $out; + } + /** * Return an html string with a select combo box to choose yes or no @@ -3614,7 +3693,7 @@ class Form if ($modulepart=='societe') { - $dir=$conf->societe->dir_output; + $dir=$conf->societe->multidir_output[$object->entity]; $smallfile=$object->logo; $smallfile=preg_replace('/(\.png|\.gif|\.jpg|\.jpeg|\.bmp)/i','_small\\1',$smallfile); if ($object->logo) $file=$object->id.'/logos/thumbs/'.$smallfile; @@ -3640,14 +3719,14 @@ class Form if ($file && file_exists($dir."/".$file)) { // TODO Link to large image - $ret.=''; - $ret.=''; + $ret.=''; + $ret.=''; $ret.=''; } else if ($altfile && file_exists($dir."/".$altfile)) { - $ret.=''; - $ret.=''; + $ret.=''; + $ret.=''; $ret.=''; } else diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 52c0ce52e5f..8999341513e 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -506,7 +506,7 @@ class FormCompany * @param string $var_id Name of id field * @param string $selected Pre-selected third party * @param string $htmlname Name of HTML form - * @param string $limitto Disable answers that are not id in this array list + * @param array $limitto Disable answers that are not id in this array list * @param int $forceid This is to force antoher object id than object->id * @return void * TODO obsolete ? diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index e7e1682bc31..34ecea9488b 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010-2011 Regis Houssin + * Copyright (C) 2010-2012 Regis Houssin * Copyright (c) 2010 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -78,8 +78,9 @@ class FormFile if (empty($title)) $title=$langs->trans("AttachANewFile"); if ($title != 'none') print_titre($title); - print ''; - print ''; + print ''; + print ''; + print ''; print ''; print ''; @@ -87,7 +88,7 @@ class FormFile if (! empty($options)) print ''; - print '"; print "\n"; diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index e2d7ed35ea8..e7f5837ac12 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -688,7 +688,7 @@ class FormOther $currentyear = date("Y")+$offset; $max_year = $currentyear+$max_year; $min_year = $currentyear-$min_year; - if(empty($selected)) $selected = $currentyear; + if(empty($selected) && empty($useempty)) $selected = $currentyear; $out.= '
    '.$options.''; + print ''; $max=$conf->global->MAIN_UPLOAD_DOC; // En Kb $maxphp=@ini_get('upload_max_filesize'); // En inconnu @@ -435,7 +436,7 @@ class FormFile // Execute hooks $parameters=array('socid'=>$GLOBALS['socid'],'id'=>$GLOBALS['id'],'modulepart'=>$modulepart); - if (is_object($hookmanager)) $out.= $hookmanager->executeHooks('formBuilddocOptions',$parameters); + if (is_object($hookmanager)) $out.= $hookmanager->executeHooks('formBuilddocOptions',$parameters,$GLOBALS['object']); } // Get list of files @@ -586,6 +587,7 @@ class FormFile //print "XX".$file['name']; //$file['name'] must be utf8 print ''; print img_mime($file['name'],$file['name'].' ('.dol_print_size($file['size'],0,0).')').' '; print dol_trunc($file['name'],$maxlength,'middle'); @@ -605,8 +607,8 @@ class FormFile } // Delete or view link print ''; - if (! empty($useinecm)) print ''.img_view().'   '; - if ($permtodelete) print ''.img_delete().''; + if ($useinecm) print ''.img_view().'   '; + if ($permtodelete) print ''.img_delete().''; else print ' '; print "
    '; @@ -1121,4 +1121,73 @@ function form_constantes($tableau) print '
    '; } +/** + * Add document model used by doc generator + * + * @param string $name Model name + * @param string $type Model type + * @param string $label Model label + * @param string $description Model description + * @return int <0 if KO, >0 if OK + */ +function addDocumentModel($name, $type, $label='', $description='') +{ + global $db, $conf; + + $db->begin(); + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)"; + $sql.= " VALUES ('".$db->escape($name)."','".$type."',".$conf->entity.", "; + $sql.= ($label?"'".$db->escape($label)."'":'null').", "; + $sql.= (! empty($description)?"'".$db->escape($description)."'":"null"); + $sql.= ")"; + + dol_syslog("admin.lib::addDocumentModel sql=".$sql); + $resql=$db->query($sql); + if ($resql) + { + $db->commit(); + return 1; + } + else + { + dol_print_error($db); + $db->rollback(); + return -1; + } +} + +/** + * Delete document model used by doc generator + * + * @param string $name Model name + * @param string $type Model type + * @return int <0 if KO, >0 if OK + */ +function delDocumentModel($name, $type) +{ + global $db, $conf; + + $db->begin(); + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model"; + $sql.= " WHERE nom = '".$db->escape($name)."'"; + $sql.= " AND type = '".$type."'"; + $sql.= " AND entity = ".$conf->entity; + + dol_syslog("admin.lib::delDocumentModel sql=".$sql); + $resql=$db->query($sql); + if ($resql) + { + $db->commit(); + return 1; + } + else + { + dol_print_error($db); + $db->rollback(); + return -1; + } +} + ?> \ No newline at end of file diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index 05fe6f9e8d9..151e09077d7 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/core/barcode.lib.php + * \file htdocs/core/lib/barcode.lib.php * \brief Set of functions used for barcode generation * \ingroup core */ @@ -289,9 +289,7 @@ function barcode_encode_genbarcode($code,$encoding) * * @param string $text the text-line (:: ...) * @param string $bars where to place the bars (...) - * @param int $scale scale factor ( 1 < scale < unlimited (scale 50 will produce - * 5400x300 pixels when - * using EAN-13!!!)) + * @param int $scale scale factor ( 1 < scale < unlimited (scale 50 will produce 5400x300 pixels when using EAN-13!!!)) * @param string $mode png,gif,jpg (default='png') * @param int $total_y the total height of the image ( default: scale * 60 ) * @param array $space default: $space[top] = 2 * $scale; $space[bottom]= 2 * $scale; $space[left] = 2 * $scale; $space[right] = 2 * $scale; diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 4f0afe66eef..7e741918d72 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -103,8 +103,8 @@ function getServerTimeZoneInt($refgmtdate='now') * Return server timezone string * * @return string Parent company timezone string ('Europe/Paris') - */ -/*function getParentCompanyTimeZoneString() + * +function getParentCompanyTimeZoneString() { if (function_exists('date_default_timezone_get')) return date_default_timezone_get(); else return ''; @@ -117,8 +117,8 @@ function getServerTimeZoneInt($refgmtdate='now') * * @param string $refdate Reference date for timezone (timezone differs on winter and summer) * @return int An offset in hour (+1 for Europe/Paris on winter and +2 for Europe/Paris on summer) - */ -/*function getParentCompanyTimeZoneInt($refgmtdate='now') + * +function getParentCompanyTimeZoneInt($refgmtdate='now') { global $conf; if (class_exists('DateTime') && ! empty($conf->global->MAIN_NEW_DATE)) @@ -612,7 +612,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR') // Paques // Calcul du jour de l ascension (38 jours apres Paques) - $date_ascension = mktime( + $date_ascension = mktime( date("H", $date_paques), date("i", $date_paques), date("s", $date_paques), diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 8a26d9f7deb..85cd1c1eb7e 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1,5 +1,6 @@ + * Copyright (C) 2012 Juanjo Menent * * 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 @@ -617,6 +618,65 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable } } +/** + * Uncompress a file + * + * @param string $newfile file to uncompress + * @param stirng $typefile type of file + * @param string $dstdir destination dir + * @return int 0 if ok, >0 if ko + */ +function dol_uncompress($newfile,$typefile,$dstdir) +{ + global $conf; + + $error=0; + $output=array(); + $system=PHP_OS; + + //TODO: See best method for this + + if ($system=="Linux" || $system=="Darwin") + { + if ($typefile == 'application/x-gzip' || $typefile == 'application/x-gtar') + { + $prog= "tar -xzvf "; + } + elseif ($typefile == 'application/zip') + { + $prog= "unzip "; + } + else + { + $output['error'] = -1; + $error++; + } + } + else + { + $output['error'] = -2; + $error++; + } + + if (! $error) + { + $original_file=basename($_FILES["fileinstall"]["name"]); + $dir=$conf->admin->dir_temp.'/'.$original_file; + $file=$dir.'/'.$original_file; + $command= $prog.$file.' 2>&1'; + + chdir($dstdir); + + exec($command, $out, $return_var); + if ($return_var == 1) $output['error'] = -3; // OK with Warning + elseif ($return_var == 127) $output['error'] = -4; // KO + + $output['return'] = $out; + } + + return $output; +} + /** * Remove a file or several files with a mask * diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 2d9c8b9d029..c76924f5822 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -33,116 +33,7 @@ if (! function_exists('json_encode')) { - /** - * Implement json_encode for PHP that does not support it - * - * @param mixed $elements PHP Object to json encode - * @return string Json encoded string - */ - function json_encode($elements) - { - $num = count($elements); - - // determine type - if (is_numeric(key($elements))) - { - // indexed (list) - $output = '['; - for ($i = 0, $last = ($num - 1); isset($elements[$i]); ++$i) - { - if (is_array($elements[$i])) $output.= json_encode($elements[$i]); - else $output .= _val($elements[$i]); - if($i !== $last) $output.= ','; - } - $output.= ']'; - } - else - { - // associative (object) - $output = '{'; - $last = $num - 1; - $i = 0; - foreach($elements as $key => $value) - { - $output .= '"'.$key.'":'; - if (is_array($value)) $output.= json_encode($value); - else $output .= _val($value); - if ($i !== $last) $output.= ','; - ++$i; - } - $output.= '}'; - } - - // return - return $output; - } - - /** - * Return text according to type - * - * @param mixed $val Value to show - * @return string Formated value - */ - function _val($val) - { - if (is_string($val)) return '"'.rawurlencode($val).'"'; - elseif (is_int($val)) return sprintf('%d', $val); - elseif (is_float($val)) return sprintf('%F', $val); - elseif (is_bool($val)) return ($val ? 'true' : 'false'); - else return 'null'; - } -} - -if (! function_exists('json_decode')) -{ - /** - * Implement json_decode for PHP that does not support it - * - * @param string $json Json encoded to PHP Object or Array - * @param bool $assoc False return an object, true return an array - * @return mixed Object or Array - */ - function json_decode($json, $assoc=false) - { - $comment = false; - - $strLength = dol_strlen($json); - for ($i=0; $i<$strLength; $i++) - { - if (! $comment) - { - if (($json[$i] == '{') || ($json[$i] == '[')) $out.= 'array('; - else if (($json[$i] == '}') || ($json[$i] == ']')) $out.= ')'; - else if ($json[$i] == ':') $out.= ' => '; - else $out.= $json[$i]; - } - else $out.= $json[$i]; - if ($json[$i] == '"' && $json[($i-1)]!="\\") $comment = !$comment; - } - - // Return an array - eval('$array = '.$out.';'); - - // Return an object - if (! $assoc) - { - if (! empty($array)) - { - $object = false; - - foreach ($array as $key => $value) - { - $object->{$key} = $value; - } - - return $object; - } - - return false; - } - - return $array; - } + include_once(DOL_DOCUMENT_ROOT ."/core/lib/json.lib.php"); } /** @@ -247,6 +138,7 @@ function getBrowserInfo() elseif (preg_match('/chrome(\/|\s)([\d\.]+)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='chrome'; $version=$reg[2]; } // we can have 'chrome (Mozilla...) chrome x.y' in one string elseif (preg_match('/chrome/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='chrome'; } elseif (preg_match('/iceweasel/i',$_SERVER["HTTP_USER_AGENT"])) { $name='iceweasel'; $version=$reg[2]; } + elseif (preg_match('/epiphany/i',$_SERVER["HTTP_USER_AGENT"])) { $name='epiphany'; $version=$reg[2]; } elseif ((empty($phone) || preg_match('/iphone/i',$_SERVER["HTTP_USER_AGENT"])) && preg_match('/safari(\/|\s)([\d\.]*)/i',$_SERVER["HTTP_USER_AGENT"], $reg)) { $name='safari'; $version=$reg[2]; } // Safari is often present in string for mobile but its not. elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='opera'; $version=$reg[2]; } elseif (preg_match('/msie(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='ie'; $version=$reg[2]; } // MS products at end @@ -275,7 +167,7 @@ function dol_shutdown() * Return value of a param into GET or POST supervariable * * @param string $paramname Name of parameter to found - * @param string $check Type of check (''=no check, 'int'=check it's numeric, 'alpha'=check it's alpha only) + * @param string $check Type of check (''=no check, 'int'=check it's numeric, 'alpha'=check it's alpha only, 'array'=check it's array) * @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get) * @return string Value found or '' if check fails */ @@ -289,17 +181,25 @@ function GETPOST($paramname,$check='',$method=0) if (! empty($check)) { - $out=trim($out); // Check if numeric - if ($check == 'int' && ! preg_match('/^[-\.,0-9]+$/i',$out)) $out=''; + if ($check == 'int' && ! preg_match('/^[-\.,0-9]+$/i',$out)) + { + $out=trim($out); + $out=''; + } // Check if alpha elseif ($check == 'alpha') { + $out=trim($out); // '"' is dangerous because param in url can close the href= or src= and add javascript functions. // '../' is dangerous because it allows dir transversals if (preg_match('/"/',$out)) $out=''; else if (preg_match('/\.\.\//',$out)) $out=''; } + elseif ($check == 'array') + { + if (! is_array($out) || empty($out)) $out=array(); + } } return $out; @@ -545,19 +445,19 @@ function dol_escape_htmltag($stringtoescape,$keepb=0) * Write log message into outputs. Possible outputs can be: * A file if SYSLOG_FILE_ON defined: file name is then defined by SYSLOG_FILE * Syslog if SYSLOG_SYSLOG_ON defined: facility is then defined by SYSLOG_FACILITY - * Warning, syslog functions are bugged on Windows, generating memory protection faults. To solve - * this, use logging to files instead of syslog (see setup of module). - * Note: If SYSLOG_FILE_NO_ERROR defined, we never output any error message when writing to log fails. + * Warning, syslog functions are bugged on Windows, generating memory protection faults. To solve + * this, use logging to files instead of syslog (see setup of module). + * Note: If SYSLOG_FILE_NO_ERROR defined, we never output any error message when writing to log fails. * Note: You can get log message into html sources by adding parameter &logtohtml=1 (constant MAIN_LOGTOHTML must be set) * - * This function works only if syslog module is enabled. + * This function works only if syslog module is enabled. * This must not use any call to other function calling dol_syslog (avoid infinite loop). * * @param string $message Line to log. Ne doit pas etre traduit si level = LOG_ERR - * @param int $level Log level + * @param int $level Log level * On Windows LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=6, LOG_DEBUG=6 si define_syslog_variables ou PHP 5.3+, 7 si dolibarr * On Linux LOG_ERR=3, LOG_WARNING=4, LOG_INFO=6, LOG_DEBUG=7 - * @return void + * @return void */ function dol_syslog($message, $level=LOG_INFO) { @@ -981,8 +881,8 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e * WARNING: This function always use PHP server timezone to return locale informations. * Usage must be avoid. * - * @param timestamp $timestamp Timestamp - * @param boolean $fast Fast mode + * @param timestamp $timestamp Timestamp + * @param boolean $fast Fast mode * @return array Array of informations * If no fast mode: * 'seconds' => $secs, @@ -1102,6 +1002,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1) function dol_now($mode='gmt') { // Note that gmmktime and mktime return same value (GMT) whithout parameters + //if ($mode == 'gmt') $ret=gmmktime(); // Strict Standards: gmmktime(): You should be using the time() function instead if ($mode == 'gmt') $ret=time(); // Time for now at greenwich. else if ($mode == 'tzserver') // Time for now with PHP server timezone added { @@ -1393,15 +1294,24 @@ function dol_print_address($address, $htmlid, $mode, $id) { print nl2br($address); $showmap=0; - if ($mode=='thirdparty' && $conf->google->enabled && $conf->global->GOOGLE_ENABLE_GMAPS) $showmap=1; - if ($mode=='contact' && $conf->google->enabled && $conf->global->GOOGLE_ENABLE_GMAPS_CONTACTS) $showmap=1; - if ($mode=='member' && $conf->google->enabled && $conf->global->GOOGLE_ENABLE_GMAPS_MEMBERS) $showmap=1; + if ($mode=='thirdparty' && $conf->google->enabled && $conf->global->GOOGLE_ENABLE_GMAPS) $showgmap=1; + if ($mode=='contact' && $conf->google->enabled && $conf->global->GOOGLE_ENABLE_GMAPS_CONTACTS) $showgmap=1; + if ($mode=='member' && $conf->google->enabled && $conf->global->GOOGLE_ENABLE_GMAPS_MEMBERS) $showgmap=1; + if ($mode=='thirdparty' && $conf->openstreetmap->enabled && $conf->global->OPENSTREETMAP_ENABLE_MAPS) $showomap=1; + if ($mode=='contact' && $conf->openstreetmap->enabled && $conf->global->OPENSTREETMAP_ENABLE_MAPS_CONTACTS) $showomap=1; + if ($mode=='member' && $conf->openstreetmap->enabled && $conf->global->OPENSTREETMAP_ENABLE_MAPS_MEMBERS) $showomap=1; - if ($showmap) + // TODO Add a hook here + if ($showgmap) { $url=dol_buildpath('/google/gmaps.php?mode='.$mode.'&id='.$id,1); print ' '; } + if ($showomap) + { + $url=dol_buildpath('/openstreetmap/maps.php?mode='.$mode.'&id='.$id,1); + print ' '; + } } } @@ -1796,7 +1706,7 @@ function img_picto_common($alt, $picto, $options='', $pictoisfullpath=0) global $conf; if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png'; if ($pictoisfullpath) return ''.dol_escape_htmltag($alt).''; - if (! empty($conf->global->MAIN_MODULE_CAN_OVERWRITE_COMMONICONS) && file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/'.$picto)) return ''.dol_escape_htmltag($alt).''; + if (! empty($conf->global->MAIN_MODULE_CAN_OVERWRITE_COMMONICONS) && file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/'.$picto)) return ''.dol_escape_htmltag($alt).''; return ''.dol_escape_htmltag($alt).''; } @@ -2254,7 +2164,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.='XDebug informations:'."
    \n"; @@ -4085,6 +3995,19 @@ function unichr($unicode , $encoding = 'UTF-8') { return mb_convert_encoding("&#{$unicode};", $encoding, 'HTML-ENTITIES'); } + +/** + * Convert an array with RGB value into hex RGB value + * + * @param array $arraycolor Array + * @param string $colorifnotfound Color code to return if entry not defined + * @return string RGB hex value (without # before). For example: FF00FF + */ +function colorArrayToHex($arraycolor,$colorifnotfound='888888') +{ + if (! is_array($arraycolor)) return $colorifnotfound; + return dechex($arraycolor[0]).dechex($arraycolor[1]).dechex($arraycolor[2]); +} /** * Convert a currency code into its symbol diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 1b482063032..6d5c71f2410 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -121,7 +121,7 @@ function dol_print_object_info($object) print '
    '; } - // Date + // Date creation if (isset($object->date_creation)) print $langs->trans("DateCreation")." : " . dol_print_date($object->date_creation,"dayhourtext") . '
    '; @@ -142,7 +142,7 @@ function dol_print_object_info($object) print '
    '; } - // Date + // Date change if (isset($object->date_modification)) print $langs->trans("DateLastModification")." : " . dol_print_date($object->date_modification,"dayhourtext") . '
    '; @@ -163,10 +163,31 @@ function dol_print_object_info($object) print '
    '; } - // Date + // Date validation if (isset($object->date_validation)) print $langs->trans("DateValidation")." : " . dol_print_date($object->date_validation,"dayhourtext") . '
    '; + // User approve + if (isset($object->user_approve)) + { + print $langs->trans("ApprovedBy")." : "; + if (is_object($object->user_approve)) + { + print $object->user_approve->getNomUrl(1); + } + else + { + $userstatic=new User($db); + $userstatic->fetch($object->user_approve); + print $userstatic->getNomUrl(1); + } + print '
    '; + } + + // Date approve + if (isset($object->date_approve)) + print $langs->trans("DateApprove")." : " . dol_print_date($object->date_approve,"dayhourtext") . '
    '; + // User close if (isset($object->user_cloture)) { @@ -184,7 +205,7 @@ function dol_print_object_info($object) print '
    '; } - // Date + // Date close if (isset($object->date_cloture)) print $langs->trans("DateClosing")." : " . dol_print_date($object->date_cloture,"dayhourtext") . '
    '; @@ -205,11 +226,11 @@ function dol_print_object_info($object) print '
    '; } - // Date + // Date conciliate if (isset($object->date_rappro)) print $langs->trans("DateConciliating")." : " . dol_print_date($object->date_rappro,"dayhourtext") . '
    '; - //Date send + // Date send if (isset($object->date_envoi)) print $langs->trans("DateLastSend")." : " . dol_print_date($object->date_envoi,"dayhourtext") . '
    '; } @@ -447,7 +468,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 +498,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."
    \n"; //print "masktri=".$masktri." maskcounter=".$maskcounter." maskraz=".$maskraz." maskoffset=".$maskoffset." yearcomp=".$yearcomp."
    \n"; // Define $sqlstring @@ -558,7 +585,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m $sql.= " WHERE facnumber LIKE '".$maskLike."'"; $sql.= " AND entity IN (".getEntity($table, 1).")"; - dol_syslog("mod_facture_terre::getNextValue sql=".$sql); + dol_syslog("functions2::get_next_value sql=".$sql); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/lib/json.lib.php b/htdocs/core/lib/json.lib.php new file mode 100644 index 00000000000..0704f035848 --- /dev/null +++ b/htdocs/core/lib/json.lib.php @@ -0,0 +1,353 @@ + + * Copyright (C) 2011-2012 Regis Houssin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * or see http://www.gnu.org/ + */ + +/** + * \file htdocs/core/lib/json.lib.php + * \brief Functions to emulate json function for PHP < 5.3 compatibility + * \ingroup core + */ + +if (! function_exists('json_encode')) +{ + /** + * Implement json_encode for PHP that does not support it + * + * @param mixed $elements PHP Object to json encode + * @return string Json encoded string + */ + function json_encode($elements) + { + return dol_json_encode($elements); + } +} + +/** + * Implement json_encode for PHP that does not support it + * + * @param mixed $elements PHP Object to json encode + * @return string Json encoded string + */ +function dol_json_encode($elements) +{ + $num = count($elements); + + // determine type + if (is_numeric(key($elements))) + { + // indexed (list) + $output = '['; + for ($i = 0, $last = ($num - 1); isset($elements[$i]); ++$i) + { + if (is_array($elements[$i])) $output.= json_encode($elements[$i]); + else $output .= _val($elements[$i]); + if($i !== $last) $output.= ','; + } + $output.= ']'; + } + else + { + // associative (object) + $output = '{'; + $last = $num - 1; + $i = 0; + foreach($elements as $key => $value) + { + $output .= '"'.$key.'":'; + if (is_array($value)) $output.= json_encode($value); + else $output .= _val($value); + if ($i !== $last) $output.= ','; + ++$i; + } + $output.= '}'; + } + + // return + return $output; +} + +/** + * Return text according to type + * + * @param mixed $val Value to show + * @return string Formated value + */ +function _val($val) +{ + if (is_string($val)) + { + // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT + $ascii = ''; + $strlen_var = strlen($val); + + /* + * Iterate over every character in the string, + * escaping with a slash or encoding to UTF-8 where necessary + */ + for ($c = 0; $c < $strlen_var; ++$c) { + + $ord_var_c = ord($val{$c}); + + switch (true) { + case $ord_var_c == 0x08: + $ascii .= '\b'; + break; + case $ord_var_c == 0x09: + $ascii .= '\t'; + break; + case $ord_var_c == 0x0A: + $ascii .= '\n'; + break; + case $ord_var_c == 0x0C: + $ascii .= '\f'; + break; + case $ord_var_c == 0x0D: + $ascii .= '\r'; + break; + + case $ord_var_c == 0x22: + case $ord_var_c == 0x2F: + case $ord_var_c == 0x5C: + // double quote, slash, slosh + $ascii .= '\\'.$val{$c}; + break; + + case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): + // characters U-00000000 - U-0000007F (same as ASCII) + $ascii .= $val{$c}; + break; + + case (($ord_var_c & 0xE0) == 0xC0): + // characters U-00000080 - U-000007FF, mask 110XXXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, ord($val{$c + 1})); + $c += 1; + $utf16 = utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF0) == 0xE0): + // characters U-00000800 - U-0000FFFF, mask 1110XXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, ord($val{$c + 1}), ord($val{$c + 2})); + $c += 2; + $utf16 = utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF8) == 0xF0): + // characters U-00010000 - U-001FFFFF, mask 11110XXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, ord($val{$c + 1}), ord($val{$c + 2}), ord($val{$c + 3})); + $c += 3; + $utf16 = utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFC) == 0xF8): + // characters U-00200000 - U-03FFFFFF, mask 111110XX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, ord($val{$c + 1}), ord($val{$c + 2}), ord($val{$c + 3}), ord($val{$c + 4})); + $c += 4; + $utf16 = utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFE) == 0xFC): + // characters U-04000000 - U-7FFFFFFF, mask 1111110X + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, ord($val{$c + 1}), ord($val{$c + 2}), ord($val{$c + 3}), ord($val{$c + 4}), ord($val{$c + 5})); + $c += 5; + $utf16 = utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + } + } + + return '"'.$ascii.'"'; + } + elseif (is_int($val)) return sprintf('%d', $val); + elseif (is_float($val)) return sprintf('%F', $val); + elseif (is_bool($val)) return ($val ? 'true' : 'false'); + else return 'null'; +} + +if (! function_exists('json_decode')) +{ + /** + * Implement json_decode for PHP that does not support it + * + * @param string $json Json encoded to PHP Object or Array + * @param bool $assoc False return an object, true return an array + * @return mixed Object or Array + */ + function json_decode($json, $assoc=false) + { + return dol_json_decode($json, $assoc); + } +} + +/** + * Implement json_decode for PHP that does not support it + * + * @param string $json Json encoded to PHP Object or Array + * @param bool $assoc False return an object, true return an array + * @return mixed Object or Array + */ +function dol_json_decode($json, $assoc=false) +{ + $comment = false; + + $strLength = strlen($json); // Must stay strlen and not dol_strlen because we want technical length, not visible length + for ($i=0; $i<$strLength; $i++) + { + if (! $comment) + { + if (($json[$i] == '{') || ($json[$i] == '[')) $out.= 'array('; + else if (($json[$i] == '}') || ($json[$i] == ']')) $out.= ')'; + else if ($json[$i] == ':') $out.= ' => '; + else $out.=$json[$i]; + } + else $out.= $json[$i]; + if ($json[$i] == '"' && $json[($i-1)]!="\\") $comment = !$comment; + } + + $out=_unval($out); + + // Return an array + eval('$array = '.$out.';'); + + // Return an object + if (! $assoc) + { + if (! empty($array)) + { + $object = false; + + foreach ($array as $key => $value) + { + $object->{$key} = $value; + } + + return $object; + } + + return false; + } + + return $array; +} + +/** + * Return text according to type + * + * @param mixed $val Value to decode + * @return string Formated value + */ +function _unval($val) +{ + while (preg_match('/\\\u([0-9A-F]{2})([0-9A-F]{2})/i', $val, $reg)) + { + // single, escaped unicode character + $utf16 = chr(hexdec($reg[1])) . chr(hexdec($reg[2])); + $utf8 .= utf162utf8($utf16); + $val=preg_replace('/\\\u'.$reg[1].$reg[2].'/i',$utf8,$val); + } + return $val; +} + +/** + * convert a string from one UTF-16 char to one UTF-8 char + * + * Normally should be handled by mb_convert_encoding, but + * provides a slower PHP-only method for installations + * that lack the multibye string extension. + * + * @param string $utf16 UTF-16 character + * @return string UTF-8 character + */ +function utf162utf8($utf16) +{ + // oh please oh please oh please oh please oh please + if(function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16'); + } + + $bytes = (ord($utf16{0}) << 8) | ord($utf16{1}); + + switch(true) { + case ((0x7F & $bytes) == $bytes): + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr($bytes); + + case (0x07FF & $bytes) == $bytes: + // return a 2-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0xC0 | (($bytes >> 6) & 0x1F)) + . chr(0x80 | ($bytes & 0x3F)); + + case (0xFFFF & $bytes) == $bytes: + // return a 3-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0xE0 | (($bytes >> 12) & 0x0F)) + . chr(0x80 | (($bytes >> 6) & 0x3F)) + . chr(0x80 | ($bytes & 0x3F)); + } + + // ignoring UTF-32 for now, sorry + return ''; +} + +/** + * convert a string from one UTF-8 char to one UTF-16 char + * + * Normally should be handled by mb_convert_encoding, but + * provides a slower PHP-only method for installations + * that lack the multibye string extension. + * + * @param string $utf8 UTF-8 character + * @return string UTF-16 character + */ +function utf82utf16($utf8) +{ + // oh please oh please oh please oh please oh please + if(function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); + } + + switch(strlen($utf8)) { + case 1: + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return $utf8; + + case 2: + // return a UTF-16 character from a 2-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x07 & (ord($utf8{0}) >> 2)) . chr((0xC0 & (ord($utf8{0}) << 6)) | (0x3F & ord($utf8{1}))); + + case 3: + // return a UTF-16 character from a 3-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr((0xF0 & (ord($utf8{0}) << 4)) | (0x0F & (ord($utf8{1}) >> 2))) . chr((0xC0 & (ord($utf8{1}) << 6)) | (0x7F & ord($utf8{2}))); + } + + // ignoring UTF-32 for now, sorry + return ''; +} diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 941028ccb61..8469ca9b931 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -168,6 +168,27 @@ function pdf_getPDFFontSize($outputlangs) } +/** + * Return height to use for Logo onot PDF + * + * @param string $logo Full path to logo file to use + * @return number + */ +function pdf_getHeightForLogo($logo) +{ + $height=22; $maxwidth=130; + include_once(DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'); + $tmp=dol_getImageSize($logo); + if ($tmp['height']) + { + $width=round($height*$tmp['width']/$tmp['height']); + if ($width > $maxwidth) $height=$height*$maxwidth/$width; + } + //print $tmp['width'].' '.$tmp['height'].' '.$width; exit; + return $height; +} + + /** * Return a string with full address formated * @@ -193,14 +214,14 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target if ($sourcecompany->state_id && empty($sourcecompany->departement)) $sourcecompany->departement=getState($sourcecompany->state_id); if ($targetcompany->state_id && empty($targetcompany->departement)) $targetcompany->departement=getState($targetcompany->state_id); - if ($mode == 'source') + if ($mode == 'source' || ! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS)) { $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($sourcecompany))."\n"; // Tel if ($sourcecompany->tel) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($sourcecompany->tel); // Fax - if ($sourcecompany->fax) $stringaddress .= ($stringaddress ? ($sourcecompany->tel ? " - " : "\n") : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($sourcecompany->fax); + if ($sourcecompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($sourcecompany->fax); // EMail if ($sourcecompany->email) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($sourcecompany->email); // Web @@ -322,17 +343,18 @@ function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text) /** - * Show bank informations for PDF generation + * Show bank informations for PDF generation * - * @param PDF &$pdf Object PDF - * @param Translate $outputlangs Object lang - * @param int $curx X - * @param int $cury Y - * @param Account $account Bank account object - * @param int $onlynumber Output only number - * @return void + * @param PDF &$pdf Object PDF + * @param Translate $outputlangs Object lang + * @param int $curx X + * @param int $cury Y + * @param Account $account Bank account object + * @param int $onlynumber Output only number + * @param int $default_font_size Default font size + * @return void */ -function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0) +function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default_font_size=10) { global $mysoc, $conf; @@ -340,7 +362,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0) if (empty($onlynumber)) { - $pdf->SetFont('','B',8); + $pdf->SetFont('','B',$default_font_size - 3); $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByTransferOnThisBankAccount').':', 0, 'L', 0); $cury+=4; } @@ -357,9 +379,9 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0) if (empty($onlynumber)) { - $pdf->SetFont('','',6); + $pdf->SetFont('','',$default_font_size - 4); $pdf->SetXY($curx, $cury); - $pdf->MultiCell(90, 3, $outputlangs->transnoentities("Bank").': ' . $outputlangs->convToOutputCharset($account->bank), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Bank").': ' . $outputlangs->convToOutputCharset($account->bank), 0, 'L', 0); $cury+=3; } @@ -383,10 +405,10 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0) // Bank code $tmplength=18; $pdf->SetXY($curx, $cury+5); - $pdf->SetFont('','',8);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->code_banque), 0, 'C', 0); + $pdf->SetFont('','',$default_font_size - 3);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->code_banque), 0, 'C', 0); $pdf->SetXY($curx, $cury+1); $curx+=$tmplength; - $pdf->SetFont('','B',6);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankCode"), 0, 'C', 0); + $pdf->SetFont('','B',$default_font_size - 4);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankCode"), 0, 'C', 0); if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+8); } if ($val == 'desk') @@ -394,10 +416,10 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0) // Desk $tmplength=18; $pdf->SetXY($curx, $cury+5); - $pdf->SetFont('','',8);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->code_guichet), 0, 'C', 0); + $pdf->SetFont('','',$default_font_size - 3);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->code_guichet), 0, 'C', 0); $pdf->SetXY($curx, $cury+1); $curx+=$tmplength; - $pdf->SetFont('','B',6);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("DeskCode"), 0, 'C', 0); + $pdf->SetFont('','B',$default_font_size - 4);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("DeskCode"), 0, 'C', 0); if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+8); } if ($val == 'number') @@ -405,10 +427,10 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0) // Number $tmplength=24; $pdf->SetXY($curx, $cury+5); - $pdf->SetFont('','',8);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->number), 0, 'C', 0); + $pdf->SetFont('','',$default_font_size - 3);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->number), 0, 'C', 0); $pdf->SetXY($curx, $cury+1); $curx+=$tmplength; - $pdf->SetFont('','B',6);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankAccountNumber"), 0, 'C', 0); + $pdf->SetFont('','B',$default_font_size - 4);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankAccountNumber"), 0, 'C', 0); if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+8); } if ($val == 'key') @@ -416,10 +438,10 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0) // Key $tmplength=13; $pdf->SetXY($curx, $cury+5); - $pdf->SetFont('','',8);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->cle_rib), 0, 'C', 0); + $pdf->SetFont('','',$default_font_size - 3);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->cle_rib), 0, 'C', 0); $pdf->SetXY($curx, $cury+1); $curx+=$tmplength; - $pdf->SetFont('','B',6);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankAccountNumberKey"), 0, 'C', 0); + $pdf->SetFont('','B',$default_font_size - 4);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankAccountNumberKey"), 0, 'C', 0); if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+8); } } @@ -431,12 +453,12 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0) { $pdf->SetFont('','B',6); $pdf->SetXY($curx, $cury); - $pdf->MultiCell(90, 3, $outputlangs->transnoentities("Bank").': ' . $outputlangs->convToOutputCharset($account->bank), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Bank").': ' . $outputlangs->convToOutputCharset($account->bank), 0, 'L', 0); $cury+=3; $pdf->SetFont('','B',6); $pdf->SetXY($curx, $cury); - $pdf->MultiCell(90, 3, $outputlangs->transnoentities("BankAccountNumber").': ' . $outputlangs->convToOutputCharset($account->number), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("BankAccountNumber").': ' . $outputlangs->convToOutputCharset($account->number), 0, 'L', 0); $cury+=3; } @@ -452,7 +474,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0) { $pdf->SetXY($curx, $cury); $val=$outputlangs->transnoentities("Residence").': ' . $outputlangs->convToOutputCharset($account->domiciliation); - $pdf->MultiCell(90, 3, $val, 0, 'L', 0); + $pdf->MultiCell(100, 3, $val, 0, 'L', 0); $nboflines=dol_nboflines_bis($val,120); //print $nboflines;exit; $cury+=($nboflines*2)+2; @@ -460,9 +482,9 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0) else if (! $usedetailedbban) $cury+=1; $pdf->SetXY($curx, $cury); - $pdf->MultiCell(90, 3, $outputlangs->transnoentities($ibankey).': ' . $outputlangs->convToOutputCharset($account->iban), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities($ibankey).': ' . $outputlangs->convToOutputCharset($account->iban), 0, 'L', 0); $pdf->SetXY($curx, $cury+3); - $pdf->MultiCell(90, 3, $outputlangs->transnoentities($bickey).': ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities($bickey).': ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0); return $pdf->getY(); } @@ -673,12 +695,14 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass * @param Translate $outputlangs Object lang * @param int $posx X * @param int $posy Y + * @param float $w Width of cells. If 0, they extend up to the right margin of the page. + * @param float $h Cell minimum height. The cell extends automatically if needed. * @param int $align Align * @param string $default_font_size Font size * @param HookManager $hookmanager Hook manager object * @return void */ -function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$align,$default_font_size,$hookmanager=false) +function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$align,$default_font_size,$hookmanager=false) { $linkedobjects = pdf_getLinkedObjects($object,$outputlangs,$hookmanager); if (! empty($linkedobjects)) @@ -688,13 +712,13 @@ function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$align,$d $posy+=3; $pdf->SetXY($posx,$posy); $pdf->SetFont('','', $default_font_size - 2); - $pdf->MultiCell(100, 3, $linkedobject["ref_title"].' : '.$linkedobject["ref_value"], '', $align); + $pdf->MultiCell($w, $h, $linkedobject["ref_title"].' : '.$linkedobject["ref_value"], '', $align); if (! empty($linkedobject["date_title"]) && ! empty($linkedobject["date_value"])) { $posy+=3; $pdf->SetXY($posx,$posy); - $pdf->MultiCell(100, 3, $linkedobject["date_title"].' : '.$linkedobject["date_value"], '', $align); + $pdf->MultiCell($w, $h, $linkedobject["date_title"].' : '.$linkedobject["date_value"], '', $align); } } } @@ -783,7 +807,11 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl // Description long of product line if ($desc && ($desc != $label)) { - if ( $libelleproduitservice && empty($hidedesc) ) $libelleproduitservice.="\n"; + if ($libelleproduitservice && empty($hidedesc)) + { + if ($conf->global->FCKEDITOR_ENABLE_DETAILS) $libelleproduitservice.='
    '; + else $libelleproduitservice.="\n"; + } if ($desc == '(CREDIT_NOTE)' && $object->lines[$i]->fk_remise_except) { @@ -803,7 +831,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl { if ($idprod) { - if ( empty($hidedesc) ) $libelleproduitservice.=$desc; + if (empty($hidedesc)) $libelleproduitservice.=$desc; } else { @@ -822,7 +850,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl $ref_prodserv = ""; if ($conf->global->PRODUCT_ADD_TYPE_IN_DOCUMENTS) // In standard mode, we do not show this { - if($prodser->isservice()) + if ($prodser->isservice()) { $prefix_prodserv = $outputlangs->transnoentitiesnoconv("Service")." "; } @@ -832,9 +860,9 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl } } - if ( empty($hideref) ) + if (empty($hideref)) { - if ($issupplierline) $ref_prodserv = $prodser->ref.' ('.$outputlangs->trans("SupplierRef").' '.$ref_supplier.')'; // Show local ref and supplier ref + if ($issupplierline) $ref_prodserv = $prodser->ref.' ('.$outputlangs->transnoentitiesnoconv("SupplierRef").' '.$ref_supplier.')'; // Show local ref and supplier ref else $ref_prodserv = $prodser->ref; // Show local ref only $ref_prodserv .= " - "; diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index 5a7c461dc1e..aa5209af653 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -163,7 +163,7 @@ function dol_loginfunction($langs,$conf,$mysoc) { global $dolibarr_main_demo,$db; global $smartphone,$hookmanager; - + // Instantiate hooks of thirdparty module only if not already define if (! is_object($hookmanager)) { @@ -209,7 +209,7 @@ function dol_loginfunction($langs,$conf,$mysoc) } } - $conf->css = "/theme/".$conf->theme."/style.css.php?lang=".$langs->defaultlang; + $conf->css = "/theme/".(GETPOST('theme')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php?lang=".$langs->defaultlang; $conf_css = DOL_URL_ROOT.$conf->css; // Set cookie for timeout management @@ -237,7 +237,7 @@ function dol_loginfunction($langs,$conf,$mysoc) $demologin=$tab[0]; $demopassword=$tab[1]; } - + // Execute hook getLoginPageOptions // Should be an array with differents options in $hookmanager->resArray $parameters=array('entity' => $_POST['entity']); diff --git a/htdocs/core/lib/treeview.lib.php b/htdocs/core/lib/treeview.lib.php index fe66d16f2a4..bb5273cb781 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -75,7 +75,7 @@ function is_in_subtree($fulltree,$parentid,$childid) * Show indent and picto of a tree line. Return array with information of line. * * @param array &$fulltree Array of entries in correct order - * @param string $key Key of value to show picto + * @param string $key Key of entry into fulltree to show picto * @param int $silent Do not output indent and picto, returns only value * @return array array(0 or 1 if at least one of this level after, 0 or 1 if at least one of higher level after, nbofdirinsub, nbofdocinsub) */ diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index cbd5b5da82e..765ec971c99 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -254,11 +254,12 @@ insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4205__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/liste.php?leftmenu=members&statut=1&filter=outofdate', 'MenuMembersNotUpToDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 4, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4206__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/liste.php?leftmenu=members&statut=1&filter=uptodate', 'MenuMembersUpToDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 5, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4207__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/liste.php?leftmenu=members&statut=0', 'MenuMembersResiliated', 2, 'members', '$user->rights->adherent->lire', '', 2, 6, __ENTITY__); -insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4208__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/stats/index.php?leftmenu=members&statut=0', 'MenuMembersStats', 1, 'members', '$user->rights->adherent->lire', '', 2, 7, __ENTITY__); +insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4208__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry', 'MenuMembersStats', 1, 'members', '$user->rights->adherent->lire', '', 2, 7, __ENTITY__); -- Members - Subscriptions insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4300__+MAX_llx_menu__, 'members', '', 13__+MAX_llx_menu__, '/adherents/index.php?leftmenu=members&mainmenu=members', 'Subscriptions', 0, 'compta', '$user->rights->adherent->cotisation->lire', '', 2, 1, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4301__+MAX_llx_menu__, 'members', '', 4300__+MAX_llx_menu__, '/adherents/liste.php?statut=-1&leftmenu=accountancy&mainmenu=members', 'NewSubscription', 1, 'compta', '$user->rights->adherent->cotisation->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4302__+MAX_llx_menu__, 'members', '', 4300__+MAX_llx_menu__, '/adherents/cotisations.php?leftmenu=accountancy', 'List', 1, 'compta', '$user->rights->adherent->cotisation->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4302__+MAX_llx_menu__, 'members', '', 4300__+MAX_llx_menu__, '/adherents/cotisations.php?leftmenu=members', 'List', 1, 'compta', '$user->rights->adherent->cotisation->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4303__+MAX_llx_menu__, 'members', '', 4300__+MAX_llx_menu__, '/adherents/stats/index.php?leftmenu=members', 'MenuMembersStats', 1, 'members', '$user->rights->adherent->lire', '', 2, 7, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4500__+MAX_llx_menu__, 'members', 'export', 13__+MAX_llx_menu__, '/adherents/index.php?leftmenu=export&mainmenu=members', 'Exports', 0, 'members', '$user->rights->adherent->export', '', 2, 3, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled && $conf->export->enabled', __HANDLER__, 'left', 4501__+MAX_llx_menu__, 'members', '', 4500__+MAX_llx_menu__, '/exports/index.php?leftmenu=export', 'Datas', 1, 'members', '$user->rights->adherent->export', '', 2, 0, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4502__+MAX_llx_menu__, 'members', '', 4500__+MAX_llx_menu__, '/adherents/htpasswd.php?leftmenu=export', 'Filehtpasswd', 1, 'members', '$user->rights->adherent->export', '', 2, 1, __ENTITY__); diff --git a/htdocs/core/menus/smartphone/smartphone_frontoffice.php b/htdocs/core/menus/smartphone/smartphone_frontoffice.php index 0739e894db3..521b7467d07 100755 --- a/htdocs/core/menus/smartphone/smartphone_frontoffice.php +++ b/htdocs/core/menus/smartphone/smartphone_frontoffice.php @@ -48,6 +48,7 @@ class MenuSmart * Show menu * * @param string $limitmenuto To limit menu to a top or left menu value + * @return void */ function showmenu($limitmenuto) { diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index de947d7edc3..8023c202f56 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -77,7 +77,7 @@ function print_auguria_menu($db,$atarget,$type_user) // Define the class (top menu selected or not) if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"'; - else if (! empty($_SESSION['mainmenu']) && $newTabMenu[$i]['mainmenu'] == $_SESSION['mainmenu']) $classname='class="tmenusel"'; + else if (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"'; else $classname='class="tmenu"'; print_start_menu_entry_auguria($idsel); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index da878ae9275..e249311631f 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -472,7 +472,7 @@ function print_eldy_menu($db,$atarget,$type_user) // Define the class (top menu selected or not) if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"'; - else if (! empty($_SESSION['mainmenu']) && $newTabMenu[$i]['mainmenu'] == $_SESSION['mainmenu']) $classname='class="tmenusel"'; + else if (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"'; else $classname='class="tmenu"'; print_start_menu_entry($idsel); @@ -652,57 +652,57 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) $langs->load("help"); // Setup - $newmenu->add("/admin/index.php?leftmenu=setup", $langs->trans("Setup"), 0, 1, '', $mainmenu, 'setup'); + $newmenu->add("/admin/index.php?mainmenu=home&leftmenu=setup", $langs->trans("Setup"), 0, 1, '', $mainmenu, 'setup'); if ($leftmenu=="setup") { - $newmenu->add("/admin/company.php", $langs->trans("MenuCompanySetup"),1); - $newmenu->add("/admin/modules.php", $langs->trans("Modules"),1); - $newmenu->add("/admin/menus.php", $langs->trans("Menus"),1); - $newmenu->add("/admin/ihm.php", $langs->trans("GUISetup"),1); + $newmenu->add("/admin/company.php?mainmenu=home", $langs->trans("MenuCompanySetup"),1); + $newmenu->add("/admin/modules.php?mainmenu=home", $langs->trans("Modules"),1); + $newmenu->add("/admin/menus.php?mainmenu=home", $langs->trans("Menus"),1); + $newmenu->add("/admin/ihm.php?mainmenu=home", $langs->trans("GUISetup"),1); if (! in_array($langs->defaultlang,array('en_US','en_GB','en_NZ','en_AU','fr_FR','fr_BE','es_ES','ca_ES'))) { if ($leftmenu=="setup") $newmenu->add("/admin/translation.php", $langs->trans("Translation"),1); } - $newmenu->add("/admin/boxes.php", $langs->trans("Boxes"),1); - $newmenu->add("/admin/delais.php",$langs->trans("Alerts"),1); - $newmenu->add("/admin/proxy.php", $langs->trans("Security"),1); - $newmenu->add("/admin/limits.php", $langs->trans("MenuLimits"),1); - $newmenu->add("/admin/pdf.php", $langs->trans("PDF"),1); - $newmenu->add("/admin/mails.php", $langs->trans("Emails"),1); - $newmenu->add("/admin/sms.php", $langs->trans("Sms"),1); - $newmenu->add("/admin/dict.php", $langs->trans("DictionnarySetup"),1); - $newmenu->add("/admin/const.php", $langs->trans("OtherSetup"),1); + $newmenu->add("/admin/boxes.php?mainmenu=home", $langs->trans("Boxes"),1); + $newmenu->add("/admin/delais.php?mainmenu=home",$langs->trans("Alerts"),1); + $newmenu->add("/admin/proxy.php?mainmenu=home", $langs->trans("Security"),1); + $newmenu->add("/admin/limits.php?mainmenu=home", $langs->trans("MenuLimits"),1); + $newmenu->add("/admin/pdf.php?mainmenu=home", $langs->trans("PDF"),1); + $newmenu->add("/admin/mails.php?mainmenu=home", $langs->trans("Emails"),1); + $newmenu->add("/admin/sms.php?mainmenu=home", $langs->trans("Sms"),1); + $newmenu->add("/admin/dict.php?mainmenu=home", $langs->trans("DictionnarySetup"),1); + $newmenu->add("/admin/const.php?mainmenu=home", $langs->trans("OtherSetup"),1); } // System info - $newmenu->add("/admin/system/index.php?leftmenu=system", $langs->trans("SystemInfo"), 0, 1, '', $mainmenu, 'system'); + $newmenu->add("/admin/system/index.php?mainmenu=home&leftmenu=system", $langs->trans("SystemInfo"), 0, 1, '', $mainmenu, 'system'); if ($leftmenu=="system") { - $newmenu->add("/admin/system/dolibarr.php", $langs->trans("Dolibarr"),1); - $newmenu->add("/admin/system/constall.php", $langs->trans("AllParameters"),2); - $newmenu->add("/admin/system/modules.php", $langs->trans("Modules"),2); - $newmenu->add("/admin/triggers.php", $langs->trans("Triggers"),2); - $newmenu->add("/admin/system/about.php", $langs->trans("About"),2); - $newmenu->add("/admin/system/os.php", $langs->trans("OS"),1); - $newmenu->add("/admin/system/web.php", $langs->trans("WebServer"),1); - $newmenu->add("/admin/system/phpinfo.php", $langs->trans("Php"),1); + $newmenu->add("/admin/system/dolibarr.php?mainmenu=home", $langs->trans("Dolibarr"),1); + $newmenu->add("/admin/system/constall.php?mainmenu=home", $langs->trans("AllParameters"),2); + $newmenu->add("/admin/system/modules.php?mainmenu=home", $langs->trans("Modules"),2); + $newmenu->add("/admin/triggers.php?mainmenu=home", $langs->trans("Triggers"),2); + $newmenu->add("/admin/system/about.php?mainmenu=home", $langs->trans("About"),2); + $newmenu->add("/admin/system/os.php?mainmenu=home", $langs->trans("OS"),1); + $newmenu->add("/admin/system/web.php?mainmenu=home", $langs->trans("WebServer"),1); + $newmenu->add("/admin/system/phpinfo.php?mainmenu=home", $langs->trans("Php"),1); //if (function_exists('xdebug_is_enabled')) $newmenu->add("/admin/system/xdebug.php", $langs->trans("XDebug"),1); - $newmenu->add("/admin/system/database.php", $langs->trans("Database"),1); - $newmenu->add("/admin/system/database-tables.php", $langs->trans("Tables"),2); - $newmenu->add("/admin/system/database-tables-contraintes.php", $langs->trans("Constraints"),2); + $newmenu->add("/admin/system/database.php?mainmenu=home", $langs->trans("Database"),1); + $newmenu->add("/admin/system/database-tables.php?mainmenu=home", $langs->trans("Tables"),2); + $newmenu->add("/admin/system/database-tables-contraintes.php?mainmenu=home", $langs->trans("Constraints"),2); } // System info - $newmenu->add("/admin/tools/index.php?leftmenu=admintools", $langs->trans("SystemTools"), 0, 1, '', $mainmenu, 'admintools'); + $newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("SystemTools"), 0, 1, '', $mainmenu, 'admintools'); if ($leftmenu=="admintools") { - $newmenu->add("/admin/tools/dolibarr_export.php", $langs->trans("Backup"),1); - $newmenu->add("/admin/tools/dolibarr_import.php", $langs->trans("Restore"),1); - $newmenu->add("/admin/tools/update.php", $langs->trans("MenuUpgrade"),1); - if (function_exists('eaccelerator_info')) $newmenu->add("/admin/tools/eaccelerator.php", $langs->trans("EAccelerator"),1); - $newmenu->add("/admin/tools/listevents.php", $langs->trans("Audit"),1); - $newmenu->add("/admin/tools/listsessions.php", $langs->trans("Sessions"),1); - $newmenu->add("/admin/tools/purge.php", $langs->trans("Purge"),1); - $newmenu->add("/support/index.php", $langs->trans("HelpCenter"),1,1,'targethelp'); + $newmenu->add("/admin/tools/dolibarr_export.php?mainmenu=home", $langs->trans("Backup"),1); + $newmenu->add("/admin/tools/dolibarr_import.php?mainmenu=home", $langs->trans("Restore"),1); + $newmenu->add("/admin/tools/update.php?mainmenu=home", $langs->trans("MenuUpgrade"),1); + if (function_exists('eaccelerator_info')) $newmenu->add("/admin/tools/eaccelerator.php?mainmenu=home", $langs->trans("EAccelerator"),1); + $newmenu->add("/admin/tools/listevents.php?mainmenu=home", $langs->trans("Audit"),1); + $newmenu->add("/admin/tools/listsessions.php?mainmenu=home", $langs->trans("Sessions"),1); + $newmenu->add("/admin/tools/purge.php?mainmenu=home", $langs->trans("Purge"),1); + $newmenu->add("/support/index.php?mainmenu=home", $langs->trans("HelpCenter"),1,1,'targethelp'); } } @@ -1317,11 +1317,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) $newmenu->add("/adherents/liste.php?leftmenu=members&statut=1&filter=uptodate",$langs->trans("MenuMembersUpToDate"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/liste.php?leftmenu=members&statut=1&filter=outofdate",$langs->trans("MenuMembersNotUpToDate"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/liste.php?leftmenu=members&statut=0",$langs->trans("MenuMembersResiliated"),2,$user->rights->adherent->lire); - $newmenu->add("/adherents/stats/index.php?leftmenu=members",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); + $newmenu->add("/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Subscriptions"),0,$user->rights->adherent->cotisation->lire); $newmenu->add("/adherents/liste.php?leftmenu=members&statut=-1,1&mainmenu=members",$langs->trans("NewSubscription"),1,$user->rights->adherent->cotisation->creer); $newmenu->add("/adherents/cotisations.php?leftmenu=members",$langs->trans("List"),1,$user->rights->adherent->cotisation->lire); + $newmenu->add("/adherents/stats/index.php?leftmenu=members",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); if ($conf->categorie->enabled) diff --git a/htdocs/core/modules/cheque/pdf/modules_chequereceipts.php b/htdocs/core/modules/cheque/pdf/modules_chequereceipts.php index 64f3ad48635..5943e534ca3 100644 --- a/htdocs/core/modules/cheque/pdf/modules_chequereceipts.php +++ b/htdocs/core/modules/cheque/pdf/modules_chequereceipts.php @@ -45,7 +45,7 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator * @param string $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db,$maxfilenamelength=0) { global $conf; diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index d61bba6447c..09c338c9e08 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -18,8 +18,8 @@ */ /** - * \file htdocs/core/modules/commande/doc_generic_order_odt.modules.php - * \ingroup societe + * \file htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php + * \ingroup commande * \brief File of class to build ODT documents for third parties */ diff --git a/htdocs/core/modules/commande/doc/pdf_edison.modules.php b/htdocs/core/modules/commande/doc/pdf_edison.modules.php index 894efc2d7be..4121ffe7fe5 100644 --- a/htdocs/core/modules/commande/doc/pdf_edison.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_edison.modules.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/core/modules/commande/pdf_edison.modules.php + * \file htdocs/core/modules/commande/doc/pdf_edison.modules.php * \ingroup commande * \brief Fichier de la classe permettant de generer les commandes au modele Edison */ @@ -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); @@ -547,7 +547,8 @@ class pdf_edison extends ModelePDFCommandes { if (is_readable($logo)) { - $pdf->Image($logo, $this->marge_gauche, $posy, 0, 22); // width=0 (auto), max height=22 + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -652,7 +653,7 @@ class pdf_edison extends ModelePDFCommandes $posy+=1; // Show list of linked objects - $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'L', $default_font_size, $hookmanager); + $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'L', $default_font_size, $hookmanager); } /** diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 7db414e044a..322bc572c55 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/core/modules/commande/pdf_einstein.modules.php + * \file htdocs/core/modules/commande/doc/pdf_einstein.modules.php * \ingroup commande * \brief Fichier de la classe permettant de generer les commandes au modele Einstein * \author Laurent Destailleur @@ -34,8 +34,7 @@ require_once(DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'); /** - * \class pdf_einstein - * \brief Classe permettant de generer les commandes au modele Einstein + * Classe permettant de generer les commandes au modele Einstein */ class pdf_einstein extends ModelePDFCommandes { @@ -91,16 +90,16 @@ class pdf_einstein extends ModelePDFCommandes $this->option_condreg = 1; // Affiche conditions reglement $this->option_codeproduitservice = 1; // Affiche code produit-service $this->option_multilang = 1; // Dispo en plusieurs langues - $this->option_escompte = 1; // Affiche si il y a eu escompte - $this->option_credit_note = 1; // Support credit notes + $this->option_escompte = 0; // Affiche si il y a eu escompte + $this->option_credit_note = 0; // Support credit notes $this->option_freetext = 1; // Support add of a personalised text - $this->option_draft_watermark = 1; //Support add of a watermark on drafts + $this->option_draft_watermark = 1; // Support add of a watermark on drafts $this->franchise=!$mysoc->tva_assuj; - // Recupere emmetteur + // Get source company $this->emetteur=$mysoc; - if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // By default, if was not defined + if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default, if was not defined // Defini position des colonnes $this->posxdesc=$this->marge_gauche+1; @@ -118,7 +117,7 @@ class pdf_einstein extends ModelePDFCommandes } /** - * Function to build pdf onto disk + * Build document onto disk * * @param int $object Id of object to generate * @param object $outputlangs Lang output object @@ -235,12 +234,12 @@ class pdf_einstein extends ModelePDFCommandes { $tab_top = 88; - $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->SetFont('','', $default_font_size - 1); // Into loop to manage multipages + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme et 4eme param + // Rect prend une longueur en 3eme param $pdf->SetDrawColor(192,192,192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -261,16 +260,16 @@ class pdf_einstein extends ModelePDFCommandes { $curY = $nexY; - $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page + $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage // Description of product line $curX = $this->posxdesc-1; - pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc,0,$hookmanager); + pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,$hideref,$hidedesc,0,$hookmanager); $pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut $nexY = $pdf->GetY(); - // TVA + // VAT Rate if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails, $hookmanager); @@ -278,7 +277,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R'); } - // Prix unitaire HT avant remise + // Unit price before discount $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager); $pdf->SetXY($this->posxup, $curY); $pdf->MultiCell($this->posxqty-$this->posxup-1, 3, $up_excl_tax, 0, 'R', 0); @@ -288,7 +287,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($this->posxqty, $curY); $pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 3, $qty, 0, 'R'); - // Remise sur ligne + // Discount on line $pdf->SetXY($this->posxdiscount, $curY); if ($object->lines[$i]->remise_percent) { @@ -296,10 +295,10 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $remise_percent, 0, 'R'); } - // Total HT ligne + // Total HT line $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager); $pdf->SetXY($this->postotalht, $curY); - $pdf->MultiCell(26, 3, $total_excl_tax, 0, 'R', 0); + $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0); // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva $tvaligne=$object->lines[$i]->total_tva; @@ -307,6 +306,10 @@ class pdf_einstein extends ModelePDFCommandes $localtax1ligne=$object->lines[$i]->total_localtax1; $localtax2ligne=$object->lines[$i]->total_localtax2; + if ($object->remise_percent) $tvaligne-=($tvaligne*$object->remise_percent)/100; + if ($object->remise_percent) $localtax1ligne-=($localtax1ligne*$object->remise_percent)/100; + if ($object->remise_percent) $localtax2ligne-=($localtax2ligne*$object->remise_percent)/100; + $vatrate=(string) $object->lines[$i]->tva_tx; $localtax1rate=(string) $object->lines[$i]->localtax1_tx; $localtax2rate=(string) $object->lines[$i]->localtax2_tx; @@ -347,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) { @@ -405,7 +408,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->Output($file,'F'); - // Actions on extra fields (by external module or standard code) + // Add pdfgeneration hook if (! is_object($hookmanager)) { include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); @@ -647,7 +650,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); } } - if (! $this->atleastoneratenotnull) // If not vat at all + if (! $this->atleastoneratenotnull) // If no vat at all { $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); @@ -661,7 +664,7 @@ class pdf_einstein extends ModelePDFCommandes { $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT1".$mysoc->pays_code), $useborder, 'L', 1); + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT1".$mysoc->country_code), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1), $useborder, 'R', 1); } @@ -671,7 +674,7 @@ class pdf_einstein extends ModelePDFCommandes { $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT2".$mysoc->pays_code), $useborder, 'L', 1); + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT2".$mysoc->country_code), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1); } @@ -696,7 +699,7 @@ class pdf_einstein extends ModelePDFCommandes $tvakey=str_replace('*','',$tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } - $totalvat =$outputlangs->transnoentities("TotalLT1".$mysoc->pays_code).' '; + $totalvat =$outputlangs->transnoentities("TotalLT1".$mysoc->country_code).' '; $totalvat.=vatrate($tvakey,1).$tvacompl; $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); @@ -709,7 +712,7 @@ class pdf_einstein extends ModelePDFCommandes //Local tax 2 if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') { - foreach( $this->localtax2 as $tvakey => $tvaval ) + foreach( $this->localtax2 as $tvakey => $tvaval ) { if ($tvakey>0) // On affiche pas taux 0 { @@ -724,7 +727,7 @@ class pdf_einstein extends ModelePDFCommandes $tvakey=str_replace('*','',$tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } - $totalvat =$outputlangs->transnoentities("TotalLT2".$mysoc->pays_code).' '; + $totalvat =$outputlangs->transnoentities("TotalLT2".$mysoc->country_code).' '; $totalvat.=vatrate($tvakey,1).$tvacompl; $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); @@ -748,6 +751,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1); } + $pdf->SetFont('','', $default_font_size - 1); $pdf->SetTextColor(0,0,0); if ($deja_regle > 0) @@ -762,7 +766,6 @@ class pdf_einstein extends ModelePDFCommandes $resteapayer = $object->total_ttc - $deja_regle; - $index++; $pdf->SetTextColor(0,0,60); $pdf->SetFillColor(224,224,224); @@ -772,7 +775,6 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), $useborder, 'R', 1); - // Fin $pdf->SetFont('','', $default_font_size - 1); $pdf->SetTextColor(0,0,0); } @@ -889,7 +891,8 @@ class pdf_einstein extends ModelePDFCommandes { if (is_readable($logo)) { - $pdf->Image($logo, $this->marge_gauche, $posy, 0, 22); // width=0 (auto), max height=22 + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -929,7 +932,7 @@ class pdf_einstein extends ModelePDFCommandes $posy+=2; // Show list of linked objects - $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'R', $default_font_size, $hookmanager); + $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size, $hookmanager); if ($showaddress) { diff --git a/htdocs/core/modules/commande/modules_commande.php b/htdocs/core/modules/commande/modules_commande.php index 5baecd279bf..e327b84bab9 100644 --- a/htdocs/core/modules/commande/modules_commande.php +++ b/htdocs/core/modules/commande/modules_commande.php @@ -48,7 +48,7 @@ abstract class ModelePDFCommandes extends CommonDocGenerator * @param string $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db,$maxfilenamelength=0) { global $conf; @@ -73,18 +73,20 @@ abstract class ModeleNumRefCommandes { var $error=''; - /** Return if a module can be used or not + /** + * Return if a module can be used or not * - * @return boolean true if module can be used + * @return boolean true if module can be used */ function isEnabled() { return true; } - /** Renvoie la description par defaut du modele de numerotation + /** + * Renvoie la description par defaut du modele de numerotation * - * @return string Texte descripif + * @return string Texte descripif */ function info() { @@ -93,9 +95,10 @@ abstract class ModeleNumRefCommandes return $langs->trans("NoDescription"); } - /** Renvoie un exemple de numerotation + /** + * Renvoie un exemple de numerotation * - * @return string Example + * @return string Example */ function getExample() { @@ -104,28 +107,33 @@ abstract class ModeleNumRefCommandes return $langs->trans("NoExample"); } - /** Test si les numeros deja en vigueur dans la base ne provoquent pas de conflits qui empecheraient cette numerotation de fonctionner. + /** + * Test si les numeros deja en vigueur dans la base ne provoquent pas de conflits qui empecheraient cette numerotation de fonctionner. * - * @return boolean false si conflit, true si ok + * @return boolean false si conflit, true si ok */ function canBeActivated() { return true; } - /** Renvoie prochaine valeur attribuee + /** + * Renvoie prochaine valeur attribuee * - * @return string Valeur + * @param Societe $objsoc Object thirdparty + * @param Object $object Object we need next value for + * @return string Valeur */ - function getNextValue() + function getNextValue($objsoc,$object) { global $langs; return $langs->trans("NotAvailable"); } - /** Renvoie version du module numerotation + /** + * Renvoie version du module numerotation * - * @return string Valeur + * @return string Valeur */ function getVersion() { diff --git a/htdocs/core/modules/contract/modules_contract.php b/htdocs/core/modules/contract/modules_contract.php index 9b501f4529c..cfb3b2e7271 100755 --- a/htdocs/core/modules/contract/modules_contract.php +++ b/htdocs/core/modules/contract/modules_contract.php @@ -71,7 +71,7 @@ class ModelNumRefContracts /** * Test if existing numbers make problems with numbering * - * @return boolean false if conflit, true if ok + * @return boolean false if conflit, true if ok */ function canBeActivated() { @@ -81,9 +81,11 @@ class ModelNumRefContracts /** * Return next value * - * @return string Value + * @param Societe $objsoc third party object + * @param Object $contract contract object + * @return string Value */ - function getNextValue() + function getNextValue($objsoc, $contract) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index 0b9bdaaa778..afb971642fc 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -71,7 +71,7 @@ class html_cerfafr extends ModeleDon { global $user,$conf,$langs,$mysoc; - $now=gmmktime(); + $now=dol_now(); if (! is_object($outputlangs)) $outputlangs=$langs; diff --git a/htdocs/core/modules/dons/modules_don.php b/htdocs/core/modules/dons/modules_don.php index 079c22afa92..63d9746d471 100644 --- a/htdocs/core/modules/dons/modules_don.php +++ b/htdocs/core/modules/dons/modules_don.php @@ -43,7 +43,7 @@ abstract class ModeleDon extends CommonDocGenerator * @param string $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db,$maxfilenamelength=0) { global $conf; @@ -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; } } diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php index e5c8a7099cb..d22c561d156 100644 --- a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php @@ -382,7 +382,8 @@ Class pdf_expedition_merou extends ModelePdfExpedition { if (is_readable($logo)) { - $pdf->Image($logo,10, 5, 0, 22); // width=0 (auto), max height=22 + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo,10, 5, 0, $height); // width=0 (auto) } else { diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php index b42c27930e5..050e6bd5b83 100644 --- a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php @@ -195,7 +195,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition if (! empty($object->note_public)) { $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); } $nexY = $pdf->GetY(); @@ -343,7 +343,8 @@ Class pdf_expedition_rouget extends ModelePdfExpedition { if (is_readable($logo)) { - $pdf->Image($logo, $this->marge_gauche, $posy, 0, 22); // width=0 (auto), max height=22 + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { diff --git a/htdocs/core/modules/expedition/methode_expedition.modules.php b/htdocs/core/modules/expedition/methode_expedition.modules.php index 19a7ce6296f..1ad8bc4bbba 100644 --- a/htdocs/core/modules/expedition/methode_expedition.modules.php +++ b/htdocs/core/modules/expedition/methode_expedition.modules.php @@ -51,7 +51,7 @@ class ModeleShippingMethod * @param string $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db,$maxfilenamelength=0) { global $conf; diff --git a/htdocs/core/modules/expedition/modules_expedition.php b/htdocs/core/modules/expedition/modules_expedition.php index 9c69070e0c7..b06872d3e0d 100644 --- a/htdocs/core/modules/expedition/modules_expedition.php +++ b/htdocs/core/modules/expedition/modules_expedition.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2011 Philippe Grand + * Copyright (C) 2011-2012 Philippe Grand * * 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 @@ -45,7 +45,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator * @param string $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db,$maxfilenamelength=0) { global $conf; @@ -114,9 +114,11 @@ abstract class ModelNumRefExpedition /** * Return next value * - * @return string Value + * @param Societe $objsoc Third party object + * @param Object $shipment Shipment object + * @return string Value */ - function getNextValue() + function getNextValue($objsoc, $shipment) { global $langs; return $langs->trans("NotAvailable"); @@ -154,13 +156,8 @@ function expedition_pdf_create($db, $object, $modele, $outputlangs) $langs->load("sendings"); - // Increase limit for PDF build - $err=error_reporting(); - error_reporting(0); - @set_time_limit(120); - error_reporting($err); + $error=0; - $dir = "/core/modules/expedition/"; $srctemplatepath=''; // Positionne le modele sur le nom du modele a utiliser @@ -178,28 +175,33 @@ function expedition_pdf_create($db, $object, $modele, $outputlangs) // If selected modele is a filename template (then $modele="modelname:filename") $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } - // Search template file + // Search template files $file=''; $classname=''; $filefound=0; - foreach(array('doc','pdf') as $prefix) + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) { - $file = $prefix."_expedition_".$modele.".modules.php"; + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_expedition_".$modele.".modules.php"; - // On verifie l'emplacement du modele - $file = dol_buildpath($dir.'doc/'.$file); - - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_expedition_'.$modele; - break; - } - } + // On verifie l'emplacement du modele + $file=dol_buildpath($reldir."core/modules/expedition/doc/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_expedition_'.$modele; + break; + } + } + if ($filefound) break; + } // Charge le modele if ($filefound) @@ -213,7 +215,7 @@ function expedition_pdf_create($db, $object, $modele, $outputlangs) // 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($object, $outputlangs) > 0) + if ($obj->write_file($object, $outputlangs, $srctemplatepath) > 0) { $outputlangs->charset_output=$sav_charset_output; @@ -236,4 +238,4 @@ function expedition_pdf_create($db, $object, $modele, $outputlangs) return -1; } } -?> +?> \ No newline at end of file diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 4b22f27c319..5cd9b1f699a 100755 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -235,14 +235,14 @@ class pdf_crabe extends ModelePDFFactures $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; // Rect prend une longueur en 3eme param $pdf->SetDrawColor(192,192,192); -//print $pdf->getStringHeight(200,'SPECIMEN',false,false); -//print "$this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1";exit; + //print $pdf->getStringHeight(200,'SPECIMEN',false,false); + //print "$this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1";exit; $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); $tab_height = $tab_height - $height_note; @@ -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) { @@ -655,25 +655,25 @@ class pdf_crabe extends ModelePDFFactures $account->fetch($conf->global->FACTURE_CHQ_NUMBER); $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetFont('','B', $default_font_size - 2); - $pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$account->proprio).':',0,'L',0); + $pdf->SetFont('','B', $default_font_size - 3); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$account->proprio).':',0,'L',0); $posy=$pdf->GetY()+1; $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetFont('','', $default_font_size - 2); - $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0); + $pdf->SetFont('','', $default_font_size - 3); + $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0); $posy=$pdf->GetY()+2; } if ($conf->global->FACTURE_CHQ_NUMBER == -1) { $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetFont('','B', $default_font_size - 2); - $pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedToShort').' '.$outputlangs->convToOutputCharset($this->emetteur->name).' '.$outputlangs->transnoentities('SendTo').':',0,'L',0); + $pdf->SetFont('','B', $default_font_size - 3); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedToShort').' '.$outputlangs->convToOutputCharset($this->emetteur->name).' '.$outputlangs->transnoentities('SendTo').':',0,'L',0); $posy=$pdf->GetY()+1; $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetFont('','', $default_font_size - 2); - $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0); + $pdf->SetFont('','', $default_font_size - 3); + $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0); $posy=$pdf->GetY()+2; } } @@ -690,7 +690,7 @@ class pdf_crabe extends ModelePDFFactures $curx=$this->marge_gauche; $cury=$posy; - $posy=pdf_bank($pdf,$outputlangs,$curx,$cury,$account); + $posy=pdf_bank($pdf,$outputlangs,$curx,$cury,$account,0,$default_font_size); $posy+=2; } @@ -1032,7 +1032,8 @@ class pdf_crabe extends ModelePDFFactures { if (is_readable($logo)) { - $pdf->Image($logo, $this->marge_gauche, $posy, 0, 22); // width=0 (auto), max height=22 + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -1124,7 +1125,7 @@ class pdf_crabe extends ModelePDFFactures $posy+=2; // Show list of linked objects - $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'R', $default_font_size, $hookmanager); + $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size, $hookmanager); if ($showaddress) { diff --git a/htdocs/core/modules/facture/doc/pdf_oursin.modules.php b/htdocs/core/modules/facture/doc/pdf_oursin.modules.php index 3d17e5b4b49..fb1c41e476d 100755 --- a/htdocs/core/modules/facture/doc/pdf_oursin.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_oursin.modules.php @@ -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; @@ -834,9 +834,8 @@ class pdf_oursin extends ModelePDFFactures { if (is_readable($logo)) { - $taille=getimagesize($logo); - $length=$taille[0]/2.835; - $pdf->Image($logo, $this->marges['g'], $this->marges['h'], 0, 22); // width=0 (auto), max height=22 + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo, $this->marges['g'], $this->marges['h'], 0, $height); // width=0 (auto) } else { @@ -1004,7 +1003,7 @@ class pdf_oursin extends ModelePDFFactures $posy+=1; // Show list of linked objects - $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'L', $default_font_size, $hookmanager); + $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'L', $default_font_size, $hookmanager); // Amount in (at tab_top - 1) $pdf->SetTextColor(0,0,0); diff --git a/htdocs/core/modules/facture/modules_facture.php b/htdocs/core/modules/facture/modules_facture.php index c8b2b8a12e9..973a8461799 100644 --- a/htdocs/core/modules/facture/modules_facture.php +++ b/htdocs/core/modules/facture/modules_facture.php @@ -46,7 +46,7 @@ abstract class ModelePDFFactures extends CommonDocGenerator * @param string $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db,$maxfilenamelength=0) { global $conf; @@ -147,15 +147,15 @@ abstract class ModeleNumRefFactures /** * Create a document onto disk according to template module. * - * @param DoliDB $db Database handler - * @param Object $object Object invoice - * @param string $modele Force template to use ('' to not force) - * @param Translate $outputlangs objet lang a utiliser pour traduction - * @param int $hidedetails Hide details of lines - * @param int $hidedesc Hide description - * @param int $hideref Hide ref - * @param HookManager $hookmanager Hook manager instance - * @return int <0 if KO, >0 if OK + * @param DoliDB $db Database handler + * @param Object $object Object invoice + * @param string $modele Force template to use ('' to not force) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @param HookManager $hookmanager Hook manager instance + * @return int <0 if KO, >0 if OK */ function facture_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false) { diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 272460695c0..a8117d80cfe 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -185,7 +185,7 @@ class pdf_soleil extends ModelePDFFicheinter $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; @@ -444,7 +444,8 @@ class pdf_soleil extends ModelePDFFicheinter { if (is_readable($logo)) { - $pdf->Image($logo, $this->marge_gauche, $posy, 0, 22); // width=0 (auto), max height=22 + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php index f286717caf5..edd5be4401a 100644 --- a/htdocs/core/modules/fichinter/modules_fichinter.php +++ b/htdocs/core/modules/fichinter/modules_fichinter.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2011-2012 Philippe Grand * * 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 @@ -29,8 +30,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/commondocgenerator.class.php"); /** - * \class ModelePDFFicheinter - * \brief Classe mere des modeles de fiche intervention + * Parent class to manage intervention document templates */ abstract class ModelePDFFicheinter extends CommonDocGenerator { @@ -148,16 +148,22 @@ abstract class ModeleNumRefFicheinter * @param Object $object Object fichinter * @param string $modele force le modele a utiliser ('' par defaut) * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @param HookManager $hookmanager Hook manager instance * @return int 0 if KO, 1 if OK */ -function fichinter_create($db, $object, $modele='', $outputlangs='') +function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false) { - global $conf,$langs; + global $conf,$langs,$user; $langs->load("ficheinter"); - $dir = "/core/modules/fichinter/doc/"; + $error=0; - // Positionne modele sur le nom du modele de facture a utiliser + $srctemplatepath=''; + + // Positionne modele sur le nom du modele de fichinter a utiliser if (! dol_strlen($modele)) { if ($conf->global->FICHEINTER_ADDON_PDF) @@ -170,33 +176,70 @@ function fichinter_create($db, $object, $modele='', $outputlangs='') } } - // Charge le modele - $file = "pdf_".$modele.".modules.php"; + // If selected modele is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } - // On verifie l'emplacement du modele - $file = dol_buildpath($dir.$file); - - if (file_exists($file)) + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // On verifie l'emplacement du modele + $file=dol_buildpath($reldir."core/modules/fichinter/doc/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Charge le modele + if ($filefound) { - $classname = "pdf_".$modele; require_once($file); $obj = new $classname($db); - dol_syslog("fichinter_create build PDF", LOG_DEBUG); - // 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($object,$outputlangs) > 0) + if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $hookmanager) > 0) { $outputlangs->charset_output=$sav_charset_output; + + // We delete old preview + require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); + dol_delete_preview($object); + + // Success in building document. We build meta file. + dol_meta_create($object); + + // Appel des triggers + include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + $interface=new Interfaces($db); + $result=$interface->run_triggers('FICHEINTER_BUILDDOC',$object,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Fin appel triggers + return 1; } else { $outputlangs->charset_output=$sav_charset_output; - dol_print_error($db,$obj->error); + dol_print_error($db,"fichinter_pdf_create Error: ".$obj->error); return 0; } } diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 243c8b382ba..30b00d885c8 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -511,7 +511,7 @@ class ImportCsv extends ModeleImports // Now we check cache is not empty (should not) and key is into cache if (! is_array($this->cachefieldtable[$field.'@'.$table]) || ! in_array($newval,$this->cachefieldtable[$field.'@'.$table])) { - $this->errors[$error]['lib']=$langs->trans('ErrorFieldValueNotIn',$key,$newval,$field,$table); + $this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorFieldValueNotIn',$key,$newval,$field,$table); $this->errors[$error]['type']='FOREIGNKEY'; $errorforthistable++; $error++; @@ -520,7 +520,8 @@ class ImportCsv extends ModeleImports // If test is just a static regex else if (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i',$newval)) { - $this->errors[$error]['lib']=$langs->trans('ErrorWrongValueForField',$key,$newval,$objimport->array_import_regex[0][$val]); + //if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."
    "; + $this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField',$key,$newval,$objimport->array_import_regex[0][$val]); $this->errors[$error]['type']='REGEX'; $errorforthistable++; $error++; diff --git a/htdocs/core/modules/livraison/mod_livraison_jade.php b/htdocs/core/modules/livraison/mod_livraison_jade.php index 6e8dad3afc2..b69dd6d61cb 100644 --- a/htdocs/core/modules/livraison/mod_livraison_jade.php +++ b/htdocs/core/modules/livraison/mod_livraison_jade.php @@ -106,7 +106,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc=0,$object='') + function getNextValue($objsoc,$object) { global $db,$conf; diff --git a/htdocs/core/modules/livraison/mod_livraison_saphir.php b/htdocs/core/modules/livraison/mod_livraison_saphir.php index 357f814ceaa..89d9faf5781 100644 --- a/htdocs/core/modules/livraison/mod_livraison_saphir.php +++ b/htdocs/core/modules/livraison/mod_livraison_saphir.php @@ -102,16 +102,16 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder * Return next value * * @param Societe $objsoc Object third party - * @param Object $livraison Object delivery + * @param Object $object Object delivery * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc=0,$livraison='') + function getNextValue($objsoc,$object) { global $db,$conf; require_once(DOL_DOCUMENT_ROOT ."/core/lib/functions2.lib.php"); - // On d�fini critere recherche compteur + // On defini critere recherche compteur $mask=$conf->global->LIVRAISON_SAPHIR_MASK; if (! $mask) diff --git a/htdocs/core/modules/livraison/modules_livraison.php b/htdocs/core/modules/livraison/modules_livraison.php index b0ae1760ef9..c9343e8ae95 100644 --- a/htdocs/core/modules/livraison/modules_livraison.php +++ b/htdocs/core/modules/livraison/modules_livraison.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2006-2011 Regis Houssin + * Copyright (C) 2011-2012 Philippe Grand * * 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 @@ -44,7 +45,7 @@ abstract class ModelePDFDeliveryOrder extends CommonDocGenerator * @param string $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db,$maxfilenamelength=0) { global $conf; @@ -116,9 +117,11 @@ abstract class ModeleNumRefDeliveryOrder /** * Renvoi prochaine valeur attribuee * - * @return string Valeur + * @param Societe $objsoc Object third party + * @param Object $object Object delivery + * @return string Valeur */ - function getNextValue() + function getNextValue($objsoc, $object) { global $langs; return $langs->trans("NotAvailable"); @@ -152,33 +155,62 @@ abstract class ModeleNumRefDeliveryOrder * @param Translate $outputlangs objet lang a utiliser pour traduction * @return int 0 if KO, 1 if OK */ -function delivery_order_pdf_create($db, $object, $model='', $outputlangs='') +function delivery_order_pdf_create($db, $object, $modele, $outputlangs='') { global $conf,$langs; + $langs->load("deliveries"); - $dir = "/core/modules/livraison/pdf/"; + $error=0; + + $srctemplatepath=''; // Positionne modele sur le nom du modele de bon de livraison a utiliser - if (! dol_strlen($model)) + if (! dol_strlen($modele)) { if ($conf->global->LIVRAISON_ADDON_PDF) { - $model = $conf->global->LIVRAISON_ADDON_PDF; + $modele = $conf->global->LIVRAISON_ADDON_PDF; } else { - print $langs->trans("Error")." ".$langs->trans("Error_LIVRAISON_ADDON_PDF_NotDefined"); - return 0; + $modele = 'typhon'; } } - // Charge le modele - $file = "pdf_".$model.".modules.php"; - // On verifie l'emplacement du modele - $file = dol_buildpath($dir.$file); - if (file_exists($file)) + + // If selected modele is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // On verifie l'emplacement du modele + $file=dol_buildpath($reldir."core/modules/livraison/pdf/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Charge le modele + if ($filefound) { - $classname = "pdf_".$model; require_once($file); $obj = new $classname($db); @@ -210,4 +242,4 @@ function delivery_order_pdf_create($db, $object, $model='', $outputlangs='') } } -?> +?> \ No newline at end of file diff --git a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php index e48f7420f77..05da0f4bed4 100644 --- a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php @@ -213,7 +213,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; @@ -510,7 +510,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder { if (is_readable($logo)) { - $pdf->Image($logo, $this->marge_gauche, $posy, 0, 22); // width=0 (auto), max height=22 + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index bc5939676a7..75032bbab9e 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -184,13 +184,24 @@ class MailingTargets // This can't be abstract as it is used for some method dol_syslog(get_class($this)."::add_to_target: mailing ".$j." targets added"); - //Update the status to show poelple that don't want to be contacted anymore' + //Update the status to show thirdparty mail that don't want to be contacted anymore' $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; $sql .= " SET statut=3"; - $sql .= " WHERE fk_mailing=".$mailing_id." and email in (SELECT email FROM ".MAIN_DB_PREFIX."societe where fk_stcomm=-1)"; + $sql .= " WHERE fk_mailing=".$mailing_id." AND email in (SELECT email FROM ".MAIN_DB_PREFIX."societe where fk_stcomm=-1)"; + $sql .= " AND source_type='thirdparty'"; $result=$this->db->query($sql); - dol_syslog("MailingTargets::add_to_target: mailing update status to display people that do not want to be contacted sql:".$sql); + dol_syslog(get_class($this)."::add_to_target: mailing update status to display thirdparty mail that do not want to be contacted sql:".$sql); + + //Update the status to show contact mail that don't want to be contacted anymore' + $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; + $sql .= " SET statut=3"; + $sql .= " WHERE fk_mailing=".$mailing_id." AND email in (SELECT sc.email FROM ".MAIN_DB_PREFIX."socpeople AS sc "; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe s ON s.fk_stcomm=-1 AND s.rowid=sc.fk_soc)"; + $sql .= " AND source_type='contact'"; + $result=$this->db->query($sql); + + dol_syslog(get_class($this)."::add_to_target: mailing update status to display contact mail that do not want to be contacted sql:".$sql); $this->update_nb($mailing_id); diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index d163486a41f..2e7a874c914 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * @@ -30,8 +30,7 @@ include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php"); /** - * \class modAdherent - * \brief Classe de description et activation du module Adherent + * Classe de description et activation du module Adherent */ class modAdherent extends DolibarrModules { diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index eb6252af580..60a4cf0f860 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -33,8 +33,7 @@ include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php"); /** - * \class modCommande - * \brief Classe de description et activation du module Commande + * Classe de description et activation du module Commande */ class modCommande extends DolibarrModules { @@ -178,7 +177,7 @@ class modCommande extends DolibarrModules $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"order",'c.ref'=>"order",'c.ref_client'=>"order",'c.fk_soc'=>"order",'c.date_creation'=>"order",'c.date_commande'=>"order",'c.amount_ht'=>"order",'c.remise_percent'=>"order",'c.total_ht'=>"order",'c.total_ttc'=>"order",'c.facture'=>"order",'c.fk_statut'=>"order",'c.note'=>"order",'c.date_livraison'=>"order",'cd.rowid'=>'order_line','cd.description'=>"order_line",'cd.product_type'=>'order_line','cd.tva_tx'=>"order_line",'cd.qty'=>"order_line",'cd.total_ht'=>"order_line",'cd.total_tva'=>"order_line",'cd.total_ttc'=>"order_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'commande as c, '.MAIN_DB_PREFIX.'commandedet as cd, '.MAIN_DB_PREFIX.'societe as s)'; + $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'commande as c, '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'commandedet as cd)'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (cd.fk_product = p.rowid)'; $this->export_sql_end[$r] .=' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_commande'; $this->export_sql_end[$r] .=' AND c.entity = '.$conf->entity; diff --git a/htdocs/core/modules/modDeplacement.class.php b/htdocs/core/modules/modDeplacement.class.php index 1e73b54a1ea..652f02f8b7d 100644 --- a/htdocs/core/modules/modDeplacement.class.php +++ b/htdocs/core/modules/modDeplacement.class.php @@ -121,8 +121,8 @@ class modDeplacement extends DolibarrModules $this->export_code[$r]='trips_'.$r; $this->export_label[$r]='ListTripsAndExpenses'; $this->export_permission[$r]=array(array("deplacement","export")); - $this->export_fields_array[$r]=array('d.rowid'=>"TripId",'d.type'=>"Type",'d.km'=>"FeesKilometersOrAmout",'d.note'=>'NotePrivate','d.note_public'=>'NotePublic','s.nom'=>'ThirdParty','u.name'=>'Lastname','u.firstname'=>'Firstname','d.dated'=>"Date"); - $this->export_entities_array[$r]=array('d.rowid'=>"Trip",'d.type'=>"Trip",'d.km'=>"Trip",'d.note'=>'Trip','d.note_public'=>'Trip','s.nom'=>'company','u.name'=>'user','u.firstname'=>'user','d.dated'=>"Date"); + $this->export_fields_array[$r]=array('u.login'=>'Login','u.name'=>'Lastname','u.firstname'=>'Firstname','d.rowid'=>"TripId",'d.type'=>"Type",'d.km'=>"FeesKilometersOrAmout",'d.dated'=>"Date",'d.note'=>'NotePrivate','d.note_public'=>'NotePublic','s.nom'=>'ThirdParty'); + $this->export_entities_array[$r]=array('u.login'=>'user','u.name'=>'user','u.firstname'=>'user','d.rowid'=>"trip",'d.type'=>"trip",'d.km'=>"trip",'d.dated'=>"trip",'d.note'=>'trip','d.note_public'=>'trip','s.nom'=>'company'); $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'user as u'; diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 574cbfd47d9..7990893036a 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -30,8 +30,7 @@ include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php"); /** - * \class modFacture - * \brief Classe de description et activation du module Facture + * Classe de description et activation du module Facture */ class modFacture extends DolibarrModules { @@ -175,11 +174,14 @@ class modFacture extends DolibarrModules $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("facture","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd)'; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as c on s.fk_pays = c.rowid,'; + $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'facture as f,'; + $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'facturedet as fd'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture'; $this->export_sql_end[$r] .=' AND f.entity = '.$conf->entity; @@ -189,11 +191,13 @@ class modFacture extends DolibarrModules $this->export_label[$r]='CustomersInvoicesAndPayments'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("facture","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'facture as f)'; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as c on s.fk_pays = c.rowid,'; + $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'facture as f'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.fk_facture = f.rowid'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiement as p ON pf.fk_paiement = p.rowid'; $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid'; diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index 3bfd85974a6..7a7d7fe2323 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -28,8 +28,7 @@ include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php"); /** - * \class modFournisseur - * \brief Classe de description et activation du module Fournisseur + * Classe de description et activation du module Fournisseur */ class modFournisseur extends DolibarrModules { @@ -222,6 +221,13 @@ class modFournisseur extends DolibarrModules $this->rights[$r][4] = 'facture'; $this->rights[$r][5] = 'export'; + $r++; + $this->rights[$r][0] = 1237; + $this->rights[$r][1] = 'Exporter les commande fournisseurs, attributs'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'commande'; + $this->rights[$r][5] = 'export'; // Exports //-------- @@ -232,11 +238,13 @@ class modFournisseur extends DolibarrModules $this->export_label[$r]='Factures fournisseurs et lignes de facture'; $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("fournisseur","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'facture_fourn as f, '.MAIN_DB_PREFIX.'facture_fourn_det as fd)'; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as c ON s.fk_pays = c.rowid,'; + $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'facture_fourn as f, '.MAIN_DB_PREFIX.'facture_fourn_det as fd'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture_fourn'; $this->export_sql_end[$r] .=' AND f.entity = '.$conf->entity; @@ -246,15 +254,34 @@ class modFournisseur extends DolibarrModules $this->export_label[$r]='Factures fournisseurs et reglements'; $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("fournisseur","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'facture_fourn as f)'; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as c ON s.fk_pays = c.rowid,'; + $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'facture_fourn as f'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn as p ON pf.fk_paiementfourn = p.rowid'; $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid'; $this->export_sql_end[$r] .=' AND f.entity = '.$conf->entity; + + $r++; + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='Commandes fournisseurs et lignes de commandes'; + $this->export_icon[$r]='order'; + $this->export_permission[$r]=array(array("fournisseur","commande","export")); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"OrderId",'f.ref'=>"Ref",'f.ref_supplier'=>"RefSupplier",'f.date_creation'=>"DateCreation",'f.date_commande'=>"OrderDate",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.fk_statut'=>'Status','f.note'=>"Note",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.total_tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"order",'f.ref'=>"order",'f.ref_supplier'=>"order",'f.date_creation'=>"order",'f.date_commande'=>"order",'f.total_ht'=>"order",'f.total_ttc'=>"order",'f.tva'=>"order",'f.fk_statut'=>'order','f.note'=>"order",'fd.rowid'=>'order_line','fd.description'=>"order_line",'fd.tva_tx'=>"order_line",'fd.qty'=>"order_line",'fd.total_ht'=>"order_line",'fd.total_ttc'=>"order_line",'fd.total_tva'=>"order_line",'fd.product_type'=>'order_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); + + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as c ON s.fk_pays = c.rowid,'; + $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'commande_fournisseur as f, '.MAIN_DB_PREFIX.'commande_fournisseurdet as fd'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; + $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_commande'; + $this->export_sql_end[$r] .=' AND f.entity = '.$conf->entity; + } diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index a0bb8cf2c9d..9e09914d601 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -34,8 +34,7 @@ include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php"); /** - * \class modProduct - * \brief Classe de description et activation du module Produit + * Class descriptor of Product module */ class modProduct extends DolibarrModules { @@ -171,7 +170,7 @@ class modProduct extends DolibarrModules $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('p'=>MAIN_DB_PREFIX.'product','extra'=>MAIN_DB_PREFIX.'product_extrafields'); $this->import_tables_creator_array[$r]=array('p'=>'fk_user_author'); // Fields to store import user id - $this->import_fields_array[$r]=array('p.ref'=>"Ref*",'p.label'=>"Label*",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"SellingPriceHT",'p.price_ttc'=>"SellingPriceTTC",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell*",'p.tobuy'=>"OnBuy*",'p.fk_product_type'=>"Type*",'p.finished'=>'Nature','p.duration'=>"Duration",'p.weight'=>"Weight",'p.volume'=>"Volume",'p.datec'=>'DateCreation*'); + $this->import_fields_array[$r]=array('p.ref'=>"Ref*",'p.label'=>"Label*",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.duration'=>"Duration",'p.customcode'=>'CustomCode','p.price'=>"SellingPriceHT",'p.price_ttc'=>"SellingPriceTTC",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell*",'p.tobuy'=>"OnBuy*",'p.fk_product_type'=>"Type*",'p.finished'=>'Nature','p.datec'=>'DateCreation*'); // Add extra fields $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product'"; $resql=$this->db->query($sql); diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index 875f9e5223f..a7efa4410ab 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -169,11 +169,13 @@ class modPropale extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='ProposalsAndProposalsLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("propale","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefClient",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'Label'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"propal",'c.ref'=>"propal",'c.ref_client'=>"propal",'c.fk_soc'=>"propal",'c.datec'=>"propal",'c.datep'=>"propal",'c.fin_validite'=>"propal",'c.remise_percent'=>"propal",'c.total_ht'=>"propal",'c.total'=>"propal",'c.fk_statut'=>"propal",'c.note'=>"propal",'c.date_livraison'=>"propal",'cd.rowid'=>'propal_line','cd.description'=>"propal_line",'cd.product_type'=>'propal_line','cd.tva_tx'=>"propal_line",'cd.qty'=>"propal_line",'cd.total_ht'=>"propal_line",'cd.total_tva'=>"propal_line",'cd.total_ttc'=>"propal_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','cp.code'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefClient",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'Label'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','cp.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"propal",'c.ref'=>"propal",'c.ref_client'=>"propal",'c.fk_soc'=>"propal",'c.datec'=>"propal",'c.datep'=>"propal",'c.fin_validite'=>"propal",'c.remise_percent'=>"propal",'c.total_ht'=>"propal",'c.total'=>"propal",'c.fk_statut'=>"propal",'c.note'=>"propal",'c.date_livraison'=>"propal",'cd.rowid'=>'propal_line','cd.description'=>"propal_line",'cd.product_type'=>'propal_line','cd.tva_tx'=>"propal_line",'cd.qty'=>"propal_line",'cd.total_ht'=>"propal_line",'cd.total_tva'=>"propal_line",'cd.total_ttc'=>"propal_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'propal as c, '.MAIN_DB_PREFIX.'propaldet as cd)'; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s '; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as cp ON s.fk_pays = cp.rowid,'; + $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'propal as c, '.MAIN_DB_PREFIX.'propaldet as cd'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (cd.fk_product = p.rowid)'; $this->export_sql_end[$r] .=' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_propal'; $this->export_sql_end[$r] .=' AND c.entity = '.$conf->entity; diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index 9a642b620cf..4f51b13e116 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -31,8 +31,8 @@ include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php"); -/** \class modService - * \brief Classe de description et activation du module Service +/** + * Classe de description et activation du module Service */ class modService extends DolibarrModules { @@ -157,7 +157,7 @@ class modService extends DolibarrModules $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('p'=>MAIN_DB_PREFIX.'product','extra'=>MAIN_DB_PREFIX.'product_extrafields'); $this->import_tables_creator_array[$r]=array('p'=>'fk_user_author'); // Fields to store import user id - $this->import_fields_array[$r]=array('p.ref'=>"Ref*",'p.label'=>"Label*",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"SellingPriceHT",'p.price_ttc'=>"SellingPriceTTC",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell*",'p.tobuy'=>"OnBuy*",'p.fk_product_type'=>"Type*",'p.finished'=>'Nature','p.duration'=>"Duration",'p.weight'=>"Weight",'p.volume'=>"Volume",'p.datec'=>'DateCreation*'); + $this->import_fields_array[$r]=array('p.ref'=>"Ref*",'p.label'=>"Label*",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.duration'=>"Duration",'p.customcode'=>'CustomCode','p.price'=>"SellingPriceHT",'p.price_ttc'=>"SellingPriceTTC",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell*",'p.tobuy'=>"OnBuy*",'p.fk_product_type'=>"Type*",'p.finished'=>'Nature','p.datec'=>'DateCreation*'); // Add extra fields $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product'"; $resql=$this->db->query($sql); diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index a1471ed6f70..77be89de795 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 @@ -296,7 +296,7 @@ class modSociete extends DolibarrModules ); //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); $this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.fk_typent'=>'id@'.MAIN_DB_PREFIX.'c_typent','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - $this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(mktime(),'%Y-%m-%d'),'s.code_client'=>"CU01-0001 or auto",'s.code_fournisseur'=>"SU01-0001 or auto",'s.address'=>"61 jump street",'s.cp'=>"123456",'s.ville'=>"Big town",'s.fk_pays'=>'US, FR, DE...','s.tel'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note'=>"This is an example of note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'0','s.default_lang'=>'en_US','s.barcode'=>'123456789'); + $this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(dol_now(),'%Y-%m-%d'),'s.code_client'=>"CU01-0001 or auto",'s.code_fournisseur'=>"SU01-0001 or auto",'s.address'=>"61 jump street",'s.cp'=>"123456",'s.ville'=>"Big town",'s.fk_pays'=>'US, FR, DE...','s.tel'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note'=>"This is an example of note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'0','s.default_lang'=>'en_US','s.barcode'=>'123456789'); // Import list of contact and attributes $r++; @@ -306,7 +306,7 @@ class modSociete extends DolibarrModules $this->import_entities_array[$r]=array('s.fk_soc'=>'company'); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'socpeople'); // List of tables to insert into (insert done in same order) $this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName*','s.civilite'=>'Civility','s.name'=>"Name*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note'=>"Note",'s.datec'=>"DateCreation"); - $this->import_fieldshidden_array[$r]=array('s.fk_user_creat'=>'user->id'); + $this->import_fieldshidden_array[$r]=array('s.fk_user_creat'=>'user->id'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_convertvalue_array[$r]=array( 's.fk_soc'=>array('rule'=>'fetchidfromref','file'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty'), 's.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/cpays.class.php','class'=>'Cpays','method'=>'fetch','dict'=>'DictionnaryCountry'), @@ -327,7 +327,7 @@ class modSociete extends DolibarrModules */ function init($options='') { - global $conf; + global $conf, $langs; // We disable this to prevent pb of modules not correctly disabled //$this->remove($options); diff --git a/htdocs/core/modules/modWorkflow.class.php b/htdocs/core/modules/modWorkflow.class.php index f2cff187233..e1b1d128e2d 100644 --- a/htdocs/core/modules/modWorkflow.class.php +++ b/htdocs/core/modules/modWorkflow.class.php @@ -69,7 +69,7 @@ class modWorkflow extends DolibarrModules $this->dirs = array("/workflow/temp"); // Config pages. Put here list of php page names stored in admmin directory used to setup module. - $this->config_page_url = 'workflow.php'; + $this->config_page_url = array('workflow.php'); // Dependencies $this->depends = array(); // List of modules id that must be enabled if this module is enabled diff --git a/htdocs/core/modules/project/mod_project_simple.php b/htdocs/core/modules/project/mod_project_simple.php index 3f0cc82c91b..345ac2ef6e3 100644 --- a/htdocs/core/modules/project/mod_project_simple.php +++ b/htdocs/core/modules/project/mod_project_simple.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010 Laurent Destailleur +/* Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2010 Laurent Destailleur * * 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 @@ -102,7 +102,7 @@ class mod_project_simple extends ModeleNumRefProjects * @param Project $project Object project * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc=0,$project='') + function getNextValue($objsoc,$project) { global $db,$conf; diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index 72d235cb3e1..fa7c78978da 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -104,7 +104,7 @@ class mod_project_universal extends ModeleNumRefProjects * @param Project $project Object project * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc=0,$project='') + function getNextValue($objsoc,$project) { global $db,$conf; diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php index 59a44ae3907..ce03f694eb8 100644 --- a/htdocs/core/modules/project/modules_project.php +++ b/htdocs/core/modules/project/modules_project.php @@ -40,7 +40,7 @@ abstract class ModelePDFProjects extends CommonDocGenerator * @param string $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db,$maxfilenamelength=0) { global $conf; @@ -110,10 +110,12 @@ abstract class ModeleNumRefProjects /** * Renvoi prochaine valeur attribuee - * - * @return string Valeur + * + * @param Societe $objsoc Object third party + * @param Project $project Object project + * @return string Valeur */ - function getNextValue() + function getNextValue($objsoc, $project) { global $langs; return $langs->trans("NotAvailable"); @@ -138,70 +140,112 @@ abstract class ModeleNumRefProjects /** - * Create object on disk + * Create an intervention document on disk using template defined into PROJECT_ADDON_PDF * - * @param DoliDB $db objet base de donnee - * @param Object $object object project - * @param string $model force le modele a utiliser ('' to not force) - * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param DoliDB $db objet base de donnee + * @param Object $object Object fichinter + * @param string $modele force le modele a utiliser ('' par defaut) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @param HookManager $hookmanager Hook manager instance * @return int 0 if KO, 1 if OK */ -function project_pdf_create($db, $object, $model,$outputlangs) +function project_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false) { global $conf,$langs; $langs->load("projects"); - $dir = DOL_DOCUMENT_ROOT."/core/modules/project/pdf/"; + $error=0; + + $srctemplatepath=''; // Positionne modele sur le nom du modele de projet a utiliser - if (! dol_strlen($model)) + if (! dol_strlen($modele)) { if (! empty($conf->global->PROJECT_ADDON_PDF)) { - $model = $conf->global->PROJECT_ADDON_PDF; + $modele = $conf->global->PROJECT_ADDON_PDF; } else { - $model='baleine'; - //print $langs->trans("Error")." ".$langs->trans("Error_PROJECT_ADDON_PDF_NotDefined"); - //return 0; + $modele='baleine'; } } - // Charge le modele - $file = "pdf_".$model.".modules.php"; - if (file_exists($dir.$file)) + // If selected modele is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) { - $classname = "pdf_".$model; - require_once($dir.$file); + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // On verifie l'emplacement du modele + $file=dol_buildpath($reldir."core/modules/project/pdf/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Charge le modele + if ($filefound) + { + require_once($file); $obj = 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($object,$outputlangs) > 0) + if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $hookmanager) > 0) { $outputlangs->charset_output=$sav_charset_output; // we delete preview files require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); dol_delete_preview($object); + + // Success in building document. We build meta file. + dol_meta_create($object); + + // Appel des triggers + /*include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + $interface=new Interfaces($db); + $result=$interface->run_triggers('PROJECT_BUILDDOC',$object,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; }*/ + // Fin appel triggers + return 1; } else { $outputlangs->charset_output=$sav_charset_output; - dol_syslog("Erreur dans project_pdf_create"); - dol_print_error($db,$obj->error); + dol_print_error($db,"project_pdf_create Error: ".$obj->error); return 0; } } else { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$dir.$file); + print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); return 0; } } -?> +?> \ No newline at end of file diff --git a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php index 2b5d4477c0b..b34d3b9a6fc 100644 --- a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php @@ -173,7 +173,7 @@ class pdf_baleine extends ModelePDFProjects if (! empty($object->note_public)) { $pdf->SetFont('','', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxref-1, $tab_top-2, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxref-1, $tab_top-2, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-($tab_top-2); @@ -351,7 +351,8 @@ class pdf_baleine extends ModelePDFProjects { if (is_readable($logo)) { - $pdf->Image($logo, $this->marge_gauche, $posy, 0, 22); // width=0 (auto), max height=22 + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 2270319ce3f..e00615047fd 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/core/modules/propale/doc_generic_proposal_odt.modules.php + * \file htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php * \ingroup societe * \brief File of class to build ODT documents for third parties */ diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 5aa3c76baea..6736747258e 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/core/modules/propale/pdf_azur.modules.php + * \file htdocs/core/modules/propale/doc/pdf_azur.modules.php * \ingroup propale * \brief Fichier de la classe permettant de generer les propales au modele Azur * \author Laurent Destailleur @@ -222,7 +222,7 @@ class pdf_azur extends ModelePDFPropales $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; @@ -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) { @@ -923,7 +923,8 @@ class pdf_azur extends ModelePDFPropales { if (is_readable($logo)) { - $pdf->Image($logo, $this->marge_gauche, $posy, 0, 22); // width=0 (auto), max height=22 + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -984,7 +985,7 @@ class pdf_azur extends ModelePDFPropales $posy+=2; // Show list of linked objects - $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'R', $default_font_size, $hookmanager); + $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size, $hookmanager); if ($showaddress) { diff --git a/htdocs/core/modules/propale/doc/pdf_jaune.modules.php b/htdocs/core/modules/propale/doc/pdf_jaune.modules.php index 5755ab38f17..400da56bb75 100644 --- a/htdocs/core/modules/propale/doc/pdf_jaune.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_jaune.modules.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/core/modules/propale/pdf_jaune.modules.php + * \file htdocs/core/modules/propale/doc/pdf_jaune.modules.php * \ingroup propale * \brief Fichier de la classe permettant de generer les propales au modele Jaune * \author Laurent Destailleur @@ -222,7 +222,7 @@ class pdf_jaune extends ModelePDFPropales $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; @@ -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) { @@ -908,7 +908,8 @@ class pdf_jaune extends ModelePDFPropales { if (is_readable($logo)) { - $pdf->Image($logo, $this->marge_gauche, $posy, 0, 22); // width=0 (auto), max height=22 + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { diff --git a/htdocs/core/modules/propale/mod_propale_marbre.php b/htdocs/core/modules/propale/mod_propale_marbre.php index e30770cf9ce..31289342198 100644 --- a/htdocs/core/modules/propale/mod_propale_marbre.php +++ b/htdocs/core/modules/propale/mod_propale_marbre.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/core/modules/propale/modules_propale.php b/htdocs/core/modules/propale/modules_propale.php index 5957640c76c..dd67007f789 100644 --- a/htdocs/core/modules/propale/modules_propale.php +++ b/htdocs/core/modules/propale/modules_propale.php @@ -45,7 +45,7 @@ abstract class ModelePDFPropales extends CommonDocGenerator * @param string $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db,$maxfilenamelength=0) { global $conf; @@ -115,9 +115,11 @@ abstract class ModeleNumRefPropales /** * Renvoi prochaine valeur attribuee * - * @return string Valeur + * @param Societe $objsoc Object third party + * @param Propal $propal Object commercial proposal + * @return string Valeur */ - function getNextValue() + function getNextValue($objsoc,$propal) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index 164ff25c917..ddf4385424a 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -179,7 +179,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc $outputlangs->load("companies"); $outputlangs->load("projects"); - if ($conf->societe->dir_output) + if ($conf->societe->multidir_output[$object->entity]) { // If $object is id instead of object if (! is_object($object)) @@ -194,7 +194,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc } } - $dir = $conf->societe->dir_output; + $dir = $conf->societe->multidir_output[$object->entity]; $objectref = dol_sanitizeFileName($object->id); if (! preg_match('/specimen/i',$objectref)) $dir.= "/" . $objectref; @@ -220,14 +220,14 @@ class doc_generic_odt extends ModeleThirdPartyDoc //print "file=".$file; //print "conf->societe->dir_temp=".$conf->societe->dir_temp; - dol_mkdir($conf->societe->dir_temp); + dol_mkdir($conf->societe->multidir_temp[$object->entity]); // Open and load template require_once(ODTPHP_PATH.'odf.php'); $odfHandler = new odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->societe->dir_temp, + 'PATH_TO_TMP' => $conf->societe->multidir_temp[$object->entity], 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'DELIMITER_LEFT' => '{', 'DELIMITER_RIGHT' => '}' diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index 8c0024e4632..9c5033158b9 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -135,10 +135,9 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode return -1; } - //$date=time(); - $date=gmmktime(); - $yymm = strftime("%y%m",$date); - $num = sprintf("%04s",$max+1); + $date = dol_now(); + $yymm = strftime("%y%m",$date); + $num = sprintf("%04s",$max+1); dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num); return $prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/societe/modules_societe.class.php b/htdocs/core/modules/societe/modules_societe.class.php index 83f21e98320..582368b6695 100644 --- a/htdocs/core/modules/societe/modules_societe.class.php +++ b/htdocs/core/modules/societe/modules_societe.class.php @@ -42,7 +42,7 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator * @param string $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db,$maxfilenamelength=0) { global $conf; @@ -144,7 +144,7 @@ abstract class ModeleThirdPartyCode * @param string $maxfilenamelength Max length of value to show * @return array List of numbers */ - function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db,$maxfilenamelength=0) { $liste=array(); $sql =""; diff --git a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php index 64f2f7dbe31..c26c50ba386 100755 --- a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php +++ b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php @@ -19,15 +19,14 @@ /** * \file htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php - * \ingroup facture fourniseur + * \ingroup facture fournisseur * \brief File that contain parent class for supplier invoices models */ require_once(DOL_DOCUMENT_ROOT."/core/class/commondocgenerator.class.php"); /** - * \class ModelePDFSuppliersInvoices - * \brief Parent class for supplier invoices models + * Parent class for supplier invoices models */ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator { @@ -41,7 +40,7 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator * @param string $maxfilenamelength Max length of value to show * @return array List of numbers */ - function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db,$maxfilenamelength=0) { global $conf; @@ -57,15 +56,18 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator } /** - * Create object on disk. + * Create a document onto disk according to template module. * - * @param DoliDB $db objet base de donnee - * @param Object $object object supplier invoice + * @param DoliDB $db Database handler + * @param Object $object Object supplier invoice * @param string $modele Force template to use ('' to not force) - * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param Translate $outputlangs Object lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ -function supplier_invoice_pdf_create($db, $object, $modele, $outputlangs) +function supplier_invoice_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) { global $conf, $user, $langs; @@ -81,7 +83,7 @@ function supplier_invoice_pdf_create($db, $object, $modele, $outputlangs) $srctemplatepath=''; - // Positionne modele sur le nom du modele de invoice fournisseur a utiliser + // Positionne le modele sur le nom du modele a utiliser if (! dol_strlen($modele)) { if (! empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)) @@ -102,7 +104,7 @@ function supplier_invoice_pdf_create($db, $object, $modele, $outputlangs) $srctemplatepath=$tmp[1]; } - // Search template file + // Search template files $file=''; $classname=''; $filefound=0; $dirmodels=array('/'); if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); @@ -134,7 +136,7 @@ function supplier_invoice_pdf_create($db, $object, $modele, $outputlangs) // 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($object,$outputlangs) > 0) + if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc) > 0) { $outputlangs->charset_output=$sav_charset_output; @@ -145,7 +147,7 @@ function supplier_invoice_pdf_create($db, $object, $modele, $outputlangs) // Appel des triggers include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); $interface=new Interfaces($db); - $result=$interface->run_triggers('BILL_BUILDDOC',$object,$user,$langs,$conf); + $result=$interface->run_triggers('SUPPLIER_INVOICE_BUILDDOC',$object,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index 8d32bc126f0..3fc64061d0b 100755 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010 Laurent Destailleur + * Copyright (C) 2010-2012 Laurent Destailleur * * 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,8 +31,7 @@ require_once(DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'); /** - * \class pdf_canelle - * \brief Class to generate the supplier invoices with the canelle model + * Class to generate the supplier invoices with the canelle model */ class pdf_canelle extends ModelePDFSuppliersInvoices { @@ -59,7 +58,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices * Constructor * * @param DoliDB $db Database handler - * @param Societe $object Third party providing invoice + * @param Societe $object Supplier invoice */ function __construct($db,$object) { @@ -114,11 +113,11 @@ class pdf_canelle extends ModelePDFSuppliersInvoices /** - * Write the invoice as a document onto disk + * Build document onto disk * - * @param Object $object Object invoice to build (or id if old method) - * @param Translate $outputlangs Lang object for output language - * @return int 1=OK, 0=KO + * @param Object $object Object invoice to build (or id if old method) + * @param Translate $outputlangs Lang object for output language + * @return int 1=OK, 0=KO */ function write_file($object,$outputlangs='') { @@ -229,7 +228,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; @@ -399,7 +398,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->Output($file,'F'); // Actions on extra fields (by external module or standard code) - if (! is_object($hookmanager)) + if (!is_object($hookmanager)) { include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); $hookmanager=new HookManager($this->db); @@ -741,7 +740,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $y+=3; $row = $this->db->fetch_object($resql); - $pdf->SetXY($tab3_posx, $tab3_top+$y ); + $pdf->SetXY($tab3_posx, $tab3_top+$y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date),'day',false,$outputlangs,true), 0, 'L', 0); $pdf->SetXY($tab3_posx+21, $tab3_top+$y); $pdf->MultiCell(20, 3, price($row->amount), 0, 'L', 0); @@ -804,7 +803,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices { if (is_readable($logo)) { - $pdf->Image($logo, $this->marge_gauche, $posy, 0, 22); // width=0 (auto), max height=22 + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -873,7 +873,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L'); // Show sender information - $pdf->SetXY($posx+2,$posy+8); + $pdf->SetXY($posx+2,$posy+4+(dol_nboflines_bis($this->emetteur->name,44)*4)); $pdf->SetFont('','', $default_font_size - 1); $pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L'); @@ -881,7 +881,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // If BILLING contact defined on invoice, we use it $usecontact=false; - $arrayidcontact=$object->getIdContact('external','BILLING'); + $arrayidcontact=$object->getIdContact('internal','BILLING'); if (count($arrayidcontact) > 0) { $usecontact=true; @@ -893,15 +893,15 @@ class pdf_canelle extends ModelePDFSuppliersInvoices { // On peut utiliser le nom de la societe du contact if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname; - else $socname = $object->client->nom; + else $socname = $mysoc->nom; $carac_client_name=$outputlangs->convToOutputCharset($socname); } else { - $carac_client_name=$outputlangs->convToOutputCharset($object->client->nom); + $carac_client_name=$outputlangs->convToOutputCharset($mysoc->nom); } - $carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,$object->contact,$usecontact,'target'); + $carac_client=pdf_build_address($outputlangs,$this->emetteur,$mysoc,$object->contact,$usecontact,'target'); // Show recipient $posy=42; diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php index 537bd1b31c4..f80ad89142d 100644 --- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php @@ -23,7 +23,7 @@ /** * \file htdocs/core/modules/supplier_order/modules_commandefournisseur.php - * \ingroup commande + * \ingroup commande fournisseur * \brief File that contain parent class for supplier orders models * and parent class for supplier orders numbering models */ @@ -32,8 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/compta/bank/class/account.class.php"); // requi /** - * \class ModelePDFSuppliersOrders - * \brief Parent class for supplier orders models + * Parent class for supplier orders models */ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator { @@ -47,7 +46,7 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator * @param string $maxfilenamelength Max length of value to show * @return array List of numbers */ - function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db,$maxfilenamelength=0) { global $conf; @@ -65,8 +64,7 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator /** - * \class ModeleNumRefSuppliersOrders - * \brief Classe mere des modeles de numerotation des references de commandes fournisseurs + * Classe mere des modeles de numerotation des references de commandes fournisseurs */ abstract class ModeleNumRefSuppliersOrders { @@ -140,20 +138,20 @@ abstract class ModeleNumRefSuppliersOrders /** - * Create a document onto disk accordign to template module. + * Create a document onto disk according to template module. * - * @param DoliDB $db data base object - * @param Object $object object order - * @param string $model force le modele a utiliser ('' to not force) - * @param Translate $outputlangs Objet lang a utiliser pour traduction + * @param DoliDB $db Database handler + * @param Object $object Object supplier order + * @param string $modele Force template to use ('' to not force) + * @param Translate $outputlangs Object lang a utiliser pour traduction * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ -function supplier_order_pdf_create($db, $object, $model, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function supplier_order_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) { - global $conf,$langs; + global $conf, $user, $langs; $langs->load("suppliers"); $error=0; @@ -214,7 +212,7 @@ function supplier_order_pdf_create($db, $object, $model, $outputlangs, $hidedeta { require_once($file); - $obj = new $classname($db); + $obj = new $classname($db,$object); // We save charset_output to restore it because write_file can change it if needed for // output format that does not support UTF8. @@ -226,6 +224,14 @@ function supplier_order_pdf_create($db, $object, $model, $outputlangs, $hidedeta // we delete preview files require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); dol_delete_preview($object); + + // Appel des triggers + include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + $interface=new Interfaces($db); + $result=$interface->run_triggers('SUPPLIER_ORDER_BUILDDOC',$object,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Fin appel triggers + return 1; } else diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 8eba413a4d7..a4af1ae661f 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -34,8 +34,7 @@ require_once(DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'); /** - * \class pdf_muscadet - * \brief Classe permettant de generer les commandes fournisseurs au modele Muscadet + * Class to generate the supplier orders with the muscadet model */ class pdf_muscadet extends ModelePDFSuppliersOrders { @@ -61,9 +60,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders /** * Constructor * - * @param DoliDB $db Database handler + * @param DoliDB $db Database handler + * @param Object $object Supplier order */ - function __construct($db) + function __construct($db,$object) { global $conf,$langs,$mysoc; @@ -91,12 +91,19 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->option_condreg = 1; // Affiche conditions reglement $this->option_codeproduitservice = 1; // Affiche code produit-service $this->option_multilang = 1; // Dispo en plusieurs langues + $this->option_escompte = 0; // Affiche si il y a eu escompte + $this->option_credit_note = 0; // Support credit notes + $this->option_freetext = 1; // Support add of a personalised text + $this->option_draft_watermark = 1; // Support add of a watermark on drafts $this->franchise=!$mysoc->tva_assuj; - // Get source company + // Get source company + //if (! is_object($object->thirdparty)) $object->fetch_thirdparty(); + //$this->emetteur=$object->thirdparty; + //if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default, if was not defined $this->emetteur=$mysoc; - if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default, if was not defined + if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default, if was not defined // Defini position des colonnes $this->posxdesc=$this->marge_gauche+1; @@ -115,13 +122,18 @@ class pdf_muscadet extends ModelePDFSuppliersOrders /** - * Write the order as a document onto disk + * Build document onto disk * * @param int $object Id of object to generate * @param object $outputlangs Lang output object + * @param string $srctemplatepath Full path of source filename for generator using a template file + * @param int $hidedetails Do not show line details + * @param int $hidedesc Do not show desc + * @param int $hideref Do not show ref + * @param object $hookmanager Hookmanager object * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs='') + function write_file($object,$outputlangs='',$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0,$hookmanager=false) { global $user,$langs,$conf; @@ -165,7 +177,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders { if (dol_mkdir($dir) < 0) { - $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); + $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); return 0; } @@ -217,7 +229,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->AddPage(); if (! empty($tplidx)) $pdf->useTemplate($tplidx); $pagenb++; - $this->_pagehead($pdf, $object, 1, $outputlangs); + $this->_pagehead($pdf, $object, 1, $outputlangs, $hookmanager); $pdf->SetFont('','', $default_font_size - 1); $pdf->MultiCell(0, 3, ''); // Set interline to 3 $pdf->SetTextColor(0,0,0); @@ -232,8 +244,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders { $tab_top = 88; - $pdf->SetFont('','', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->SetFont('','', $default_font_size - 1); // Into loop to manage multipages + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; @@ -258,10 +270,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders { $curY = $nexY; - // Description of product line $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage + + // Description of product line $curX = $this->posxdesc-1; - pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,0,0,1); + pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,0,0,1,$hookmanager); $pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut $nexY = $pdf->GetY(); @@ -269,7 +282,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // VAT Rate if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { - $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs); + $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails, $hookmanager); $pdf->SetXY($this->posxtva, $curY); $pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R'); } @@ -321,7 +334,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders //on recupere la description du produit suivant $follow_descproduitservice = $object->lines[$i+1]->desc; //on compte le nombre de ligne afin de verifier la place disponible (largeur de ligne 52 caracteres) - $nblineFollowDesc = dol_nboflines_bis($follow_descproduitservice,52,$outputlangs->charset_output)*4; + $nblineFollowDesc = (dol_nboflines_bis($follow_descproduitservice,52,$outputlangs->charset_output)*4); // Et si on affiche dates de validite, on ajoute encore une ligne if ($object->lines[$i]->date_start && $object->lines[$i]->date_end) { @@ -361,7 +374,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->AddPage(); if (! empty($tplidx)) $pdf->useTemplate($tplidx); $pagenb++; - $this->_pagehead($pdf, $object, 0, $outputlangs); + $this->_pagehead($pdf, $object, 0, $outputlangs, $hookmanager); $pdf->SetFont('','', $default_font_size - 1); $pdf->MultiCell(0, 3, ''); // Set interline to 3 $pdf->SetTextColor(0,0,0); @@ -436,6 +449,21 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } + /** + * Affiche tableau des versement + * + * @param PDF &$pdf Object PDF + * @param Object $object Object order + * @param int $posy Position y in PDF + * @param Translate $outputlangs Object langs for output + * @return int <0 if KO, >0 if OK + */ + function _tableau_versements(&$pdf, $object, $posy, $outputlangs) + { + + } + + /** * Show miscellaneous information (payment mode, payment term, ...) * @@ -464,7 +492,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } // Show payments conditions - if ($object->type != 2 && ($object->cond_reglement_code || $object->cond_reglement)) + if ($object->cond_reglement_code || $object->cond_reglement) { $pdf->SetFont('','B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); @@ -480,96 +508,95 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $posy=$pdf->GetY()+3; } + // Check a payment mode is defined + /* Not used with orders + if (empty($object->mode_reglement_code) + && ! $conf->global->FACTURE_CHQ_NUMBER + && ! $conf->global->FACTURE_RIB_NUMBER) + { + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->SetTextColor(200,0,0); + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->MultiCell(90, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0); + $pdf->SetTextColor(0,0,0); - if ($object->type != 2) - { - // Check a payment mode is defined - /* - if (empty($object->mode_reglement_code) - && ! $conf->global->FACTURE_CHQ_NUMBER - && ! $conf->global->FACTURE_RIB_NUMBER) - { - $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetTextColor(200,0,0); - $pdf->SetFont('','B', $default_font_size - 2); - $pdf->MultiCell(90, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0); - $pdf->SetTextColor(0,0,0); + $posy=$pdf->GetY()+1; + } + */ - $posy=$pdf->GetY()+1; - }*/ + // Show payment mode + if ($object->mode_reglement_code + // && $object->mode_reglement_code != 'CHQ' + // && $object->mode_reglement_code != 'VIR' + ) + { + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->SetXY($this->marge_gauche, $posy); + $titre = $outputlangs->transnoentities("PaymentMode").':'; + $pdf->MultiCell(80, 4, $titre, 0, 'L'); - // Show payment mode - if ($object->mode_reglement_code) -// && $object->mode_reglement_code != 'CHQ' -// && $object->mode_reglement_code != 'VIR') - { - $pdf->SetFont('','B', $default_font_size - 2); - $pdf->SetXY($this->marge_gauche, $posy); - $titre = $outputlangs->transnoentities("PaymentMode").':'; - $pdf->MultiCell(80, 5, $titre, 0, 'L'); + $pdf->SetFont('','', $default_font_size - 2); + $pdf->SetXY(52, $posy); + $lib_mode_reg=$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code)!=('PaymentType'.$object->mode_reglement_code)?$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code):$outputlangs->convToOutputCharset($object->mode_reglement); + $pdf->MultiCell(80, 4, $lib_mode_reg,0,'L'); - $pdf->SetFont('','', $default_font_size - 2); - $pdf->SetXY(50, $posy); - $lib_mode_reg=$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code)!=('PaymentType'.$object->mode_reglement_code)?$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code):$outputlangs->convToOutputCharset($object->mode_reglement); - $pdf->MultiCell(80, 5, $lib_mode_reg,0,'L'); + $posy=$pdf->GetY()+2; + } - $posy=$pdf->GetY()+2; - } + // Show payment mode CHQ + /* + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') + { + // Si mode reglement non force ou si force a CHQ + if ($conf->global->FACTURE_CHQ_NUMBER) + { + if ($conf->global->FACTURE_CHQ_NUMBER > 0) + { + $account = new Account($this->db); + $account->fetch($conf->global->FACTURE_CHQ_NUMBER); - // Show payment mode CHQ -/* if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') - { - // Si mode reglement non force ou si force a CHQ - if ($conf->global->FACTURE_CHQ_NUMBER) - { - if ($conf->global->FACTURE_CHQ_NUMBER > 0) - { - $account = new Account($this->db); - $account->fetch($conf->global->FACTURE_CHQ_NUMBER); + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$account->proprio).':',0,'L',0); + $posy=$pdf->GetY()+1; + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->SetFont('','', $default_font_size - 2); + $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0); + $posy=$pdf->GetY()+2; + } + if ($conf->global->FACTURE_CHQ_NUMBER == -1) + { + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedToShort').' '.$outputlangs->convToOutputCharset($this->emetteur->name).' '.$outputlangs->transnoentities('SendTo').':',0,'L',0); + $posy=$pdf->GetY()+1; - $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetFont('','B', $default_font_size - 2); - $pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$account->proprio).':',0,'L',0); - $posy=$pdf->GetY()+1; + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->SetFont('','', $default_font_size - 2); + $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0); + $posy=$pdf->GetY()+2; + } + } + } - $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetFont('','', $default_font_size - 2); - $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0); - $posy=$pdf->GetY()+2; - } - if ($conf->global->FACTURE_CHQ_NUMBER == -1) - { - $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetFont('','B', $default_font_size - 2); - $pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedToShort').' '.$outputlangs->convToOutputCharset($this->emetteur->name).' '.$outputlangs->transnoentities('SendTo').':',0,'L',0); - $posy=$pdf->GetY()+1; + // If payment mode not forced or forced to VIR, show payment with BAN + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') + { + if (! empty($conf->global->FACTURE_RIB_NUMBER)) + { + $account = new Account($this->db); + $account->fetch($conf->global->FACTURE_RIB_NUMBER); - $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetFont('','', $default_font_size - 2); - $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0); - $posy=$pdf->GetY()+2; - } - } - } + $curx=$this->marge_gauche; + $cury=$posy; - // If payment mode not forced or forced to VIR, show payment with BAN - if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') - { - if (! empty($conf->global->FACTURE_RIB_NUMBER)) - { - $account = new Account($this->db); - $account->fetch($conf->global->FACTURE_RIB_NUMBER); + $posy=pdf_bank($pdf,$outputlangs,$curx,$cury,$account); - $curx=$this->marge_gauche; - $cury=$posy; + $posy+=2; + } + } + */ - $posy=pdf_bank($pdf,$outputlangs,$curx,$cury,$account); - - $posy+=2; - } - } -*/ - } return $posy; } @@ -652,7 +679,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT1".$mysoc->country_code), 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1), $useborder, 'R', 1); } // Total LocalTax2 @@ -662,7 +689,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT2".$mysoc->country_code), 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1); } } else @@ -746,14 +773,16 @@ class pdf_muscadet extends ModelePDFSuppliersOrders if ($deja_regle > 0) { - $index++; + // Already paid + Deposits + $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid"), 0, 'L', 0); - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle), 0, 'R', 0); + $resteapayer = $object->total_ttc - $deja_regle; + $index++; $pdf->SetTextColor(0,0,60); $pdf->SetFillColor(224,224,224); @@ -762,6 +791,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), $useborder, 'R', 1); + $pdf->SetFont('','', $default_font_size - 1); $pdf->SetTextColor(0,0,0); } @@ -859,21 +889,29 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Do not add the BACKGROUND as this is for suppliers //pdf_pagehead($pdf,$outputlangs,$this->page_hauteur); + //Affiche le filigrane brouillon - Print Draft Watermark + /*if($object->statut==0 && (! empty($conf->global->COMMANDE_DRAFT_WATERMARK)) ) + { + pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->COMMANDE_DRAFT_WATERMARK); + }*/ + //Print content + $pdf->SetTextColor(0,0,60); $pdf->SetFont('','B',$default_font_size + 3); - $posy=$this->marge_haute; $posx=$this->page_largeur-$this->marge_droite-100; + $posy=$this->marge_haute; $pdf->SetXY($this->marge_gauche,$posy); // Logo - $logo=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo; - if ($mysoc->logo) + $logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; + if ($this->emetteur->logo) { if (is_readable($logo)) { - $pdf->Image($logo, $this->marge_gauche, $posy, 0, 22); // width=0 (auto), max height=22 + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -889,28 +927,28 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L'); } - $pdf->SetFont('','B',$default_font_size + 3); + $pdf->SetFont('', 'B', $default_font_size + 3); $pdf->SetXY($posx,$posy); $pdf->SetTextColor(0,0,60); $title=$outputlangs->transnoentities("SupplierOrder"); $pdf->MultiCell(100, 3, $title, '', 'R'); - $pdf->SetFont('','B',$default_font_size); + $pdf->SetFont('', 'B', $default_font_size + 2); - $posy+=5; + $posy+=6; $pdf->SetXY($posx,$posy); $pdf->SetTextColor(0,0,60); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->ref), '', 'R'); - $posy+=1; + $posy+=2; $pdf->SetFont('','', $default_font_size -1); - $posy+=4; + $posy+=5; $pdf->SetXY($posx,$posy); if ($object->date_commande) { $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date_commande,"day",false,$outputlangs,true), '', 'R'); + $pdf->MultiCell(100, 4, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date_commande,"day",false,$outputlangs,true), '', 'R'); } else { @@ -918,6 +956,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->MultiCell(100, 4, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R'); } + $posy+=2; + if ($showaddress) { // Sender properties @@ -945,13 +985,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L'); // Show sender information - $pdf->SetXY($posx+2,$posy+8); + $pdf->SetXY($posx+2,$posy+4+(dol_nboflines_bis($this->emetteur->name,44)*4)); $pdf->SetFont('','', $default_font_size - 1); $pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L'); - // If BILLING contact defined on invoice, we use it + // If BILLING contact defined on order, we use it $usecontact=false; $arrayidcontact=$object->getIdContact('external','BILLING'); if (count($arrayidcontact) > 0) @@ -965,12 +1005,12 @@ class pdf_muscadet extends ModelePDFSuppliersOrders { // On peut utiliser le nom de la societe du contact if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname; - else $socname = $object->client->nom; + else $socname = $object->client->name; $carac_client_name=$outputlangs->convToOutputCharset($socname); } else { - $carac_client_name=$outputlangs->convToOutputCharset($object->client->nom); + $carac_client_name=$outputlangs->convToOutputCharset($object->client->name); } $carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,$object->contact,$usecontact,'target'); diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php index 02aee4ca100..5724411047c 100644 --- a/htdocs/core/photos_resize.php +++ b/htdocs/core/photos_resize.php @@ -1,6 +1,7 @@ - * Copyright (C) 2009 Meos +/* Copyright (C) 2010-2011 Laurent Destailleur + * Copyright (C) 2009 Meos + * Copyright (C) 2012 Regis Houssin * * 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 @@ -41,25 +42,19 @@ require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php"); $langs->load("products"); $langs->load("other"); -$modulepart=$_REQUEST['modulepart']?$_REQUEST['modulepart']:'produit|service'; -if (isset($_GET["id"])) -{ - $id = isset($_GET["id"])?$_GET["id"]:''; -} +$id=GETPOST('id','int'); +$action=GETPOST('action','alpha'); +$modulepart=GETPOST('modulepart','alpha')?GETPOST('modulepart','alpha'):'produit|service'; $original_file = isset($_REQUEST["file"])?urldecode($_REQUEST["file"]):''; - // Security check if (empty($modulepart)) accessforbidden('Bad value for modulepart'); $accessallowed=0; -if ($modulepart) +if ($modulepart=='produit|service') { - if ($modulepart=='produit|service') - { - $result=restrictedArea($user,'produit|service',$id,'product','','',$fieldid); - if ($modulepart=='produit|service' && (! $user->rights->produit->lire && ! $user->rights->service->lire)) accessforbidden(); - $accessallowed=1; - } + $result=restrictedArea($user,'produit|service',$id,'product&product'); + if ($modulepart=='produit|service' && (! $user->rights->produit->lire && ! $user->rights->service->lire)) accessforbidden(); + $accessallowed=1; } // Security: @@ -69,60 +64,52 @@ if (! $accessallowed) accessforbidden(); } - +$object = new Product($db); +if ($id > 0) +{ + $result = $object->fetch($id); + if ($result <= 0) dol_print_error($db,'Failed to load object'); + $dir=$conf->product->multidir_output[$object->entity]; // By default + if ($object->type == 0) $dir=$conf->product->multidir_output[$object->entity]; + if ($object->type == 1) $dir=$conf->service->multidir_output[$object->entity]; +} /* * Actions */ -if ($_POST["action"] == 'confirm_resize' && (isset($_POST["file"]) != "") && (isset($_POST["sizex"]) != "") && (isset($_POST["sizey"]) != "")) +if ($action == 'confirm_resize' && (isset($_POST["file"]) != "") && (isset($_POST["sizex"]) != "") && (isset($_POST["sizey"]) != "")) { - $product=new Product($db); - $result=$product->fetch($_POST["id"]); - if ($result <= 0) dol_print_error($db,'Failed to load object'); - $dir=$conf->product->dir_output; // By default - if ($product->type == 0) $dir=$conf->product->dir_output; - if ($product->type == 1) $dir=$conf->service->dir_output; - $fullpath=$dir."/".$original_file; $result=dol_imageResizeOrCrop($fullpath,0,$_POST['sizex'],$_POST['sizey']); if ($result == $fullpath) { - header("Location: ".DOL_URL_ROOT."/product/photos.php?id=".$_POST["id"].'&action=addthumb&file='.urldecode($_POST["file"])); + header("Location: ".DOL_URL_ROOT."/product/photos.php?id=".$id.'&action=addthumb&file='.urldecode($_POST["file"])); exit; } else { $mesg=$result; $_GET['file']=$_POST["file"]; - $_GET['id']=$_POST["id"]; } } // Crop d'une image -if ($_POST["action"] == 'confirm_crop') +if ($action == 'confirm_crop') { - $product=new Product($db); - $result=$product->fetch($_POST["id"]); - if ($result <= 0) dol_print_error($db,'Failed to load object'); - $dir=$conf->product->dir_output; // By default - if ($product->type == 0) $dir=$conf->product->dir_output; - if ($product->type == 1) $dir=$conf->service->dir_output; - $fullpath=$dir."/".$original_file; $result=dol_imageResizeOrCrop($fullpath,1,$_POST['w'],$_POST['h'],$_POST['x'],$_POST['y']); if ($result == $fullpath) { - header("Location: ".DOL_URL_ROOT."/product/photos.php?id=".$_POST["id"].'&action=addthumb&file='.urldecode($_POST["file"])); + header("Location: ".DOL_URL_ROOT."/product/photos.php?id=".$id.'&action=addthumb&file='.urldecode($_POST["file"])); exit; } else { $mesg=$result; $_GET['file']=$_POST["file"]; - $_GET['id']=$_POST["id"]; } } @@ -138,7 +125,7 @@ print_fiche_titre($langs->trans("ImageEditor")); if ($mesg) print '
    '.$mesg.'
    '; -$infoarray=dol_getImageSize($conf->product->dir_output."/".urldecode($_GET["file"])); +$infoarray=dol_getImageSize($dir."/".urldecode($_GET["file"])); $height=$infoarray['height']; $width=$infoarray['width']; print $langs->trans("CurrentInformationOnImage").':'; @@ -150,7 +137,7 @@ print '
      print '
      '."\n"; print ''."\n"; -print ''; +print ''; print '
      '; print ''.$langs->trans("Resize").''; @@ -159,8 +146,8 @@ print $langs->trans("NewLength").': trans("NewHeight").': px  
      '; print ''; print ''; -print ''; -print ''; +print ''; +print ''; print '
      '; print '
      '; print '
      '; @@ -174,7 +161,7 @@ print '
      '."\n"; if (! empty($conf->use_javascript_ajax)) { -$infoarray=dol_getImageSize($conf->product->dir_output."/".urldecode($_GET["file"])); +$infoarray=dol_getImageSize($dir."/".urldecode($_GET["file"])); $height=$infoarray['height']; $width=$infoarray['width']; @@ -183,9 +170,9 @@ print '
      '; print ''.$langs->trans("Recenter").''; print $langs->trans("DefineNewAreaToPick").'...
      '; print '
      '; -print '
      '; +print '
      '; print '

      '; -print '
      +print '
      '.$langs->trans("NewSizeAfterCropping").': @@ -198,8 +185,8 @@ print ' - - + +
      '; print '
      '; @@ -208,4 +195,5 @@ print ''; llxFooter(); +$db->close(); ?> diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 72de98269af..70208eb4c13 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -41,20 +41,7 @@ print ''."\n"; if (constant('JS_JQUERY')) print ''."\n"; else print ''."\n"; print ''."\n"; -print ' -'."\n"; +print ''."\n"; if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER; print ' '; @@ -82,7 +69,7 @@ $(document).ready(function () { - +
      @@ -121,9 +108,9 @@ if (! empty($hookmanager->resArray['options'])) {   trans('SecurityCode'); ?> - + - + @@ -134,7 +121,7 @@ if (! empty($hookmanager->resArray['options'])) { -Logo + diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php index 22a012032f8..c9ea31a7117 100644 --- a/htdocs/core/tpl/passwordforgotten.tpl.php +++ b/htdocs/core/tpl/passwordforgotten.tpl.php @@ -38,20 +38,7 @@ else print ''."\n"; else print ''."\n"; -print ' -'."\n"; +print ''."\n"; if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER; print ' '; @@ -64,7 +51,7 @@ print ' - +
      @@ -92,9 +79,9 @@ print '   trans('SecurityCode'); ?> - + - + @@ -105,7 +92,7 @@ print ' -Logo + diff --git a/htdocs/core/tpl/predefinedproductlinediv_view.tpl.php b/htdocs/core/tpl/predefinedproductlinediv_view.tpl.php deleted file mode 100644 index fb2743f5e1d..00000000000 --- a/htdocs/core/tpl/predefinedproductlinediv_view.tpl.php +++ /dev/null @@ -1,104 +0,0 @@ - - * Copyright (C) 2010-2011 Laurent Destailleur - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -?> - - - -
      > -
      -
      - textwithtooltip($text,$description,3,'','',$i,0,($line->fk_parent_line?img_picto('', 'rightarrow'):'')); - - // Show range - print_date_range($line->date_start, $line->date_end); - - // Add description in form - if ($conf->global->PRODUIT_DESC_IN_FORM) - { - print ($line->description && $line->description!=$line->product_label)?'
      '.dol_htmlentitiesbr($line->description):''; - } - ?> -
      - -
      tva_tx,'%',$line->info_bits); ?>
      - -
      subprice); ?>
      - -
      - info_bits & 2) != 2) && $line->special_code != 3) echo $line->qty; - else echo ' '; ?> -
      - -
      - remise_percent) && $line->special_code != 3) { - echo dol_print_reduction($line->remise_percent,$langs); - } else { - echo ' '; - } ?> -
      - -
      - special_code == 3) { - echo $langs->trans('Option'); - } else { - echo price($line->total_ht); - } ?> -
      - - statut == 0 && $user->rights->$element->creer) { ?> -
      - info_bits & 2) == 2) { ?> - - id.'#'.$line->id; ?>"> - - - -
      - - - - 1) { ?> -
      - 0) { ?> - id; ?>"> - - - - - id; ?>"> - - - -
      - -
       
      - - -
       
      -
       
      -
       
      - - -
      - diff --git a/htdocs/core/triggers/interface_20_all_Logevents.class.php b/htdocs/core/triggers/interface_20_all_Logevents.class.php index a41ea6f0f66..6e757345df6 100755 --- a/htdocs/core/triggers/interface_20_all_Logevents.class.php +++ b/htdocs/core/triggers/interface_20_all_Logevents.class.php @@ -17,15 +17,14 @@ */ /** - * \file htdocs/core/triggers/interface_20_all_Logevents.class.php - * \ingroup core - * \brief Trigger file for + * \file htdocs/core/triggers/interface_20_all_Logevents.class.php + * \ingroup core + * \brief Trigger file for */ /** - * \class InterfaceLogevents - * \brief Class of triggers for security events + * Class of triggers for security events */ class InterfaceLogevents { @@ -111,7 +110,7 @@ class InterfaceLogevents if (empty($conf->entity)) $conf->entity = $entity; // forcing of the entity if it's not defined (ex: in login form) - $this->date=gmmktime(); + $this->date=dol_now(); $this->duree=0; // Actions diff --git a/htdocs/core/triggers/interface_20_modPaypal_PaypalWorkflow.class.php b/htdocs/core/triggers/interface_20_modPaypal_PaypalWorkflow.class.php index 2d7b9ef6ee0..aacd600f478 100755 --- a/htdocs/core/triggers/interface_20_modPaypal_PaypalWorkflow.class.php +++ b/htdocs/core/triggers/interface_20_modPaypal_PaypalWorkflow.class.php @@ -23,8 +23,7 @@ /** - * \class InterfacePaypalWorkflow - * \brief Class of triggers for paypal module + * Class of triggers for paypal module */ class InterfacePaypalWorkflow { diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php index cac90487179..3c914faf0e1 100755 --- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -17,15 +17,14 @@ */ /** - * \file htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php - * \ingroup core - * \brief Trigger file for workflows + * \file htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php + * \ingroup core + * \brief Trigger file for workflows */ /** - * \class InterfaceWorkflowManager - * \brief Class of triggers for workflow module + * Class of triggers for workflow module */ class InterfaceWorkflowManager @@ -95,7 +94,6 @@ class InterfaceWorkflowManager * @param User $user Object user * @param Translate $langs Object langs * @param conf $conf Object conf - * @param string $entity Value for instance of data (Always 1 except if module MultiCompany is installed) * @return int <0 if KO, 0 if no triggered ran, >0 if OK */ function run_trigger($action,$object,$user,$langs,$conf) diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 435b8afa554..8e0641e594f 100755 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -25,8 +25,7 @@ /** - * \class InterfaceActionsAuto - * \brief Class of triggered functions for agenda module + * Class of triggered functions for agenda module */ class InterfaceActionsAuto { diff --git a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php index 346ade67d03..2e2bc3642ab 100755 --- a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php @@ -16,16 +16,15 @@ */ /** - * \file htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php - * \ingroup core - * \brief Fichier de gestion des triggers LDAP + * \file htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php + * \ingroup core + * \brief Fichier de gestion des triggers LDAP */ require_once (DOL_DOCUMENT_ROOT."/core/class/ldap.class.php"); /** - * \class InterfaceLdapsynchro - * \brief Class of triggers for ldap module + * Class of triggers for ldap module */ class InterfaceLdapsynchro { diff --git a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php index 4ea8db0e2ce..cf47057966d 100755 --- a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php +++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php @@ -17,15 +17,14 @@ */ /** - * \file htdocs/core/triggers/interface_50_modNotification_Notification.class.php - * \ingroup notification - * \brief File of class of triggers for notification module + * \file htdocs/core/triggers/interface_50_modNotification_Notification.class.php + * \ingroup notification + * \brief File of class of triggers for notification module */ /** - * \class InterfaceNotification - * \brief Class of triggers for notification module + * Class of triggers for notification module */ class InterfaceNotification { diff --git a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN index 15ee6544a94..68789b03878 100755 --- a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN +++ b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN @@ -17,22 +17,21 @@ */ /** - * \file htdocs/core/triggers/interface_90_all_Demo.class.php - * \ingroup core - * \brief Fichier de demo de personalisation des actions du workflow - * \remarks Son propre fichier d'actions peut etre cree par recopie de celui-ci: - * - Le nom du fichier doit etre: interface_99_modMymodule_Mytrigger.class.php - * ou: interface_99_all_Mytrigger.class.php - * - Le fichier doit rester stocke dans core/triggers - * - Le nom de la classe doit etre InterfaceMytrigger - * - Le nom de la methode constructeur doit etre InterfaceMytrigger - * - Le nom de la propriete name doit etre Mytrigger + * \file htdocs/core/triggers/interface_90_all_Demo.class.php + * \ingroup core + * \brief Fichier de demo de personalisation des actions du workflow + * \remarks Son propre fichier d'actions peut etre cree par recopie de celui-ci: + * - Le nom du fichier doit etre: interface_99_modMymodule_Mytrigger.class.php + * ou: interface_99_all_Mytrigger.class.php + * - Le fichier doit rester stocke dans core/triggers + * - Le nom de la classe doit etre InterfaceMytrigger + * - Le nom de la methode constructeur doit etre InterfaceMytrigger + * - Le nom de la propriete name doit etre Mytrigger */ /** - * \class InterfaceDemo - * \brief Class of triggers for demo module + * Class of triggers for demo module */ class InterfaceDemo { @@ -57,6 +56,7 @@ class InterfaceDemo /** * Return name of trigger file + * * @return string Name of trigger file */ function getName() @@ -66,6 +66,7 @@ class InterfaceDemo /** * Return description of trigger file + * * @return string Description of trigger file */ function getDesc() @@ -75,6 +76,7 @@ class InterfaceDemo /** * Return version of trigger file + * * @return string Version of trigger file */ function getVersion() diff --git a/htdocs/document.php b/htdocs/document.php index 5fb795dcb70..6c8c7c59c7f 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -50,10 +50,11 @@ require("./main.inc.php"); // Load $user and permissions require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'); $encoding = ''; -$action = GETPOST('action','alpha'); -$original_file = GETPOST('file','alpha'); // Do not use urldecode here ($_GET are already decoded by PHP). -$modulepart = GETPOST('modulepart','alpha'); -$urlsource = GETPOST('urlsource','alpha'); +$action=GETPOST('action','alpha'); +$original_file=GETPOST('file','alpha'); // Do not use urldecode here ($_GET are already decoded by PHP). +$modulepart=GETPOST('modulepart','alpha'); +$urlsource=GETPOST('urlsource','alpha'); +$entity=GETPOST('entity')?GETPOST('entity','int'):$conf->entity; // Security check if (empty($modulepart)) accessforbidden('Bad value for parameter modulepart'); @@ -124,14 +125,14 @@ if ($modulepart) // On fait une verification des droits et on definit le repertoire concerne // Wrapping for third parties - if ($modulepart == 'company') + if ($modulepart == 'company' || $modulepart == 'societe') { if ($user->rights->societe->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } - $original_file=$conf->societe->dir_output.'/'.$original_file; - $sqlprotectagainstexternals = "SELECT rowid as fk_soc FROM ".MAIN_DB_PREFIX."societe WHERE rowid='".$refname."' AND entity=".$conf->entity; + $original_file=$conf->societe->multidir_output[$entity].'/'.$original_file; + $sqlprotectagainstexternals = "SELECT rowid as fk_soc FROM ".MAIN_DB_PREFIX."societe WHERE rowid='".$refname."' AND entity IN (".getEntity('societe', 1).")"; } // Wrapping for invoices @@ -252,17 +253,6 @@ if ($modulepart) $original_file=$conf->compta->dir_output.'/'.$original_file; } - // Wrapping pour les societe - else if ($modulepart == 'societe') - { - if ($user->rights->societe->lire || preg_match('/^specimen/i',$original_file)) - { - $accessallowed=1; - } - $original_file=$conf->societe->dir_output.'/'.$original_file; - $sqlprotectagainstexternals = "SELECT rowid as fk_soc FROM ".MAIN_DB_PREFIX."societe WHERE rowid='".$refname."' AND entity=".$conf->entity; - } - // Wrapping pour les expedition else if ($modulepart == 'expedition') { @@ -310,8 +300,8 @@ if ($modulepart) { $accessallowed=1; } - if ($conf->product->enabled) $original_file=$conf->product->dir_output.'/'.$original_file; - elseif ($conf->service->enabled) $original_file=$conf->service->dir_output.'/'.$original_file; + if ($conf->product->enabled) $original_file=$conf->product->multidir_output[$entity].'/'.$original_file; + elseif ($conf->service->enabled) $original_file=$conf->service->multidir_output[$entity].'/'.$original_file; } // Wrapping pour les contrats @@ -450,6 +440,7 @@ if ($modulepart) } } + // Basic protection (against external users only) if ($user->societe_id > 0) { diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index a4afc14d612..5ccef2be6b4 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -111,7 +111,7 @@ class EcmDirectory // extends CommonObject if ($pathfound) { $this->error="ErrorDirAlreadyExists"; - dol_syslog("EcmDirectories::create ".$this->error, LOG_WARNING); + dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); return -1; } else @@ -137,7 +137,7 @@ class EcmDirectory // extends CommonObject $sql.= " '".$this->fk_user_c."'"; $sql.= ")"; - dol_syslog("EcmDirectories::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -167,7 +167,7 @@ class EcmDirectory // extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dol_syslog("EcmDirectories::create ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); $this->db->rollback(); return -1; } @@ -204,7 +204,7 @@ class EcmDirectory // extends CommonObject $sql.= " description='".$this->db->escape($this->description)."'"; $sql.= " WHERE rowid=".$this->id; - dol_syslog("EcmDirectories::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -251,12 +251,12 @@ class EcmDirectory // extends CommonObject $sql.= " cachenbofdoc = cachenbofdoc ".$sign." 1"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog("EcmDirectories::changeNbOfFiles sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::changeNbOfFiles sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->error="Error ".$this->db->lasterror(); - dol_syslog("EcmDirectories::changeNbOfFiles ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::changeNbOfFiles ".$this->error, LOG_ERR); return -1; } @@ -285,7 +285,7 @@ class EcmDirectory // extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."ecm_directories as t"; $sql.= " WHERE t.rowid = ".$id; - dol_syslog("EcmDirectories::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -312,7 +312,7 @@ class EcmDirectory // extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dol_syslog("EcmDirectories::fetch ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); return -1; } } @@ -333,20 +333,20 @@ class EcmDirectory // extends CommonObject $relativepath=$this->getRelativePath(1); // Ex: dir1/dir2/dir3 - dol_syslog("EcmDirectories::delete remove directory ".$relativepath); + dol_syslog(get_class($this)."::delete remove directory ".$relativepath); $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."ecm_directories"; $sql.= " WHERE rowid=".$this->id; - dol_syslog("EcmDirectories::delete sql=".$sql); + dol_syslog(get_class($this)."::delete sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { $this->db->rollback(); $this->error="Error ".$this->db->lasterror(); - dol_syslog("EcmDirectories::delete ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); return -2; } @@ -360,7 +360,7 @@ class EcmDirectory // extends CommonObject else { $this->error='ErrorFailToDeleteDir'; - dol_syslog("EcmDirectories::delete ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); $this->db->rollback(); $error++; } @@ -487,7 +487,7 @@ class EcmDirectory // extends CommonObject $sql.= " WHERE fk_parent != 0"; $sql.= " AND entity = ".$conf->entity; - dol_syslog("EcmDirectory::get_full_arbo sql=".$sql); + dol_syslog(get_class($this)."::get_full_arbo sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -551,7 +551,7 @@ class EcmDirectory // extends CommonObject $sql.= " AND c.entity = ".$conf->entity; $sql.= " ORDER BY c.label, c.rowid"; - dol_syslog("EcmDirectory::get_full_arbo sql=".$sql); + dol_syslog(get_class($this)."::get_full_arbo sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -677,7 +677,7 @@ class EcmDirectory // extends CommonObject $sql.= " WHERE entity = ".$conf->entity; } - dol_syslog("EcmDirectories::refreshcachenboffile sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::refreshcachenboffile sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -687,7 +687,7 @@ class EcmDirectory // extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dol_syslog("EcmDirectories::refreshcachenboffile ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::refreshcachenboffile ".$this->error, LOG_ERR); return -1; } } diff --git a/htdocs/ecm/docdir.php b/htdocs/ecm/docdir.php index 25f685f47ae..c6f0d654ca5 100644 --- a/htdocs/ecm/docdir.php +++ b/htdocs/ecm/docdir.php @@ -39,13 +39,17 @@ $langs->load("bills"); $langs->load("contracts"); $langs->load("categories"); -// Load permissions -$user->getrights('ecm'); - if (!$user->rights->ecm->setup) accessforbidden(); // Get parameters -$socid = isset($_GET["socid"])?$_GET["socid"]:''; +$socid = GETPOST("socid","int"); + +// Security check +if ($user->societe_id > 0) +{ + $action = ''; + $socid = $user->societe_id; +} $section=$_GET["section"]; if (! $section) $section='misc'; diff --git a/htdocs/ecm/docfile.php b/htdocs/ecm/docfile.php index 49b2ed424b7..45e71682cea 100644 --- a/htdocs/ecm/docfile.php +++ b/htdocs/ecm/docfile.php @@ -39,14 +39,17 @@ $langs->load("bills"); $langs->load("contracts"); $langs->load("categories"); -// Load permissions -$user->getrights('ecm'); - if (!$user->rights->ecm->setup) accessforbidden(); // Get parameters -$socid = isset($_GET["socid"])?$_GET["socid"]:''; +$socid = GETPOST("socid","int"); +// Security check +if ($user->societe_id > 0) +{ + $action = ''; + $socid = $user->societe_id; +} $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); diff --git a/htdocs/ecm/docmine.php b/htdocs/ecm/docmine.php index 0a09d83a5fb..e75a0903a28 100644 --- a/htdocs/ecm/docmine.php +++ b/htdocs/ecm/docmine.php @@ -29,19 +29,11 @@ require_once(DOL_DOCUMENT_ROOT."/ecm/class/ecmdirectory.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/ecm.lib.php"); - // Load traductions files $langs->load("ecm"); $langs->load("companies"); $langs->load("other"); -// Load permissions -$user->getrights('ecm'); - - -// Security check -if ($user->societe_id > 0) $socid = $user->societe_id; - // Get parameters $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); diff --git a/htdocs/ecm/docother.php b/htdocs/ecm/docother.php index 81036df0296..a6c17e2b45e 100644 --- a/htdocs/ecm/docother.php +++ b/htdocs/ecm/docother.php @@ -18,13 +18,10 @@ $langs->load("ecm"); $langs->load("companies"); $langs->load("other"); -// Load permissions -$user->getrights('ecm'); - // Get parameters -$socid = isset($_GET["socid"])?$_GET["socid"]:''; +$socid = GETPOST("socid","int"); -// Permissions +// Security check if ($user->societe_id > 0) { $action = ''; diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 0efdb835346..84553edcc38 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -46,18 +46,13 @@ $langs->load("contracts"); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'ecm', 0); -// Load permissions -$user->getrights('ecm'); - // Get parameters $socid=GETPOST('socid','int'); $action=GETPOST("action"); -$section=GETPOST("section"); +$section=GETPOST("section")?GETPOST("section","int"):GETPOST("section_id","int"); $module=GETPOST("module"); if (! $section) $section=0; -$upload_dir = $conf->ecm->dir_output.'/'.$section; - $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -69,9 +64,9 @@ if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="fullname"; $ecmdir = new EcmDirectory($db); -if (GETPOST("section")) +if ($section) { - $result=$ecmdir->fetch(GETPOST("section")); + $result=$ecmdir->fetch($section); if (! $result > 0) { dol_print_error($db,$ecmdir->error); @@ -84,16 +79,17 @@ $ecmdirstatic = new EcmDirectory($db); $userstatic = new User($db); -/******************************************************************* - * ACTIONS - * - * Put here all code to do according to value of "action" parameter - ********************************************************************/ +/* + * Actions + */ // Upload file if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC)) { - $relativepath=$ecmdir->getRelativePath(); + // Define relativepath and upload_dir + $relativepath=''; + if ($ecmdir->id) $relativepath=$ecmdir->getRelativePath(); + else $relativepath=GETPOST('section_dir'); $upload_dir = $conf->ecm->dir_output.'/'.$relativepath; if (dol_mkdir($upload_dir) >= 0) @@ -129,8 +125,10 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC)) } } + + // Add directory -if (GETPOST("action") == 'add' && $user->rights->ecm->setup) +if ($action == 'add' && $user->rights->ecm->setup) { $ecmdir->ref = 'NOTUSEDYET'; $ecmdir->label = GETPOST("label"); @@ -147,12 +145,14 @@ if (GETPOST("action") == 'add' && $user->rights->ecm->setup) $mesg='
      Error '.$langs->trans($ecmdir->error).'
      '; $action = "create"; } + + clearstatcache(); } // Remove file -if (GETPOST('action') == 'confirm_deletefile' && GETPOST('confirm') == 'yes') +if ($action == 'confirm_deletefile' && GETPOST('confirm') == 'yes') { - $result=$ecmdir->fetch(GETPOST("section")); + $result=$ecmdir->fetch($section); if (! $result > 0) { dol_print_error($db,$ecmdir->error); @@ -168,6 +168,8 @@ if (GETPOST('action') == 'confirm_deletefile' && GETPOST('confirm') == 'yes') $result=$ecmdir->changeNbOfFiles('-'); $action='file_manager'; + + clearstatcache(); } // Remove directory @@ -175,11 +177,15 @@ if ($action == 'confirm_deletesection' && GETPOST('confirm') == 'yes') { $result=$ecmdir->delete($user); $mesg = '
      '.$langs->trans("ECMSectionWasRemoved", $ecmdir->label).'
      '; + + clearstatcache(); } // Refresh directory view if ($action == 'refreshmanual') { + clearstatcache(); + $diroutputslash=str_replace('\\','/',$conf->ecm->dir_output); $diroutputslash.='/'; @@ -290,17 +296,14 @@ if ($action == 'refreshmanual') -/******************************************************************* - * View - ********************************************************************/ - -$userstatic = new User($db); -$ecmdirstatic = new EcmDirectory($db); +/* + * View + */ //print "xx".$_SESSION["dol_screenheight"]; $maxheightwin=(isset($_SESSION["dol_screenheight"]) && $_SESSION["dol_screenheight"] > 500)?($_SESSION["dol_screenheight"]-166):660; $morejs=array(); -if (! empty($conf->global->MAIN_ECM_TRY_JS)) $morejs=array("/filemanager/includes/jqueryFileTree/jqueryFileTree.js"); +if (! empty($conf->global->MAIN_ECM_TRY_JS)) $morejs=array("/filemanager/includes/jqueryFileTree/jqueryFileTree.js"); // TODO Move lib into includes $moreheadcss=" '; // get the body part $tidy_body = tidy_get_body($tidy); - $form = $tidy_body->value; + $html = $tidy_body->value; // fix some self-closing tags - $form = str_replace('
      ', '
      ', $form); + $html = str_replace('
      ', '
      ', $html); // remove some empty tag blocks - $form = preg_replace('/]*)><\/div>/', '', $form); - $form = preg_replace('/]*)><\/p>/', '', $form); + $html = preg_replace('/]*)><\/div>/', '', $html); + $html = preg_replace('/]*)><\/p>/', '', $html); if ($tagvs !== '') { // set vertical space for some XHTML tags $this->setHtmlVSpace($tagvs); } // return the cleaned XHTML code + CSS - return $css.$form; + return $css.$html; } /** @@ -18230,19 +20327,19 @@ class TCPDF { // remove empty blocks $cssdata = preg_replace('/([^\}\{]+)\{\}/', '', $cssdata); // replace media type parenthesis - $cssdata = preg_replace('/@media[\s]+([^\{]*)\{/i', '@media \\1�', $cssdata); - $cssdata = preg_replace('/\}\}/si', '}�', $cssdata); + $cssdata = preg_replace('/@media[\s]+([^\{]*)\{/i', '@media \\1', $cssdata); + $cssdata = preg_replace('/\}\}/si', '}', $cssdata); // trim string $cssdata = trim($cssdata); // find media blocks (all, braille, embossed, handheld, print, projection, screen, speech, tty, tv) $cssblocks = array(); $matches = array(); - if (preg_match_all('/@media[\s]+([^\�]*)�([^�]*)�/i', $cssdata, $matches) > 0) { + if (preg_match_all('/@media[\s]+([^\]*)([^]*)/i', $cssdata, $matches) > 0) { foreach ($matches[1] as $key => $type) { $cssblocks[$type] = $matches[2][$key]; } // remove media blocks - $cssdata = preg_replace('/@media[\s]+([^\�]*)�([^�]*)�/i', '', $cssdata); + $cssdata = preg_replace('/@media[\s]+([^\]*)([^]*)/i', '', $cssdata); } // keep 'all' and 'print' media, other media types are discarded if (isset($cssblocks['all']) AND !empty($cssblocks['all'])) { @@ -18890,25 +20987,25 @@ class TCPDF { /** * Returns the HTML DOM array. - * @param $form (string) html code + * @param $html (string) html code * @return array * @protected * @since 3.2.000 (2008-06-20) */ - protected function getHtmlDomArray($form) { + protected function getHtmlDomArray($html) { // array of CSS styles ( selector => properties). $css = array(); // get CSS array defined at previous call $matches = array(); - if (preg_match_all('/([^\<]*)<\/cssarray>/isU', $form, $matches) > 0) { + if (preg_match_all('/([^\<]*)<\/cssarray>/isU', $html, $matches) > 0) { if (isset($matches[1][0])) { $css = array_merge($css, unserialize($this->unhtmlentities($matches[1][0]))); } - $form = preg_replace('/(.*?)<\/cssarray>/isU', '', $form); + $html = preg_replace('/(.*?)<\/cssarray>/isU', '', $html); } // extract external CSS files $matches = array(); - if (preg_match_all('/]*)>/isU', $form, $matches) > 0) { + if (preg_match_all('/]*)>/isU', $html, $matches) > 0) { foreach ($matches[1] as $key => $link) { $type = array(); if (preg_match('/type[\s]*=[\s]*"text\/css"/', $link, $type)) { @@ -18929,7 +21026,7 @@ class TCPDF { } // extract style tags $matches = array(); - if (preg_match_all('/]*)>([^\<]*)<\/style>/isU', $form, $matches) > 0) { + if (preg_match_all('/]*)>([^\<]*)<\/style>/isU', $html, $matches) > 0) { foreach ($matches[1] as $key => $media) { $type = array(); preg_match('/media[\s]*=[\s]*"([^"]*)"/', $media, $type); @@ -18944,93 +21041,95 @@ class TCPDF { // create a special tag to contain the CSS array (used for table content) $csstagarray = ''.htmlentities(serialize($css)).''; // remove head and style blocks - $form = preg_replace('/]*)>(.*?)<\/head>/siU', '', $form); - $form = preg_replace('/]*)>([^\<]*)<\/style>/isU', '', $form); + $html = preg_replace('/]*)>(.*?)<\/head>/siU', '', $html); + $html = preg_replace('/]*)>([^\<]*)<\/style>/isU', '', $html); // define block tags $blocktags = array('blockquote','br','dd','dl','div','dt','h1','h2','h3','h4','h5','h6','hr','li','ol','p','pre','ul','tcpdf','table','tr','td'); // define self-closing tags $selfclosingtags = array('area','base','basefont','br','hr','input','img','link','meta'); // remove all unsupported tags (the line below lists all supported tags) - $form = strip_tags($form, '




    or a string containing some or all of the following characters (in any order):
    • L: left
    • T: top
    • R: right
    • B: bottom
    or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) * @param $ln (int) Indicates where the current position should go after the call. Possible values are:
    • 0: to the right (or left for RTL language)
    • 1: to the beginning of the next line
    • 2: below
    Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0. @@ -19705,15 +21804,15 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: * @see Multicell(), writeHTML() * @public */ - public function writeHTMLCell($w, $h, $x, $y, $form='', $border=0, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true) { - return $this->MultiCell($w, $h, $form, $border, $align, $fill, $ln, $x, $y, $reseth, 0, true, $autopadding, 0, 'T', false); + public function writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true) { + return $this->MultiCell($w, $h, $html, $border, $align, $fill, $ln, $x, $y, $reseth, 0, true, $autopadding, 0, 'T', false); } /** * Allows to preserve some HTML formatting (limited support).
    * IMPORTANT: The HTML must be well formatted - try to clean-up it using an application like HTML-Tidy before submitting. * Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul - * @param $form (string) text to display + * @param $html (string) text to display * @param $ln (boolean) if true add a new line after text (default = true) * @param $fill (boolean) Indicates if the background must be painted (true) or transparent (false). * @param $reseth (boolean) if true reset the last cell height (default false). @@ -19721,7 +21820,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: * @param $align (string) Allows to center or align the text. Possible values are:
    • L : left align
    • C : center
    • R : right align
    • '' : empty string : left for LTR or right for RTL
    * @public */ - public function writeHTML($form, $ln=true, $fill=false, $reseth=false, $cell=false, $align='') { + public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align='') { $gvars = $this->getGraphicVars(); // store current values $prev_cell_margin = $this->cell_margin; @@ -19810,7 +21909,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: // reset row height $this->resetLastH(); } - $dom = $this->getHtmlDomArray($form); + $dom = $this->getHtmlDomArray($html); $maxel = count($dom); $key = 0; $hidden_node_key = -1; @@ -19840,11 +21939,13 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: if (($dom[$key]['attribute']['pagebreak'] == 'true') OR ($dom[$key]['attribute']['pagebreak'] == 'left') OR ($dom[$key]['attribute']['pagebreak'] == 'right')) { // add a page (or trig AcceptPageBreak() for multicolumn mode) $this->checkPageBreak($this->PageBreakTrigger + 1); + $this->htmlvspace = ($this->PageBreakTrigger + 1); } if ((($dom[$key]['attribute']['pagebreak'] == 'left') AND (((!$this->rtl) AND (($this->page % 2) == 0)) OR (($this->rtl) AND (($this->page % 2) != 0)))) OR (($dom[$key]['attribute']['pagebreak'] == 'right') AND (((!$this->rtl) AND (($this->page % 2) != 0)) OR (($this->rtl) AND (($this->page % 2) == 0))))) { // add a page (or trig AcceptPageBreak() for multicolumn mode) $this->checkPageBreak($this->PageBreakTrigger + 1); + $this->htmlvspace = ($this->PageBreakTrigger + 1); } } if ($dom[$key]['tag'] AND $dom[$key]['opening'] AND isset($dom[$key]['attribute']['nobr']) AND ($dom[$key]['attribute']['nobr'] == 'true')) { @@ -19854,7 +21955,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: // store current object $this->startTransaction(); // save this method vars - $this_method_vars['html'] = $form; + $this_method_vars['html'] = $html; $this_method_vars['ln'] = $ln; $this_method_vars['fill'] = $fill; $this_method_vars['reseth'] = $reseth; @@ -19998,11 +22099,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $tstart = substr($pagebuff, 0, $this->cntmrk[$this->page]); $tend = substr($pagebuff, $this->cntmrk[$this->page]); // add line start to current page - $yshift = $minstartliney - $this->y; + $yshift = ($minstartliney - $this->y); if ($fontaligned) { $yshift += ($curfontsize / $this->k); } - $try = sprintf('1 0 0 1 0 %.3F cm', ($yshift * $this->k)); + $try = sprintf('1 0 0 1 0 %F cm', ($yshift * $this->k)); $this->setPageBuffer($this->page, $tstart."\nq\n".$try."\n".$linebeg."\nQ\n".$tend); // shift the annotations and links if (isset($this->PageAnnots[$this->page])) { @@ -20040,7 +22141,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $fontsize = isset($dom[$key]['fontsize']) ? $dom[$key]['fontsize'] : $curfontsize; $fontascent = $this->getFontAscent($fontname, $fontstyle, $fontsize); $fontdescent = $this->getFontDescent($fontname, $fontstyle, $fontsize); - if ( ($fontname != $curfontname) OR ($fontstyle != $curfontstyle) OR ($fontsize != $curfontsize) + if (($fontname != $curfontname) OR ($fontstyle != $curfontstyle) OR ($fontsize != $curfontsize) OR ($this->cell_height_ratio != $dom[$key]['line-height']) OR ($dom[$key]['tag'] AND $dom[$key]['opening'] AND ($dom[$key]['value'] == 'li')) ) { if (($key < ($maxel - 1)) AND ( @@ -20064,8 +22165,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $tstart = substr($pagebuff, 0, $this->cntmrk[$this->page]); $tend = substr($pagebuff, $this->cntmrk[$this->page]); // add line start to current page - $yshift = $minstartliney - $this->y; - $try = sprintf('1 0 0 1 0 %.3F cm', ($yshift * $this->k)); + $yshift = ($minstartliney - $this->y); + $try = sprintf('1 0 0 1 0 %F cm', ($yshift * $this->k)); $this->setPageBuffer($this->page, $tstart."\nq\n".$try."\n".$linebeg."\nQ\n".$tend); // shift the annotations and links if (isset($this->PageAnnots[$this->page])) { @@ -20092,10 +22193,19 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $dom[$key]['line-height'] = $this->cell_height_ratio; } if (!$dom[$key]['block']) { - $this->y += (((($curfontsize * $this->cell_height_ratio ) - ($fontsize * $dom[$key]['line-height'])) / $this->k) + $curfontascent - $fontascent - $curfontdescent + $fontdescent) / 2; + if (!(isset($dom[($key + 1)]) AND $dom[($key + 1)]['tag'] AND (!$dom[($key + 1)]['opening']) AND ($dom[($key + 1)]['value'] != 'li') AND $dom[$key]['tag'] AND (!$dom[$key]['opening']))) { + $this->y += (((($curfontsize * $this->cell_height_ratio) - ($fontsize * $dom[$key]['line-height'])) / $this->k) + $curfontascent - $fontascent - $curfontdescent + $fontdescent) / 2; + } if (($dom[$key]['value'] != 'sup') AND ($dom[$key]['value'] != 'sub')) { - $minstartliney = min($this->y, $minstartliney); - $maxbottomliney = max(($this->y + (($fontsize * $this->cell_height_ratio) / $this->k)), $maxbottomliney); + $current_line_align_data = array($key, $minstartliney, $maxbottomliney); + if (isset($line_align_data) AND (($line_align_data[0] == ($key - 1)) OR (($line_align_data[0] == ($key - 2)) AND (isset($dom[($key - 1)])) AND (preg_match('/^([\s]+)$/', $dom[($key - 1)]['value']) > 0)))) { + $minstartliney = min($this->y, $line_align_data[1]); + $maxbottomliney = max(($this->y + (($fontsize * $this->cell_height_ratio) / $this->k)), $line_align_data[2]); + } else { + $minstartliney = min($this->y, $minstartliney); + $maxbottomliney = max(($this->y + (($fontsize * $this->cell_height_ratio) / $this->k)), $maxbottomliney); + } + $line_align_data = $current_line_align_data; } } $this->cell_height_ratio = $dom[$key]['line-height']; @@ -20152,7 +22262,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $fontaligned = false; // we are at the beginning of a new line if (isset($startlinex)) { - $yshift = $minstartliney - $startliney; + $yshift = ($minstartliney - $startliney); if (($yshift > 0) OR ($this->page > $startlinepage)) { $yshift = 0; } @@ -20314,7 +22424,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: if (($stroffset !== false) AND ($stroffset <= $strpiece[2][1])) { // set offset to the end of string section $offset = strpos($pmid, ')]', $stroffset); - while (($offset !== false) AND ($pmid{($offset - 1)} == '\\')) { + while (($offset !== false) AND ($pmid[($offset - 1)] == '\\')) { $offset = strpos($pmid, ')]', ($offset + 1)); } if ($offset === false) { @@ -20333,7 +22443,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: if ((($epsposbeg > 0) AND ($epsposend > 0) AND ($offset > $epsposbeg) AND ($offset < $epsposend)) OR (($epsposbeg === false) AND ($epsposend > 0) AND ($offset < $epsposend))) { // shift EPS images - $trx = sprintf('1 0 0 1 %.3F 0 cm', $spacew); + $trx = sprintf('1 0 0 1 %F 0 cm', $spacew); $epsposbeg = strpos($pmid, 'q'.$this->epsmarker, ($prev_epsposbeg - 6)); $pmid_b = substr($pmid, 0, $epsposbeg); $pmid_m = substr($pmid, $epsposbeg, ($epsposend - $epsposbeg)); @@ -20365,7 +22475,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: // justify block $pmid = preg_replace_callback('/([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s]('.$strpiece[2][0].')([\s]*)/x', create_function('$matches', 'global $spacew; - $newx = sprintf("%.2F",(floatval($matches[1]) + $spacew)); + $newx = sprintf("%F",(floatval($matches[1]) + $spacew)); return "".$newx." ".$matches[2]." x*#!#*x".$matches[3].$matches[4];'), $pmid, 1); break; } @@ -20407,8 +22517,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } $pmid = preg_replace_callback('/('.$xmatches[1].')[\s]('.$xmatches[2].')[\s]('.$xmatches[3].')[\s]('.$strpiece[1][0].')[\s](re)([\s]*)/x', create_function('$matches', 'global $x_diff, $w_diff; - $newx = sprintf("%.2F",(floatval($matches[1]) + $x_diff)); - $neww = sprintf("%.2F",(floatval($matches[3]) + $w_diff)); + $newx = sprintf("%F",(floatval($matches[1]) + $x_diff)); + $neww = sprintf("%F",(floatval($matches[3]) + $w_diff)); return "".$newx." ".$matches[2]." ".$neww." ".$matches[4]." x*#!#*x".$matches[5].$matches[6];'), $pmid, 1); break; } @@ -20419,9 +22529,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: // justify block $pmid = preg_replace_callback('/('.$xmatches[1].')[\s]('.$xmatches[2].')[\s]('.$xmatches[3].')[\s]('.$xmatches[4].')[\s]('.$xmatches[5].')[\s]('.$strpiece[1][0].')[\s](c)([\s]*)/x', create_function('$matches', 'global $spacew; - $newx1 = sprintf("%.3F",(floatval($matches[1]) + $spacew)); - $newx2 = sprintf("%.3F",(floatval($matches[3]) + $spacew)); - $newx3 = sprintf("%.3F",(floatval($matches[5]) + $spacew)); + $newx1 = sprintf("%F",(floatval($matches[1]) + $spacew)); + $newx2 = sprintf("%F",(floatval($matches[3]) + $spacew)); + $newx3 = sprintf("%F",(floatval($matches[5]) + $spacew)); return "".$newx1." ".$matches[2]." ".$newx2." ".$matches[4]." ".$newx3." ".$matches[6]." x*#!#*x".$matches[7].$matches[8];'), $pmid, 1); break; } @@ -20473,7 +22583,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: create_function('$matches', 'global $spacew; $matches[1] = str_replace("#!#OP#!#", "(", $matches[1]); $matches[1] = str_replace("#!#CP#!#", ")", $matches[1]); - return "[(".str_replace(chr(0).chr(32), ") ".sprintf("%.3F", $spacew)." (", $matches[1]).")]";'), $pmidtemp); + return "[(".str_replace(chr(0).chr(32), ") ".sprintf("%F", $spacew)." (", $matches[1]).")]";'), $pmidtemp); if ($this->inxobj) { // we are inside an XObject template $this->xobjects[$this->xobjid]['outdata'] = $pstart."\n".$pmid."\n".$pend; @@ -20487,7 +22597,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: // word spacing (Tw) is affected by stretching $spacewidth /= ($this->font_stretching / 100); } - $rs = sprintf('%.3F Tw', $spacewidth); + $rs = sprintf('%F Tw', $spacewidth); $pmid = preg_replace("/\[\(/x", $rs.' [(', $pmid); if ($this->inxobj) { // we are inside an XObject template @@ -20502,7 +22612,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } // end if $startlinex if (($t_x != 0) OR ($yshift < 0)) { // shift the line - $trx = sprintf('1 0 0 1 %.3F %.3F cm', ($t_x * $this->k), ($yshift * $this->k)); + $trx = sprintf('1 0 0 1 %F %F cm', ($t_x * $this->k), ($yshift * $this->k)); $pstart .= "\nq\n".$trx."\n".$pmid."\nQ\n"; $endlinepos = strlen($pstart); if ($this->inxobj) { @@ -20967,9 +23077,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $nextstr = preg_split('/'.$this->re_space['p'].'+/'.$this->re_space['m'], $dom[$nkey]['value']); if (isset($nextstr[0]) AND $same_textdir) { $wadj += $this->GetStringWidth($nextstr[0], $tmp_fontname, $tmp_fontstyle, $tmp_fontsize); - } - if (isset($nextstr[1])) { - $write_block = false; + if (isset($nextstr[1])) { + $write_block = false; + } } } ++$nkey; @@ -20982,6 +23092,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: if ($numblks > 1) { // try to split on blank spaces $wadj = ($cwa - $strlinelen + $this->GetStringWidth($nextstr[($numblks - 1)])); + } else { + // set the entire block on new line + $wadj = $this->GetStringWidth($nextstr[0]); } } // check for reversed text direction @@ -21056,7 +23169,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } // end for each $key // align the last line if (isset($startlinex)) { - $yshift = $minstartliney - $startliney; + $yshift = ($minstartliney - $startliney); if (($yshift > 0) OR ($this->page > $startlinepage)) { $yshift = 0; } @@ -21166,7 +23279,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } // end if startlinex if (($t_x != 0) OR ($yshift < 0)) { // shift the line - $trx = sprintf('1 0 0 1 %.3F %.3F cm', ($t_x * $this->k), ($yshift * $this->k)); + $trx = sprintf('1 0 0 1 %F %F cm', ($t_x * $this->k), ($yshift * $this->k)); $pstart .= "\nq\n".$trx."\n".$pmid."\nQ\n"; $endlinepos = strlen($pstart); if ($this->inxobj) { @@ -21191,6 +23304,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } } $this->y -= $yshift; + $yshift = 0; } } // restore previous values @@ -21345,23 +23459,33 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } case 'img': { if (isset($tag['attribute']['src'])) { - // replace relative path with real server path - if (($tag['attribute']['src'][0] == '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) { - $findroot = strpos($tag['attribute']['src'], $_SERVER['DOCUMENT_ROOT']); - if (($findroot === false) OR ($findroot > 1)) { - if (substr($_SERVER['DOCUMENT_ROOT'], -1) == '/') { - $tag['attribute']['src'] = substr($_SERVER['DOCUMENT_ROOT'], 0, -1).$tag['attribute']['src']; - } else { - $tag['attribute']['src'] = $_SERVER['DOCUMENT_ROOT'].$tag['attribute']['src']; + if ($tag['attribute']['src']{0} === '@') { + // data stream + $tag['attribute']['src'] = '@'.base64_decode(substr($tag['attribute']['src'], 1)); + $type = ''; + } else { + // check for images without protocol + if (preg_match('%^/{2}%', $tag['attribute']['src'])) { + $tag['attribute']['src'] = 'http:'.$tag['attribute']['src']; + } + // replace relative path with real server path + if (($tag['attribute']['src'][0] == '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) { + $findroot = strpos($tag['attribute']['src'], $_SERVER['DOCUMENT_ROOT']); + if (($findroot === false) OR ($findroot > 1)) { + if (substr($_SERVER['DOCUMENT_ROOT'], -1) == '/') { + $tag['attribute']['src'] = substr($_SERVER['DOCUMENT_ROOT'], 0, -1).$tag['attribute']['src']; + } else { + $tag['attribute']['src'] = $_SERVER['DOCUMENT_ROOT'].$tag['attribute']['src']; + } } } - } - $tag['attribute']['src'] = urldecode($tag['attribute']['src']); - $type = $this->getImageFileType($tag['attribute']['src']); - $testscrtype = @parse_url($tag['attribute']['src']); - if (!isset($testscrtype['query']) OR empty($testscrtype['query'])) { - // convert URL to server path - $tag['attribute']['src'] = str_replace(K_PATH_URL, K_PATH_MAIN, $tag['attribute']['src']); + $tag['attribute']['src'] = htmlspecialchars_decode(urldecode($tag['attribute']['src'])); + $type = $this->getImageFileType($tag['attribute']['src']); + $testscrtype = @parse_url($tag['attribute']['src']); + if (!isset($testscrtype['query']) OR empty($testscrtype['query'])) { + // convert URL to server path + $tag['attribute']['src'] = str_replace(K_PATH_URL, K_PATH_MAIN, $tag['attribute']['src']); + } } if (!isset($tag['width'])) { $tag['width'] = 0; @@ -21629,6 +23753,22 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } else { $checked = false; } + if (isset($tag['align'])) { + switch ($tag['align']) { + case 'C': { + $opt['q'] = 1; + break; + } + case 'R': { + $opt['q'] = 2; + break; + } + case 'L': + default: { + break; + } + } + } switch ($tag['attribute']['type']) { case 'text': { if (isset($value)) { @@ -22262,7 +24402,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: break; } case 'sub': { - $this->SetXY($this->GetX(), $this->GetY() - ((0.3 * $parent['fontsize'])/$this->k)); + $this->SetXY($this->GetX(), $this->GetY() - ((0.3 * $parent['fontsize']) / $this->k)); break; } case 'div': { @@ -22755,7 +24895,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: /** * Convert HTML string containing value and unit of measure to user's units or points. - * @param $formval (string) string containing values and unit + * @param $htmlval (string) string containing values and unit * @param $refsize (string) reference value in points * @param $defaultunit (string) default unit (can be one of the following: %, em, ex, px, in, mm, pc, pt). * @param $points (boolean) if true returns points, otherwise returns value in user's units @@ -22763,7 +24903,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: * @public * @since 4.4.004 (2008-12-10) */ - public function getHTMLUnitToUnits($formval, $refsize=1, $defaultunit='px', $points=false) { + public function getHTMLUnitToUnits($htmlval, $refsize=1, $defaultunit='px', $points=false) { $supportedunits = array('%', 'em', 'ex', 'px', 'in', 'cm', 'mm', 'pc', 'pt'); $retval = 0; $value = 0; @@ -22775,11 +24915,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: if (in_array($defaultunit, $supportedunits)) { $unit = $defaultunit; } - if (is_numeric($formval)) { - $value = floatval($formval); - } elseif (preg_match('/([0-9\.\-\+]+)/', $formval, $mnum)) { + if (is_numeric($htmlval)) { + $value = floatval($htmlval); + } elseif (preg_match('/([0-9\.\-\+]+)/', $htmlval, $mnum)) { $value = floatval($mnum[1]); - if (preg_match('/([a-z%]+)/', $formval, $munit)) { + if (preg_match('/([a-z%]+)/', $htmlval, $munit)) { if (in_array($munit[1], $supportedunits)) { $unit = $munit[1]; } @@ -23505,7 +25645,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $this->endPage(); } // move all page-related states - $tmppage = $this->pages[$frompage]; + $tmppage = $this->getPageBuffer($frompage); $tmppagedim = $this->pagedim[$frompage]; $tmppagelen = $this->pagelen[$frompage]; $tmpintmrk = $this->intmrk[$frompage]; @@ -23540,7 +25680,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: for ($i = $frompage; $i > $topage; --$i) { $j = $i - 1; // shift pages down - $this->pages[$i] = $this->pages[$j]; + $this->setPageBuffer($i, $this->getPageBuffer($j)); $this->pagedim[$i] = $this->pagedim[$j]; $this->pagelen[$i] = $this->pagelen[$j]; $this->intmrk[$i] = $this->intmrk[$j]; @@ -23574,7 +25714,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $this->currpagegroup = $i; } } - $this->pages[$topage] = $tmppage; + $this->setPageBuffer($topage, $tmppage); $this->pagedim[$topage] = $tmppagedim; $this->pagelen[$topage] = $tmppagelen; $this->intmrk[$topage] = $tmpintmrk; @@ -23604,7 +25744,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $tmpoutlines = $this->outlines; foreach ($tmpoutlines as $key => $outline) { if (($outline['p'] >= $topage) AND ($outline['p'] < $frompage)) { - $this->outlines[$key]['p'] = $outline['p'] + 1; + $this->outlines[$key]['p'] = ($outline['p'] + 1); } elseif ($outline['p'] == $frompage) { $this->outlines[$key]['p'] = $topage; } @@ -23613,7 +25753,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $tmpdests = $this->dests; foreach ($tmpdests as $key => $dest) { if (($dest['p'] >= $topage) AND ($dest['p'] < $frompage)) { - $this->dests[$key]['p'] = $dest['p'] + 1; + $this->dests[$key]['p'] = ($dest['p'] + 1); } elseif ($dest['p'] == $frompage) { $this->dests[$key]['p'] = $topage; } @@ -23622,7 +25762,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $tmplinks = $this->links; foreach ($tmplinks as $key => $link) { if (($link[0] >= $topage) AND ($link[0] < $frompage)) { - $this->links[$key][0] = $link[0] + 1; + $this->links[$key][0] = ($link[0] + 1); } elseif ($link[0] == $frompage) { $this->links[$key][0] = $topage; } @@ -23695,7 +25835,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: for ($i = $page; $i < $this->numpages; ++$i) { $j = $i + 1; // shift pages - $this->pages[$i] = $this->pages[$j]; + $this->setPageBuffer($i, $this->getPageBuffer($j)); $this->pagedim[$i] = $this->pagedim[$j]; $this->pagelen[$i] = $this->pagelen[$j]; $this->intmrk[$i] = $this->intmrk[$j]; @@ -23836,7 +25976,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: // copy all page-related states ++$this->numpages; $this->page = $this->numpages; - $this->pages[$this->page] = $this->pages[$page]; + $this->setPageBuffer($this->page, $this->getPageBuffer($page)); $this->pagedim[$this->page] = $this->pagedim[$page]; $this->pagelen[$this->page] = $this->pagelen[$page]; $this->intmrk[$this->page] = $this->intmrk[$page]; @@ -23884,6 +26024,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: /** * Output a Table of Content Index (TOC). + * This method must be called after all Bookmarks were set. * Before calling this method you have to open the page using the addTOCPage() method. * After calling this method you have to call endTOCPage() to close the TOC page. * You can override this method to achieve different styles. @@ -23904,11 +26045,13 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $fontstyle = $this->FontStyle; $w = $this->w - $this->lMargin - $this->rMargin; $spacer = $this->GetStringWidth(chr(32)) * 4; - $page_first = $this->getPage(); $lmargin = $this->lMargin; $rmargin = $this->rMargin; $x_start = $this->GetX(); + $page_first = $this->page; $current_page = $this->page; + $page_fill_start = false; + $page_fill_end = false; $current_column = $this->current_column; if ($this->empty_string($numbersfont)) { $numbersfont = $this->default_monospaced_font; @@ -23926,7 +26069,12 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } $this->SetFont($numbersfont, $fontstyle, $fontsize); $numwidth = $this->GetStringWidth('00000'); + $maxpage = 0; //used for pages on attached documents foreach ($this->outlines as $key => $outline) { + // check for extra pages (used for attachments) + if (($this->page > $page_first) AND ($outline['p'] >= $this->numpages)) { + $outline['p'] += ($this->page - $page_first); + } if ($this->rtl) { $aligntext = 'R'; $alignnum = 'L'; @@ -23935,10 +26083,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $alignnum = 'R'; } if ($outline['l'] == 0) { - $this->SetFont($fontfamily, $fontstyle.'B', $fontsize); + $this->SetFont($fontfamily, $outline['s'].'B', $fontsize); } else { - $this->SetFont($fontfamily, $fontstyle, $fontsize - $outline['l']); + $this->SetFont($fontfamily, $outline['s'], $fontsize - $outline['l']); } + $this->SetTextColorArray($outline['c']); // check for page break $this->checkPageBreak((2 * $this->FontSize * $this->cell_height_ratio)); // set margins and X position @@ -23990,6 +26139,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: if ($this->isUnicodeFont()) { $pagenum = '{'.$pagenum.'}'; } + $maxpage = max($maxpage, $outline['p']); } $fw = ($tw - $this->GetStringWidth($pagenum.$filler)); $numfills = floor($fw / $this->GetStringWidth($filler)); @@ -24007,18 +26157,37 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $this->Cell($tw, 0, $pagenum, 0, 1, $alignnum, 0, $link, 0); } $page_last = $this->getPage(); - $numpages = $page_last - $page_first + 1; + $numpages = ($page_last - $page_first + 1); + // account for booklet mode + if ($this->booklet) { + // check if a blank page is required before TOC + $page_fill_start = ((($page_first % 2) == 0) XOR (($page % 2) == 0)); + $page_fill_end = (!((($numpages % 2) == 0) XOR ($page_fill_start))); + if ($page_fill_start) { + // add a page at the end (to be moved before TOC) + $this->addPage(); + ++$page_last; + ++$numpages; + } + if ($page_fill_end) { + // add a page at the end + $this->addPage(); + ++$page_last; + ++$numpages; + } + } + $maxpage = max($maxpage, $page_last); if (!$this->empty_string($page)) { for ($p = $page_first; $p <= $page_last; ++$p) { // get page data $temppage = $this->getPageBuffer($p); - for ($n = 1; $n <= $this->numpages; ++$n) { + for ($n = 1; $n <= $maxpage; ++$n) { // update page numbers $a = '{#'.$n.'}'; // get page number aliases $pnalias = $this->getInternalPageNumberAliases($a); // calculate replacement number - if ($n >= $page) { + if (($n >= $page) AND ($n <= $this->numpages)) { $np = $n + $numpages; } else { $np = $n; @@ -24027,7 +26196,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $nu = $this->UTF8ToUTF16BE($na, false); // replace aliases with numbers foreach ($pnalias['u'] as $u) { - $sfill = str_repeat($filler, (strlen($u) - strlen($nu.' '))); + $sfill = str_repeat($filler, max(0, (strlen($u) - strlen($nu.' ')))); if ($this->rtl) { $nr = $nu.$this->UTF8ToUTF16BE(' '.$sfill); } else { @@ -24036,7 +26205,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $temppage = str_replace($u, $nr, $temppage); } foreach ($pnalias['a'] as $a) { - $sfill = str_repeat($filler, (strlen($a) - strlen($na.' '))); + $sfill = str_repeat($filler, max(0, (strlen($a) - strlen($na.' ')))); if ($this->rtl) { $nr = $na.' '.$sfill; } else { @@ -24050,6 +26219,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } // move pages $this->Bookmark($toc_name, 0, 0, $page_first, $style, $color); + if ($page_fill_start) { + $this->movePage($page_last, $page_first); + } for ($i = 0; $i < $numpages; ++$i) { $this->movePage($page_last, $page); } @@ -24058,6 +26230,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: /** * Output a Table Of Content Index (TOC) using HTML templates. + * This method must be called after all Bookmarks were set. * Before calling this method you have to open the page using the addTOCPage() method. * After calling this method you have to call endTOCPage() to close the TOC page. * @param $page (int) page number where this TOC should be inserted (leave empty for current page). @@ -24079,10 +26252,12 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $this->htmlLinkColorArray = array(); $this->htmlLinkFontStyle = ''; $page_first = $this->getPage(); + $page_fill_start = false; + $page_fill_end = false; // get the font type used for numbers in each template $current_font = $this->FontFamily; - foreach ($templates as $level => $form) { - $dom = $this->getHtmlDomArray($form); + foreach ($templates as $level => $html) { + $dom = $this->getHtmlDomArray($html); foreach ($dom as $key => $value) { if ($value['value'] == '#TOC_PAGE_NUMBER#') { $this->SetFont($dom[($key - 1)]['fontname']); @@ -24091,6 +26266,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } } $this->SetFont($current_font); + $maxpage = 0; //used for pages on attached documents foreach ($this->outlines as $key => $outline) { // get HTML template $row = $templates[$outline['l']]; @@ -24102,6 +26278,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: if ($templates['F'.$outline['l']]) { $pagenum = '{'.$pagenum.'}'; } + $maxpage = max($maxpage, $outline['p']); } // replace templates with current values $row = str_replace('#TOC_DESCRIPTION#', $outline['t'], $row); @@ -24116,12 +26293,31 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $this->htmlLinkFontStyle = $prev_htmlLinkFontStyle; // move TOC page and replace numbers $page_last = $this->getPage(); - $numpages = $page_last - $page_first + 1; + $numpages = ($page_last - $page_first + 1); + // account for booklet mode + if ($this->booklet) { + // check if a blank page is required before TOC + $page_fill_start = ((($page_first % 2) == 0) XOR (($page % 2) == 0)); + $page_fill_end = (!((($numpages % 2) == 0) XOR ($page_fill_start))); + if ($page_fill_start) { + // add a page at the end (to be moved before TOC) + $this->addPage(); + ++$page_last; + ++$numpages; + } + if ($page_fill_end) { + // add a page at the end + $this->addPage(); + ++$page_last; + ++$numpages; + } + } + $maxpage = max($maxpage, $page_last); if (!$this->empty_string($page)) { for ($p = $page_first; $p <= $page_last; ++$p) { // get page data $temppage = $this->getPageBuffer($p); - for ($n = 1; $n <= $this->numpages; ++$n) { + for ($n = 1; $n <= $maxpage; ++$n) { // update page numbers $a = '{#'.$n.'}'; // get page number aliases @@ -24167,6 +26363,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } // move pages $this->Bookmark($toc_name, 0, 0, $page_first, $style, $color); + if ($page_fill_start) { + $this->movePage($page_last, $page_first); + } for ($i = 0; $i < $numpages; ++$i) { $this->movePage($page_last, $page); } @@ -24364,7 +26563,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $xshift = $this->colxshift; // set X position of the current column by case $listindent = ($this->listindentlevel * $this->listindent); - $colpos = ($col * ($this->columns[$col]['w'] + $this->columns[$col]['s'])); + // calculate column X position + $colpos = 0; + for ($i = 0; $i < $col; ++$i) { + $colpos += ($this->columns[$i]['w'] + $this->columns[$i]['s']); + } if ($this->rtl) { $x = $this->w - $this->original_rMargin - $colpos; $this->rMargin = ($this->w - $x + $listindent); @@ -24502,8 +26705,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: * @param $dictionary (array) Array of words to be returned without applying the hyphenation algoritm. * @param $leftmin (int) Minimum number of character to leave on the left of the word without applying the hyphens. * @param $rightmin (int) Minimum number of character to leave on the right of the word without applying the hyphens. - * @param $charmin (int) Minimum word lenght to apply the hyphenation algoritm. - * @param $charmax (int) Maximum lenght of broken piece of word. + * @param $charmin (int) Minimum word length to apply the hyphenation algoritm. + * @param $charmax (int) Maximum length of broken piece of word. * @return array text with soft hyphens * @author Nicola Asuni * @since 4.9.012 (2010-04-12) @@ -24611,8 +26814,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: * @param $dictionary (array) Array of words to be returned without applying the hyphenation algoritm. * @param $leftmin (int) Minimum number of character to leave on the left of the word without applying the hyphens. * @param $rightmin (int) Minimum number of character to leave on the right of the word without applying the hyphens. - * @param $charmin (int) Minimum word lenght to apply the hyphenation algoritm. - * @param $charmax (int) Maximum lenght of broken piece of word. + * @param $charmin (int) Minimum word length to apply the hyphenation algoritm. + * @param $charmax (int) Maximum length of broken piece of word. * @return array text with soft hyphens * @author Nicola Asuni * @since 4.9.012 (2010-04-12) @@ -24767,7 +26970,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: * @since 5.3.002 (2010-06-07) */ public function setFontSubsetting($enable=true) { - $this->font_subsetting = $enable ? true : false; + if ($this->pdfa_mode) { + $this->font_subsetting = false; + } else { + $this->font_subsetting = $enable ? true : false; + } } /** @@ -24875,15 +27082,16 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: * An XObject Template is a PDF block that is a self-contained description of any sequence of graphics objects (including path objects, text objects, and sampled images). * An XObject Template may be painted multiple times, either on several pages or at several locations on the same page and produces the same results each time, subject only to the graphics state at the time it is invoked. * Note: X,Y coordinates will be reset to 0,0. - * @param $w (int) Template width in user units (empty string or zero = page width less margins) - * @param $h (int) Template height in user units (empty string or zero = page height less margins) + * @param $w (int) Template width in user units (empty string or zero = page width less margins). + * @param $h (int) Template height in user units (empty string or zero = page height less margins). + * @param $group (mixed) Set transparency group. Can be a boolean value or an array specifying optional parameters: 'CS' (solour space name), 'I' (boolean flag to indicate isolated group) and 'K' (boolean flag to indicate knockout group). * @return int the XObject Template ID in case of success or false in case of error. * @author Nicola Asuni * @public * @since 5.8.017 (2010-08-24) * @see endTemplate(), printTemplate() */ - public function startTemplate($w=0, $h=0) { + public function startTemplate($w=0, $h=0, $group=false) { if ($this->inxobj) { // we are already inside an XObject template return false; @@ -24904,6 +27112,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $this->xobjects[$this->xobjid]['images'] = array(); $this->xobjects[$this->xobjid]['fonts'] = array(); $this->xobjects[$this->xobjid]['annotations'] = array(); + $this->xobjects[$this->xobjid]['extgstates'] = array(); + $this->xobjects[$this->xobjid]['gradients'] = array(); + $this->xobjects[$this->xobjid]['spot_colors'] = array(); // set new environment $this->num_columns = 1; $this->current_column = 0; @@ -24930,6 +27141,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $this->rMargin = 0; $this->tMargin = 0; $this->bMargin = 0; + // set group mode + $this->xobjects[$this->xobjid]['group'] = $group; return $this->xobjid; } @@ -24966,7 +27179,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: * @param $h (int) Height in user units (zero = remaining page height) * @param $align (string) Indicates the alignment of the pointer next to template insertion relative to template height. The value can be:
    • T: top-right for LTR or top-left for RTL
    • M: middle-right for LTR or middle-left for RTL
    • B: bottom-right for LTR or bottom-left for RTL
    • N: next line
    * @param $palign (string) Allows to center or align the template on the current line. Possible values are:
    • L : left align
    • C : center
    • R : right align
    • '' : empty string : left for LTR or right for RTL
    - * @param $fitonpage (boolean) if true the template is resized to not exceed page dimensions. + * @param $fitonpage (boolean) If true the template is resized to not exceed page dimensions. * @author Nicola Asuni * @public * @since 5.8.017 (2010-08-24) @@ -25528,7 +27741,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: // scale and translate $e = $ox * $this->k * (1 - $svgscale_x); $f = ($this->h - $oy) * $this->k * (1 - $svgscale_y); - $this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', $svgscale_x, 0, 0, $svgscale_y, $e + $svgoffset_x, $f + $svgoffset_y)); + $this->_out(sprintf('%F %F %F %F %F %F cm', $svgscale_x, 0, 0, $svgscale_y, $e + $svgoffset_x, $f + $svgoffset_y)); // creates a new XML parser to be used by the other XML functions $this->parser = xml_parser_create('UTF-8'); // the following function allows to use parser inside object @@ -25773,7 +27986,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: */ protected function setSVGStyles($svgstyle, $prevsvgstyle, $x=0, $y=0, $w=1, $h=1, $clip_function='', $clip_params=array()) { $objstyle = ''; - $minlen = (0.01 / $this->k); // minimum acceptable lenght (3 point) + $minlen = (0.01 / $this->k); // minimum acceptable length (3 point) if (!isset($svgstyle['opacity'])) { return $objstyle; } @@ -25787,7 +28000,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } // opacity if ($svgstyle['opacity'] != 1) { - $this->SetAlpha($svgstyle['opacity']); + $this->setAlpha($svgstyle['opacity'], 'Normal', $svgstyle['opacity'], false); } // color $fill_color = $this->convertHTMLColorToDec($svgstyle['color']); @@ -25861,6 +28074,12 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: if (isset($gradient['coords'][4])) { $gradient['coords'][4] = $this->getHTMLUnitToUnits($gradient['coords'][4], 0, $this->svgunit, false); } + if ($w <= $minlen) { + $w = $minlen; + } + if ($h <= $minlen) { + $h = $minlen; + } // shift units if ($gradient['gradientUnits'] == 'objectBoundingBox') { // convert to SVG coordinate system @@ -25869,12 +28088,6 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $gradient['coords'][2] += $x; $gradient['coords'][3] += $y; } - if ($w <= $minlen) { - $w = $minlen; - } - if ($h <= $minlen) { - $h = $minlen; - } // calculate percentages $gradient['coords'][0] = ($gradient['coords'][0] - $x) / $w; $gradient['coords'][1] = ($gradient['coords'][1] - $y) / $h; @@ -25886,14 +28099,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } elseif ($gradient['mode'] == 'percentage') { foreach($gradient['coords'] as $key => $val) { $gradient['coords'][$key] = (intval($val) / 100); - } - } - // fix values - foreach($gradient['coords'] as $key => $val) { - if ($val < 0) { - $gradient['coords'][$key] = 0; - } elseif ($val > 1) { - $gradient['coords'][$key] = 1; + if ($val < 0) { + $gradient['coords'][$key] = 0; + } elseif ($val > 1) { + $gradient['coords'][$key] = 1; + } } } if (($gradient['type'] == 2) AND ($gradient['coords'][0] == $gradient['coords'][2]) AND ($gradient['coords'][1] == $gradient['coords'][3])) { @@ -25909,11 +28119,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $gradient['coords'][3] = $tmp; // set transformation map for gradient if ($gradient['type'] == 3) { - // gradient is always circular + // circular gradient $cy = $this->h - $y - ($gradient['coords'][1] * ($w + $h)); - $this->_out(sprintf('%.3F 0 0 %.3F %.3F %.3F cm', $w*$this->k, $w*$this->k, $x*$this->k, $cy*$this->k)); + $this->_out(sprintf('%F 0 0 %F %F %F cm', $w*$this->k, $w*$this->k, $x*$this->k, $cy*$this->k)); } else { - $this->_out(sprintf('%.3F 0 0 %.3F %.3F %.3F cm', $w*$this->k, $h*$this->k, $x*$this->k, ($this->h-($y+$h))*$this->k)); + $this->_out(sprintf('%F 0 0 %F %F %F cm', $w*$this->k, $h*$this->k, $x*$this->k, ($this->h-($y+$h))*$this->k)); } if (count($gradient['stops']) > 1) { $this->Gradient($gradient['type'], $gradient['coords'], $gradient['stops'], array(), false); @@ -25921,7 +28131,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } elseif ($svgstyle['fill'] != 'none') { $fill_color = $this->convertHTMLColorToDec($svgstyle['fill']); if ($svgstyle['fill-opacity'] != 1) { - $this->SetAlpha($svgstyle['fill-opacity']); + $this->setAlpha($this->alpha['CA'], 'Normal', $svgstyle['fill-opacity'], false); } $this->SetFillColorArray($fill_color); if ($svgstyle['fill-rule'] == 'evenodd') { @@ -25932,6 +28142,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } // stroke if ($svgstyle['stroke'] != 'none') { + if ($svgstyle['stroke-opacity'] != 1) { + $this->setAlpha($svgstyle['stroke-opacity'], 'Normal', $this->alpha['ca'], false); + } $stroke_style = array( 'color' => $this->convertHTMLColorToDec($svgstyle['stroke']), 'width' => $this->getHTMLUnitToUnits($svgstyle['stroke-width'], 0, $this->svgunit, false), @@ -26072,7 +28285,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $ymin = 2147483647; $ymax = 0; $relcoord = false; - $minlen = (0.01 / $this->k); // minimum acceptable lenght (3 point) + $minlen = (0.01 / $this->k); // minimum acceptable length (3 point) + $firstcmd = true; // used to print first point // draw curve pieces foreach ($paths as $key => $val) { // get curve type @@ -26110,9 +28324,10 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $x = $cp + $xoffset; } else { $y = $cp + $yoffset; - if ((abs($x0 - $x) >= $minlen) OR (abs($y0 - $y) >= $minlen)) { + if ($firstcmd OR (abs($x0 - $x) >= $minlen) OR (abs($y0 - $y) >= $minlen)) { if ($ck == 1) { $this->_outPoint($x, $y); + $firstcmd = false; } else { $this->_outLine($x, $y); } @@ -26229,7 +28444,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } break; } - case 'Q': { // quadratic B�zier curveto + case 'Q': { // quadratic Bzier curveto foreach ($params as $ck => $cp) { $params[$ck] = $cp; if ((($ck + 1) % 4) == 0) { @@ -26255,7 +28470,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } break; } - case 'T': { // shorthand/smooth quadratic B�zier curveto + case 'T': { // shorthand/smooth quadratic Bzier curveto foreach ($params as $ck => $cp) { $params[$ck] = $cp; if (($ck % 2) != 0) { @@ -26383,6 +28598,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: break; } } + $firstcmd = false; } // end foreach if (!empty($op)) { $this->_out($op); @@ -26520,6 +28736,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: break; } case 'linearGradient': { + if ($this->pdfa_mode) { + break; + } if (!isset($attribs['id'])) { $attribs['id'] = 'GR_'.(count($this->svggradients) + 1); } @@ -26553,6 +28772,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: break; } case 'radialGradient': { + if ($this->pdfa_mode) { + break; + } if (!isset($attribs['id'])) { $attribs['id'] = 'GR_'.(count($this->svggradients) + 1); } @@ -26794,26 +29016,31 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $this->StartTransform(); $this->SVGTransform($tm); $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h); - // fix image path - if (!$this->empty_string($this->svgdir) AND (($img{0} == '.') OR (basename($img) == $img))) { - // replace relative path with full server path - $img = $this->svgdir.'/'.$img; - } - if (($img[0] == '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) { - $findroot = strpos($img, $_SERVER['DOCUMENT_ROOT']); - if (($findroot === false) OR ($findroot > 1)) { - if (substr($_SERVER['DOCUMENT_ROOT'], -1) == '/') { - $img = substr($_SERVER['DOCUMENT_ROOT'], 0, -1).$img; - } else { - $img = $_SERVER['DOCUMENT_ROOT'].$img; + if (preg_match('/^data:image\/[^;]+;base64,/', $img, $m) > 0) { + // embedded image encoded as base64 + $img = '@'.base64_decode(substr($img, strlen($m[0]))); + } else { + // fix image path + if (!$this->empty_string($this->svgdir) AND (($img{0} == '.') OR (basename($img) == $img))) { + // replace relative path with full server path + $img = $this->svgdir.'/'.$img; + } + if (($img[0] == '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) { + $findroot = strpos($img, $_SERVER['DOCUMENT_ROOT']); + if (($findroot === false) OR ($findroot > 1)) { + if (substr($_SERVER['DOCUMENT_ROOT'], -1) == '/') { + $img = substr($_SERVER['DOCUMENT_ROOT'], 0, -1).$img; + } else { + $img = $_SERVER['DOCUMENT_ROOT'].$img; + } } } - } - $img = urldecode($img); - $testscrtype = @parse_url($img); - if (!isset($testscrtype['query']) OR empty($testscrtype['query'])) { - // convert URL to server path - $img = str_replace(K_PATH_URL, K_PATH_MAIN, $img); + $img = urldecode($img); + $testscrtype = @parse_url($img); + if (!isset($testscrtype['query']) OR empty($testscrtype['query'])) { + // convert URL to server path + $img = str_replace(K_PATH_URL, K_PATH_MAIN, $img); + } } $this->Image($img, $x, $y, $w, $h); $this->StopTransform(); @@ -26913,9 +29140,10 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: break; } // print text - $text = $this->stringTrim($this->svgtext); + $text = $this->svgtext; + //$text = $this->stringTrim($text); + $textlen = $this->GetStringWidth($text); if ($this->svgtextmode['text-anchor'] != 'start') { - $textlen = $this->GetStringWidth($text); // check if string is RTL text if ($this->svgtextmode['text-anchor'] == 'end') { if ($this->svgtextmode['rtl']) { @@ -26934,7 +29162,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $textrendermode = $this->textrendermode; $textstrokewidth = $this->textstrokewidth; $this->setTextRenderingMode($this->svgtextmode['stroke'], true, false); - $this->Cell(0, 0, $text, 0, 0, '', false, '', 0, false, 'L', 'T'); + $this->Cell($textlen, 0, $text, 0, 0, '', false, '', 0, false, 'L', 'T'); // restore previous rendering mode $this->textrendermode = $textrendermode; $this->textstrokewidth = $textstrokewidth; diff --git a/htdocs/includes/tcpdf/tcpdf_filters.php b/htdocs/includes/tcpdf/tcpdf_filters.php new file mode 100644 index 00000000000..f39a8fe9d9e --- /dev/null +++ b/htdocs/includes/tcpdf/tcpdf_filters.php @@ -0,0 +1,477 @@ +. +// +// See LICENSE.TXT file for more information. +// ------------------------------------------------------------------- +// +// Description : This is a PHP class for decoding common PDF filters (PDF 32000-2008 - 7.4 Filters). +// +//============================================================+ + +/** + * @file + * This is a PHP class for decoding common PDF filters (PDF 32000-2008 - 7.4 Filters).
    + * @package com.tecnick.tcpdf + * @author Nicola Asuni + * @version 1.0.000 + */ + +/** + * @class TCPDF_FILTERS + * This is a PHP class for decoding common PDF filters (PDF 32000-2008 - 7.4 Filters).
    + * @package com.tecnick.tcpdf + * @brief This is a PHP class for decoding common PDF filters. + * @version 1.0.000 + * @author Nicola Asuni - info@tecnick.com + */ +class TCPDF_FILTERS { + + /** + * Define a list of available filter decoders. + * @private + */ + private $available_filters = array('ASCIIHexDecode', 'ASCII85Decode', 'LZWDecode', 'FlateDecode', 'RunLengthDecode'); + +// ----------------------------------------------------------------------------- + + /** + * Get a list of available decoding filters. + * @return (array) Array of available filter decoders. + * @public + * @since 1.0.000 (2011-05-23) + */ + public function getAvailableFilters() { + return $this->available_filters; + } + + /** + * Decode data using the specified filter type. + * @param $filter (string) Filter name. + * @param $data (string) Data to decode. + * @return Decoded data string. + * @public + * @since 1.0.000 (2011-05-23) + */ + public function decodeFilter($filter, $data) { + switch ($filter) { + case 'ASCIIHexDecode': { + return $this->decodeFilterASCIIHexDecode($data); + break; + } + case 'ASCII85Decode': { + return $this->decodeFilterASCII85Decode($data); + break; + } + case 'LZWDecode': { + return $this->decodeFilterLZWDecode($data); + break; + } + case 'FlateDecode': { + return $this->decodeFilterFlateDecode($data); + break; + } + case 'RunLengthDecode': { + return $this->decodeFilterRunLengthDecode($data); + break; + } + case 'CCITTFaxDecode': { + return $this->decodeFilterCCITTFaxDecode($data); + break; + } + case 'JBIG2Decode': { + return $this->decodeFilterJBIG2Decode($data); + break; + } + case 'DCTDecode': { + return $this->decodeFilterDCTDecode($data); + break; + } + case 'JPXDecode': { + return $this->decodeFilterJPXDecode($data); + break; + } + case 'Crypt': { + return $this->decodeFilterCrypt($data); + break; + } + default: { + return decodeFilterStandard($data); + break; + } + } + } + + // --- FILTERS (PDF 32000-2008 - 7.4 Filters) ------------------------------ + + /** + * Standard + * Default decoding filter (leaves data unchanged). + * @param $data (string) Data to decode. + * @return Decoded data string. + * @public + * @since 1.0.000 (2011-05-23) + */ + public function decodeFilterStandard($data) { + return $data; + } + + /** + * ASCIIHexDecode + * Decodes data encoded in an ASCII hexadecimal representation, reproducing the original binary data. + * @param $data (string) Data to decode. + * @return Decoded data string. + * @public + * @since 1.0.000 (2011-05-23) + */ + public function decodeFilterASCIIHexDecode($data) { + // intialize string to return + $decoded = ''; + // all white-space characters shall be ignored + $data = preg_replace('/[\s]/', '', $data); + // check for EOD character: GREATER-THAN SIGN (3Eh) + $eod = strpos($data, '>'); + if ($eod !== false) { + // remove EOD and extra data (if any) + $data = substr($data, 0, $eod); + $eod = true; + } + // get data length + $data_length = strlen($data); + if (($data_length % 2) != 0) { + // odd number of hexadecimal digits + if ($eod) { + // EOD shall behave as if a 0 (zero) followed the last digit + $data = substr($data, 0, -1).'0'.substr($data, -1); + } else { + $this->Error('decodeASCIIHex: invalid code'); + } + } + // check for invalid characters + if (preg_match('/[^a-fA-F\d]/', $data) > 0) { + $this->Error('decodeASCIIHex: invalid code'); + } + // get one byte of binary data for each pair of ASCII hexadecimal digits + $decoded = pack('H*', $data); + return $decoded; + } + + /** + * ASCII85Decode + * Decodes data encoded in an ASCII base-85 representation, reproducing the original binary data. + * @param $data (string) Data to decode. + * @return Decoded data string. + * @public + * @since 1.0.000 (2011-05-23) + */ + public function decodeFilterASCII85Decode($data) { + // intialize string to return + $decoded = ''; + // all white-space characters shall be ignored + $data = preg_replace('/[\s]/', '', $data); + // remove start sequence 2-character sequence <~ (3Ch)(7Eh) + if (strpos($data, '<~') !== false) { + // remove EOD and extra data (if any) + $data = substr($data, 2); + } + // check for EOD: 2-character sequence ~> (7Eh)(3Eh) + $eod = strpos($data, '~>'); + if ($eod !== false) { + // remove EOD and extra data (if any) + $data = substr($data, 0, $eod); + } + // data length + $data_length = strlen($data); + // check for invalid characters + if (preg_match('/[^\x21-\x75,\x74]/', $data) > 0) { + $this->Error('decodeASCII85: invalid code'); + } + // z sequence + $zseq = chr(0).chr(0).chr(0).chr(0); + // position inside a group of 4 bytes (0-3) + $group_pos = 0; + $tuple = 0; + $pow85 = array((85*85*85*85), (85*85*85), (85*85), 85, 1); + $last_pos = ($data_length - 1); + // for each byte + for ($i = 0; $i < $data_length; ++$i) { + // get char value + $char = ord($data[$i]); + if ($char == 122) { // 'z' + if ($group_pos == 0) { + $decoded .= $zseq; + } else { + $this->Error('decodeASCII85: invalid code'); + } + } else { + // the value represented by a group of 5 characters should never be greater than 2^32 - 1 + $tuple += (($char - 33) * $pow85[$group_pos]); + if ($group_pos == 4) { + $decoded .= chr($tuple >> 24).chr($tuple >> 16).chr($tuple >> 8).chr($tuple); + $tuple = 0; + $group_pos = 0; + } else { + ++$group_pos; + } + } + } + if ($group_pos > 1) { + $tuple += $pow85[($group_pos - 1)]; + } + // last tuple (if any) + switch ($group_pos) { + case 4: { + $decoded .= chr($tuple >> 24).chr($tuple >> 16).chr($tuple >> 8); + break; + } + case 3: { + $decoded .= chr($tuple >> 24).chr($tuple >> 16); + break; + } + case 2: { + $decoded .= chr($tuple >> 24); + break; + } + case 1: { + $this->Error('decodeASCII85: invalid code'); + break; + } + } + return $decoded; + } + + /** + * LZWDecode + * Decompresses data encoded using the LZW (Lempel-Ziv-Welch) adaptive compression method, reproducing the original text or binary data. + * @param $data (string) Data to decode. + * @return Decoded data string. + * @public + * @since 1.0.000 (2011-05-23) + */ + public function decodeFilterLZWDecode($data) { + // intialize string to return + $decoded = ''; + // data length + $data_length = strlen($data); + // convert string to binary string + $bitstring = ''; + for ($i = 0; $i < $data_length; ++$i) { + $bitstring .= sprintf('%08b', ord($data{$i})); + } + // get the number of bits + $data_length = strlen($bitstring); + // initialize code length in bits + $bitlen = 9; + // initialize dictionary index + $dix = 258; + // initialize the dictionary (with the first 256 entries). + $dictionary = array(); + for ($i = 0; $i < 256; ++$i) { + $dictionary[$i] = chr($i); + } + // previous val + $prev_index = 0; + // while we encounter EOD marker (257), read code_length bits + while (($data_length > 0) AND (($index = bindec(substr($bitstring, 0, $bitlen))) != 257)) { + // remove read bits from string + $bitstring = substr($bitstring, $bitlen); + // update number of bits + $data_length -= $bitlen; + if ($index == 256) { // clear-table marker + // reset code length in bits + $bitlen = 9; + // reset dictionary index + $dix = 258; + $prev_index = 256; + // reset the dictionary (with the first 256 entries). + $dictionary = array(); + for ($i = 0; $i < 256; ++$i) { + $dictionary[$i] = chr($i); + } + } elseif ($prev_index == 256) { + // first entry + $decoded .= $dictionary[$index]; + $prev_index = $index; + } else { + // check if index exist in the dictionary + if ($index < $dix) { + // index exist on dictionary + $decoded .= $dictionary[$index]; + $dic_val = $dictionary[$prev_index].$dictionary[$index]{0}; + // store current index + $prev_index = $index; + } else { + // index do not exist on dictionary + $dic_val = $dictionary[$prev_index].$dictionary[$prev_index]{0}; + $decoded .= $dic_val; + } + // update dictionary + $dictionary[$dix] = $dic_val; + ++$dix; + // change bit length by case + if ($dix == 2047) { + $bitlen = 12; + } elseif ($dix == 1023) { + $bitlen = 11; + } elseif ($dix == 511) { + $bitlen = 10; + } + } + } + return $decoded; + } + + /** + * FlateDecode + * Decompresses data encoded using the zlib/deflate compression method, reproducing the original text or binary data. + * @param $data (string) Data to decode. + * @return Decoded data string. + * @public + * @since 1.0.000 (2011-05-23) + */ + public function decodeFilterFlateDecode($data) { + // intialize string to return + $decoded = gzuncompress($data); + if ($decoded === false) { + $this->Error('decodeFlate: invalid code'); + } + return $decoded; + } + + /** + * RunLengthDecode + * Decompresses data encoded using a byte-oriented run-length encoding algorithm. + * @param $data (string) Data to decode. + * @public + * @since 1.0.000 (2011-05-23) + */ + public function decodeFilterRunLengthDecode($data) { + // intialize string to return + $decoded = ''; + // data length + $data_length = strlen($data); + $i = 0; + while($i < $data_length) { + // get current byte value + $byte = ord($data{$i}); + if ($byte == 128) { + // a length value of 128 denote EOD + break; + } elseif ($byte < 128) { + // if the length byte is in the range 0 to 127 + // the following length + 1 (1 to 128) bytes shall be copied literally during decompression + $decoded .= substr($data, ($i + 1), ($byte + 1)); + // move to next block + $i += ($byte + 2); + } else { + // if length is in the range 129 to 255, + // the following single byte shall be copied 257 - length (2 to 128) times during decompression + $decoded .= str_repeat($data{($i + 1)}, (257 - $byte)); + // move to next block + $i += 2; + } + } + return $decoded; + } + + /** + * CCITTFaxDecode (NOT IMPLEMETED) + * Decompresses data encoded using the CCITT facsimile standard, reproducing the original data (typically monochrome image data at 1 bit per pixel). + * @param $data (string) Data to decode. + * @return Decoded data string. + * @public + * @since 1.0.000 (2011-05-23) + */ + public function decodeFilterCCITTFaxDecode($data) { + return $data; + } + + /** + * JBIG2Decode (NOT IMPLEMETED) + * Decompresses data encoded using the JBIG2 standard, reproducing the original monochrome (1 bit per pixel) image data (or an approximation of that data). + * @param $data (string) Data to decode. + * @return Decoded data string. + * @public + * @since 1.0.000 (2011-05-23) + */ + public function decodeFilterJBIG2Decode($data) { + return $data; + } + + /** + * DCTDecode (NOT IMPLEMETED) + * Decompresses data encoded using a DCT (discrete cosine transform) technique based on the JPEG standard, reproducing image sample data that approximates the original data. + * @param $data (string) Data to decode. + * @return Decoded data string. + * @public + * @since 1.0.000 (2011-05-23) + */ + public function decodeFilterDCTDecode($data) { + return $data; + } + + /** + * JPXDecode (NOT IMPLEMETED) + * Decompresses data encoded using the wavelet-based JPEG2000 standard, reproducing the original image data. + * @param $data (string) Data to decode. + * @return Decoded data string. + * @public + * @since 1.0.000 (2011-05-23) + */ + public function decodeFilterJPXDecode($data) { + return $data; + } + + /** + * Crypt (NOT IMPLEMETED) + * Decrypts data encrypted by a security handler, reproducing the data as it was before encryption. + * @param $data (string) Data to decode. + * @return Decoded data string. + * @public + * @since 1.0.000 (2011-05-23) + */ + public function decodeFilterCrypt($data) { + return $data; + } + + // --- END FILTERS SECTION ------------------------------------------------- + + /** + * This method is automatically called in case of fatal error; it simply outputs the message and halts the execution. + * @param $msg (string) The error message + * @public + * @since 1.0.000 (2011-05-23) + */ + public function Error($msg) { + // exit program and print error + die('TCPDF_FILTERS ERROR: '.$msg); + } + +} // END OF TCPDF_FILTERS CLASS + +//============================================================+ +// END OF FILE +//============================================================+ diff --git a/htdocs/includes/tcpdf/tcpdf_parser.php b/htdocs/includes/tcpdf/tcpdf_parser.php new file mode 100644 index 00000000000..122676034d3 --- /dev/null +++ b/htdocs/includes/tcpdf/tcpdf_parser.php @@ -0,0 +1,501 @@ +. +// +// See LICENSE.TXT file for more information. +// ------------------------------------------------------------------- +// +// Description : This is a PHP class for parsing PDF documents. +// +//============================================================+ + +/** + * @file + * This is a PHP class for parsing PDF documents.
    + * @package com.tecnick.tcpdf + * @author Nicola Asuni + * @version 1.0.000 + */ + +// include class for decoding filters +require_once(dirname(__FILE__).'/tcpdf_filters.php'); + +/** + * @class TCPDF_PARSER + * This is a PHP class for parsing PDF documents.
    + * @package com.tecnick.tcpdf + * @brief This is a PHP class for parsing PDF documents.. + * @version 1.0.000 + * @author Nicola Asuni - info@tecnick.com + */ +class TCPDF_PARSER { + + /** + * Raw content of the PDF document. + * @private + */ + private $pdfdata = ''; + + /** + * XREF data. + * @protected + */ + protected $xref = array(); + + /** + * Array of PDF objects. + * @protected + */ + protected $objects = array(); + + /** + * Class object for decoding filters. + * @private + */ + private $FilterDecoders; + +// ----------------------------------------------------------------------------- + + /** + * Parse a PDF document an return an array of objects. + * @param $data (string) PDF data to parse. + * @public + * @since 1.0.000 (2011-05-24) + */ + public function __construct($data) { + if (empty($data)) { + $this->Error('Empty PDF data.'); + } + $this->pdfdata = $data; + // get length + $pdflen = strlen($this->pdfdata); + // initialize class for decoding filters + $this->FilterDecoders = new TCPDF_FILTERS(); + // get xref and trailer data + $this->xref = $this->getXrefData(); + // parse all document objects + $this->objects = array(); + foreach ($this->xref['xref'] as $obj => $offset) { + if (!isset($this->objects[$obj])) { + $this->objects[$obj] = $this->getIndirectObject($obj, $offset, true); + } + } + // release some memory + unset($this->pdfdata); + $this->pdfdata = ''; + } + + /** + * Return an array of parsed PDF document objects. + * @return (array) Array of parsed PDF document objects. + * @public + * @since 1.0.000 (2011-06-26) + */ + public function getParsedData() { + return array($this->xref, $this->objects); + } + + /** + * Get xref (cross-reference table) and trailer data from PDF document data. + * @param $offset (int) xref offset (if know). + * @param $xref (array) previous xref array (if any). + * @return Array containing xref and trailer data. + * @protected + * @since 1.0.000 (2011-05-24) + */ + protected function getXrefData($offset=0, $xref=array()) { + // find last startxref + if (preg_match_all('/[\r\n]startxref[\s]*[\r\n]+([0-9]+)[\s]*[\r\n]+%%EOF/i', $this->pdfdata, $matches, PREG_SET_ORDER, $offset) == 0) { + $this->Error('Unable to find startxref'); + } + $matches = array_pop($matches); + $startxref = $matches[1]; + // check xref position + if (strpos($this->pdfdata, 'xref', $startxref) != $startxref) { + $this->Error('Unable to find xref'); + } + // extract xref data (object indexes and offsets) + $offset = $startxref + 5; + // initialize object number + $obj_num = 0; + while (preg_match('/^([0-9]+)[\s]([0-9]+)[\s]?([nf]?)/im', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) { + $offset = (strlen($matches[0][0]) + $matches[0][1]); + if ($matches[3][0] == 'n') { + // create unique object index: [object number]_[generation number] + $index = $obj_num.'_'.intval($matches[2][0]); + // check if object already exist + if (!isset($xref['xref'][$index])) { + // store object offset position + $xref['xref'][$index] = intval($matches[1][0]); + } + ++$obj_num; + $offset += 2; + } elseif ($matches[3][0] == 'f') { + ++$obj_num; + $offset += 2; + } else { + // object number (index) + $obj_num = intval($matches[1][0]); + } + } + // get trailer data + if (preg_match('/trailer[\s]*<<(.*)>>[\s]*[\r\n]+startxref[\s]*[\r\n]+/isU', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) { + $trailer_data = $matches[1][0]; + if (!isset($xref['trailer'])) { + // get only the last updated version + $xref['trailer'] = array(); + // parse trailer_data + if (preg_match('/Size[\s]+([0-9]+)/i', $trailer_data, $matches) > 0) { + $xref['trailer']['size'] = intval($matches[1]); + } + if (preg_match('/Root[\s]+([0-9]+)[\s]+([0-9]+)[\s]+R/i', $trailer_data, $matches) > 0) { + $xref['trailer']['root'] = intval($matches[1]).'_'.intval($matches[2]); + } + if (preg_match('/Encrypt[\s]+([0-9]+)[\s]+([0-9]+)[\s]+R/i', $trailer_data, $matches) > 0) { + $xref['trailer']['encrypt'] = intval($matches[1]).'_'.intval($matches[2]); + } + if (preg_match('/Info[\s]+([0-9]+)[\s]+([0-9]+)[\s]+R/i', $trailer_data, $matches) > 0) { + $xref['trailer']['info'] = intval($matches[1]).'_'.intval($matches[2]); + } + if (preg_match('/ID[\s]*[\[][\s]*[<]([^>]*)[>][\s]*[<]([^>]*)[>]/i', $trailer_data, $matches) > 0) { + $xref['trailer']['id'] = array(); + $xref['trailer']['id'][0] = $matches[1]; + $xref['trailer']['id'][1] = $matches[2]; + } + } + if (preg_match('/Prev[\s]+([0-9]+)/i', $trailer_data, $matches) > 0) { + // get previous xref + $xref = getXrefData(substr($this->pdfdata, 0, $startxref), intval($matches[1]), $xref); + } + } else { + $this->Error('Unable to find trailer'); + } + return $xref; + } + + /** + * Get object type, raw value and offset to next object + * @param $offset (int) Object offset. + * @return array containing object type, raw value and offset to next object + * @protected + * @since 1.0.000 (2011-06-20) + */ + protected function getRawObject($offset=0) { + $objtype = ''; // object type to be returned + $objval = ''; // object value to be returned + // skip initial white space chars: \x00 null (NUL), \x09 horizontal tab (HT), \x0A line feed (LF), \x0C form feed (FF), \x0D carriage return (CR), \x20 space (SP) + $offset += strspn($this->pdfdata, "\x00\x09\x0a\x0c\x0d\x20", $offset); + // get first char + $char = $this->pdfdata{$offset}; + // get object type + switch ($char) { + case '%': { // \x25 PERCENT SIGN + // skip comment and search for next token + $next = strcspn($this->pdfdata, "\r\n", $offset); + if ($next > 0) { + $offset += $next; + return $this->getRawObject($this->pdfdata, $offset); + } + break; + } + case '/': { // \x2F SOLIDUS + // name object + $objtype = $char; + ++$offset; + if (preg_match('/^([^\x00\x09\x0a\x0c\x0d\x20\s\x28\x29\x3c\x3e\x5b\x5d\x7b\x7d\x2f\x25]+)/', substr($this->pdfdata, $offset, 256), $matches) == 1) { + $objval = $matches[1]; // unescaped value + $offset += strlen($objval); + } + break; + } + case '(': // \x28 LEFT PARENTHESIS + case ')': { // \x29 RIGHT PARENTHESIS + // literal string object + $objtype = $char; + ++$offset; + $strpos = $offset; + if ($char == '(') { + $open_bracket = 1; + while ($open_bracket > 0) { + if (!isset($this->pdfdata{$strpos})) { + break; + } + $ch = $this->pdfdata{$strpos}; + switch ($ch) { + case '\\': { // REVERSE SOLIDUS (5Ch) (Backslash) + // skip next character + ++$strpos; + break; + } + case '(': { // LEFT PARENHESIS (28h) + ++$open_bracket; + break; + } + case ')': { // RIGHT PARENTHESIS (29h) + --$open_bracket; + break; + } + } + ++$strpos; + } + $objval = substr($this->pdfdata, $offset, ($strpos - $offset - 1)); + $offset = $strpos; + } + break; + } + case '[': // \x5B LEFT SQUARE BRACKET + case ']': { // \x5D RIGHT SQUARE BRACKET + // array object + $objtype = $char; + ++$offset; + if ($char == '[') { + // get array content + $objval = array(); + do { + // get element + $element = $this->getRawObject($offset); + $offset = $element[2]; + $objval[] = $element; + } while ($element[0] != ']'); + // remove closing delimiter + array_pop($objval); + } + break; + } + case '<': // \x3C LESS-THAN SIGN + case '>': { // \x3E GREATER-THAN SIGN + if (isset($this->pdfdata{($offset + 1)}) AND ($this->pdfdata{($offset + 1)} == $char)) { + // dictionary object + $objtype = $char.$char; + $offset += 2; + if ($char == '<') { + // get array content + $objval = array(); + do { + // get element + $element = $this->getRawObject($offset); + $offset = $element[2]; + $objval[] = $element; + } while ($element[0] != '>>'); + // remove closing delimiter + array_pop($objval); + } + } else { + // hexadecimal string object + $objtype = $char; + ++$offset; + if (($char == '<') AND (preg_match('/^([0-9A-Fa-f]+)[>]/iU', substr($this->pdfdata, $offset), $matches) == 1)) { + $objval = $matches[1]; + $offset += strlen($matches[0]); + } + } + break; + } + default: { + if (substr($this->pdfdata, $offset, 6) == 'endobj') { + // indirect object + $objtype = 'endobj'; + $offset += 6; + } elseif (substr($this->pdfdata, $offset, 4) == 'null') { + // null object + $objtype = 'null'; + $offset += 4; + $objval = 'null'; + } elseif (substr($this->pdfdata, $offset, 4) == 'true') { + // boolean true object + $objtype = 'boolean'; + $offset += 4; + $objval = 'true'; + } elseif (substr($this->pdfdata, $offset, 5) == 'false') { + // boolean false object + $objtype = 'boolean'; + $offset += 5; + $objval = 'false'; + } elseif (substr($this->pdfdata, $offset, 6) == 'stream') { + // start stream object + $objtype = 'stream'; + $offset += 6; + if (preg_match('/^[\r\n]+(.*)[\r\n]*endstream/isU', substr($this->pdfdata, $offset), $matches) == 1) { + $objval = $matches[1]; + $offset += strlen($matches[0]); + } + } elseif (substr($this->pdfdata, $offset, 9) == 'endstream') { + // end stream object + $objtype = 'endstream'; + $offset += 9; + } elseif (preg_match('/^([0-9]+)[\s]+([0-9]+)[\s]+R/iU', substr($this->pdfdata, $offset, 33), $matches) == 1) { + // indirect object reference + $objtype = 'ojbref'; + $offset += strlen($matches[0]); + $objval = intval($matches[1]).'_'.intval($matches[2]); + } elseif (preg_match('/^([0-9]+)[\s]+([0-9]+)[\s]+obj/iU', substr($this->pdfdata, $offset, 33), $matches) == 1) { + // object start + $objtype = 'ojb'; + $objval = intval($matches[1]).'_'.intval($matches[2]); + $offset += strlen ($matches[0]); + } elseif (($numlen = strspn($this->pdfdata, '+-.0123456789', $offset)) > 0) { + // numeric object + $objtype = 'numeric'; + $objval = substr($this->pdfdata, $offset, $numlen); + $offset += $numlen; + } + break; + } + } + return array($objtype, $objval, $offset); + } + + /** + * Get content of indirect object. + * @param $obj_ref (string) Object number and generation number separated by underscore character. + * @param $offset (int) Object offset. + * @param $decoding (boolean) If true decode streams. + * @return array containing object data. + * @protected + * @since 1.0.000 (2011-05-24) + */ + protected function getIndirectObject($obj_ref, $offset=0, $decoding=true) { + $obj = explode('_', $obj_ref); + if (($obj === false) OR (count($obj) != 2)) { + $this->Error('Invalid object reference: '.$obj); + return; + } + $objref = $obj[0].' '.$obj[1].' obj'; + if (strpos($this->pdfdata, $objref, $offset) != $offset) { + // an indirect reference to an undefined object shall be considered a reference to the null object + return array('null', 'null', $offset); + } + // starting position of object content + $offset += strlen($objref); + // get array of object content + $objdata = array(); + $i = 0; // object main index + do { + // get element + $element = $this->getRawObject($offset); + $offset = $element[2]; + // decode stream using stream's dictionary information + if ($decoding AND ($element[0] == 'stream') AND (isset($objdata[($i - 1)][0])) AND ($objdata[($i - 1)][0] == '<<')) { + $element[3] = $this->decodeStream($objdata[($i - 1)][1], $element[1]); + } + $objdata[$i] = $element; + ++$i; + } while ($element[0] != 'endobj'); + // remove closing delimiter + array_pop($objdata); + // return raw object content + return $objdata; + } + + /** + * Get the content of object, resolving indect object reference if necessary. + * @param $obj (string) Object value. + * @return array containing object data. + * @protected + * @since 1.0.000 (2011-06-26) + */ + protected function getObjectVal($obj) { + if ($obj[0] == 'objref') { + // reference to indirect object + if (isset($this->objects[$obj[1]])) { + // this object has been already parsed + return $this->objects[$obj[1]]; + } elseif (isset($this->xref[$obj[1]])) { + // parse new object + $this->objects[$obj[1]] = $this->getIndirectObject($obj[1], $this->xref[$obj[1]], false); + return $this->objects[$obj[1]]; + } + } + return $obj; + } + + /** + * Decode the specified stream. + * @param $sdic (array) Stream's dictionary array. + * @param $stream (string) Stream to decode. + * @return array containing decoded stream data and remaining filters. + * @protected + * @since 1.0.000 (2011-06-22) + */ + protected function decodeStream($sdic, $stream) { + // get stream lenght and filters + $slength = strlen($stream); + $filters = array(); + foreach ($sdic as $k => $v) { + if ($v[0] == '/') { + if (($v[1] == 'Length') AND (isset($sdic[($k + 1)])) AND ($sdic[($k + 1)][0] == 'numeric')) { + // get declared stream lenght + $declength = intval($sdic[($k + 1)][1]); + if ($declength < $slength) { + $stream = substr($stream, 0, $declength); + $slength = $declength; + } + } elseif (($v[1] == 'Filter') AND (isset($sdic[($k + 1)]))) { + // resolve indirect object + $objval = $this->getObjectVal($sdic[($k + 1)]); + if ($objval[0] == '/') { + // single filter + $filters[] = $objval[1]; + } elseif ($objval[0] == '[') { + // array of filters + foreach ($objval[1] as $flt) { + if ($flt[0] == '/') { + $filters[] = $flt[1]; + } + } + } + } + } + } + // decode the stream + $remaining_filters = array(); + foreach ($filters as $filter) { + if (in_array($filter, $this->FilterDecoders->getAvailableFilters())) { + $stream = $this->FilterDecoders->decodeFilter($filter, $stream); + } else { + // add missing filter to array + $remaining_filters[] = $filter; + } + } + return array($stream, $remaining_filters); + } + + /** + * This method is automatically called in case of fatal error; it simply outputs the message and halts the execution. + * @param $msg (string) The error message + * @public + * @since 1.0.000 (2011-05-23) + */ + public function Error($msg) { + // exit program and print error + die('TCPDF_PARSER ERROR: '.$msg); + } + +} // END OF TCPDF_PARSER CLASS + +//============================================================+ +// END OF FILE +//============================================================+ diff --git a/htdocs/includes/tcpdf/unicode_data.php b/htdocs/includes/tcpdf/unicode_data.php index 926ce7bc8de..936f4fea458 100644 --- a/htdocs/includes/tcpdf/unicode_data.php +++ b/htdocs/includes/tcpdf/unicode_data.php @@ -1,13 +1,13 @@ societe_id == 0) $links=array(DOL_URL_ROOT.'/comm/list.php', DOL_URL_ROOT.'/comm/prospect/list.php', DOL_URL_ROOT.'/fourn/liste.php', - DOL_URL_ROOT.'/adherents/liste.php?statut=1&mainmenu=members', - DOL_URL_ROOT.'/product/liste.php?type=0&mainmenu=products', - DOL_URL_ROOT.'/product/liste.php?type=1&mainmenu=products', + DOL_URL_ROOT.'/adherents/liste.php?statut=1&mainmenu=members', + DOL_URL_ROOT.'/product/liste.php?type=0&mainmenu=products', + DOL_URL_ROOT.'/product/liste.php?type=1&mainmenu=products', DOL_URL_ROOT.'/comm/propal.php?mainmenu=commercial', DOL_URL_ROOT.'/commande/liste.php?mainmenu=commercial', DOL_URL_ROOT.'/compta/facture.php?mainmenu=accountancy', diff --git a/htdocs/install/check.php b/htdocs/install/check.php index c48f4c7f599..b575e0c62a4 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -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"); @@ -385,9 +385,10 @@ else array('from'=>'2.6.0', 'to'=>'2.7.0'), array('from'=>'2.7.0', 'to'=>'2.8.0'), array('from'=>'2.8.0', 'to'=>'2.9.0'), - array('from'=>'2.9.0', 'to'=>'3.0.0'), - array('from'=>'3.0.0', 'to'=>'3.1.0'), - array('from'=>'3.1.0', 'to'=>'3.2.0') + array('from'=>'2.9.0', 'to'=>'3.0.0'), + array('from'=>'3.0.0', 'to'=>'3.1.0'), + array('from'=>'3.1.0', 'to'=>'3.2.0'), + array('from'=>'3.2.0', 'to'=>'3.3.0') ); $count=0; diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index b57b0e8a1c3..8bdf0df1c27 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -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"); diff --git a/htdocs/install/etape2.php b/htdocs/install/etape2.php index 59ea5ec8bba..b8373847c25 100644 --- a/htdocs/install/etape2.php +++ b/htdocs/install/etape2.php @@ -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"); diff --git a/htdocs/install/etape4.php b/htdocs/install/etape4.php index d9f27fe4e32..eb392ae2e86 100644 --- a/htdocs/install/etape4.php +++ b/htdocs/install/etape4.php @@ -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 ''.$langs->trans("DolibarrAdminLogin").' :'; - print ''; + print ''; print ''.$langs->trans("Password").' :'; print ''; print ''.$langs->trans("PasswordAgain").' :'; @@ -106,9 +106,9 @@ if ($db->ok == 1) } -$db->close(); - dolibarr_install_syslog("--- install/etape4.php end", LOG_INFO); pFooter($err,$setuplang); + +$db->close(); ?> diff --git a/htdocs/install/etape5.php b/htdocs/install/etape5.php index 49d8259b0de..f63eafe1ef3 100644 --- a/htdocs/install/etape5.php +++ b/htdocs/install/etape5.php @@ -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); diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index 8fe90ac479f..44dc2011de1 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -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 */ diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 3ee0e363d1a..5e328dd3b37 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -24,7 +24,7 @@ * \brief File that define environment for support pages */ -define('DOL_VERSION','3.2.0-alpha'); // Also defined in htdocs/master.inc.php (Ex: x.y.z-alpha, x.y.z) +define('DOL_VERSION','3.3.0-alpha'); // Also defined in htdocs/master.inc.php (Ex: x.y.z-alpha, x.y.z) // Define DOL_DOCUMENT_ROOT an ADODB_PATH used for install/upgrade process if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '..'); diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql index 438f2008f56..96eae6f0cec 100644 --- a/htdocs/install/mysql/data/llx_10_c_regions.sql +++ b/htdocs/install/mysql/data/llx_10_c_regions.sql @@ -6,6 +6,7 @@ -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin -- Copyright (C) 2010-2011 Juanjo Menent +-- Copyright (C) 2012 Sebastian Neuwert -- -- 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 . -- --- -- -- 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); \ No newline at end of file +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23209, 232, 23209, '', 0, 'Zuliana', 1); diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql index 3c64d014499..0fcc8375eb5 100644 --- a/htdocs/install/mysql/data/llx_20_c_departements.sql +++ b/htdocs/install/mysql/data/llx_20_c_departements.sql @@ -6,6 +6,7 @@ -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin -- Copyright (C) 2010-2012 Juanjo Menent +-- Copyright (C) 2012 Sebastian Neuwert -- -- 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 . -- --- -- -- 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); @@ -473,9 +491,11 @@ 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 ('RR', 5601, 'RORAIMA', 0, 'RR', 'Roraima', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SC', 5601, 'SANTA CATARINA', 0, 'SC', 'Santa Catarina', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SE', 5601, 'SERGIPE', 0, 'SE', 'Sergipe', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SP', 5601, 'SAO PAULO', 0, 'SP', 'Sao Paulo', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('TO', 5601, 'TOCANTINS', 0, 'TO', 'Tocantins', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('DF', 5601, 'DISTRITO FEDERAL', 0, 'DF', 'Distrito Federal', 1); + -- Provinces Chile (id country=67) INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('151', 6715, '', 0, '151', 'Arica', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('152', 6715, '', 0, '152', 'Parinacota', 1); diff --git a/htdocs/install/mysql/data/llx_c_forme_juridique.sql b/htdocs/install/mysql/data/llx_c_forme_juridique.sql index 47a24e59485..494bb4800ba 100644 --- a/htdocs/install/mysql/data/llx_c_forme_juridique.sql +++ b/htdocs/install/mysql/data/llx_c_forme_juridique.sql @@ -6,6 +6,7 @@ -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin -- Copyright (C) 2010-2011 Juanjo Menent +-- Copyright (C) 2012 Sebastian Neuwert -- -- 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 . -- --- -- -- 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); diff --git a/htdocs/install/mysql/data/llx_c_input_reason.sql b/htdocs/install/mysql/data/llx_c_input_reason.sql index 24fde4b7f14..703cbd7bcb2 100755 --- a/htdocs/install/mysql/data/llx_c_input_reason.sql +++ b/htdocs/install/mysql/data/llx_c_input_reason.sql @@ -1,5 +1,5 @@ --- Copyright (C) 2011 Laurent Destailleur --- Copyright (C) 2011 Philippe Grand +-- Copyright (C) 2011-2012 Laurent Destailleur +-- Copyright (C) 2011 Philippe Grand -- -- 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 @@ -21,10 +21,13 @@ -- de l'install et tous les sigles '--' sont supprimés. -- -INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES (1, 'SRC_INTE', 'Web site', 1); -INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES (2, 'SRC_CAMP_MAIL', 'Mailing campaign', 1); -INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES (3, 'SRC_CAMP_PHO', 'Phone campaign', 1); -INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES (4, 'SRC_CAMP_FAX', 'Fax campaign', 1); -INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES (5, 'SRC_COMM', 'Commercial contact', 1); -INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES (6, 'SRC_SHOP', 'Shop contact', 1); -INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES (7, 'SRC_CAMP_EMAIL', 'EMailing campaign', 1); \ No newline at end of file +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 1, 'SRC_INTE', 'Web site', 1); +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 2, 'SRC_CAMP_MAIL', 'Mailing campaign', 1); +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 3, 'SRC_CAMP_PHO', 'Phone campaign', 1); +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 4, 'SRC_CAMP_FAX', 'Fax campaign', 1); +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 5, 'SRC_COMM', 'Commercial contact', 1); +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 6, 'SRC_SHOP', 'Shop contact', 1); +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 7, 'SRC_CAMP_EMAIL', 'EMailing campaign', 1); +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 8, 'SRC_WOM', 'Word of mount', 1); +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 9, 'SRC_PARTNER', 'Partner', 1); +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES (10, 'SRC_EMPLOYEE', 'Employee', 1); diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index aa907c95cc8..f89373e8ff9 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -6,6 +6,7 @@ -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin -- Copyright (C) 2010-2011 Juanjo Menent +-- Copyright (C) 2012 Sebastian Neuwert -- -- 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 . -- --- -- -- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors @@ -48,6 +48,9 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (41 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (412, 41, '10','0','VAT reduced rate', 1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (413, 41, '0','0','VAT Rate 0',1); +-- BRASIL (id country=59) +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (561, 56, '0','0','VAT reduced rate',1); + -- BULGARIA (id country=59) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (591, 59, '20','0','VAT standard rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (592, 59, '7','0','VAT reduced rate', 1); @@ -81,15 +84,17 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (80 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 11, 1,'19.6','0','VAT standard rate (France hors DOM-TOM)',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 12, 1, '8.5','0','VAT standard rate (DOM sauf Guyane et Saint-Martin)',0); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 13, 1, '8.5','1','VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 14, 1, '5.5','0','VAT reduced rate (France hors DOM-TOM)',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 14, 1, '5.5','0','VAT reduced rate (France hors DOM-TOM)',0); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 15, 1, '0','0','VAT Rate 0 ou non applicable',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 16, 1, '2.1','0','VAT super-reduced rate',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); @@ -119,6 +124,15 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (14 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1404, 140, '3','0','VAT super-reduced rate', 1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1405, 140, '0','0','VAT Rate 0', 1); +-- MONACO (id country=27) +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 271, 27,'19.6','0','VAT standard rate (France hors DOM-TOM)',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 272, 27, '8.5','0','VAT standard rate (DOM sauf Guyane et Saint-Martin)',0); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 273, 27, '8.5','1','VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 274, 27, '5.5','0','VAT reduced rate (France hors DOM-TOM)',0); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 275, 27, '0','0','VAT Rate 0 ou non applicable',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 276, 27, '2.1','0','VAT super-reduced rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 277, 27, '7','0','VAT reduced rate',1); + -- MAROCO (id country=12) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (121, 12, '20','0','VAT standard rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (122, 12, '14','0','VAT reduced rate',1); diff --git a/htdocs/install/mysql/data/llx_const.sql b/htdocs/install/mysql/data/llx_const.sql index 29301d68f0f..18a81459535 100644 --- a/htdocs/install/mysql/data/llx_const.sql +++ b/htdocs/install/mysql/data/llx_const.sql @@ -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 diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index 0ad61b6a513..5aadfb066f9 100755 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -15,6 +15,9 @@ -- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user); -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); +-- Delete old themes setup +DELETE FROM llx_user_param WHERE param = 'MAIN_THEME' and value = 'freelug'; + update llx_propal set fk_projet = null where fk_projet not in (select rowid from llx_projet); update llx_commande set fk_projet = null where fk_projet not in (select rowid from llx_projet); @@ -210,9 +213,11 @@ ALTER TABLE llx_paiement ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowi ALTER TABLE llx_product_price ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid; -- Restore foreign key (on llx_expedition_methode before) on correct table (llx_c_shipment_mode) +UPDATE llx_expedition SET fk_expedition_methode = null WHERE fk_expedition_methode NOT IN (SELECT rowid FROM llx_c_shipment_mode); ALTER TABLE llx_expedition DROP FOREIGN KEY fk_expedition_fk_expedition_methode; ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_expedition_methode FOREIGN KEY (fk_expedition_methode) REFERENCES llx_c_shipment_mode (rowid); + -- VMYSQL4.1 UPDATE llx_chargesociales set tms = date_creation WHERE tms = '0000-00-00 00:00:00'; ALTER TABLE llx_propal MODIFY fk_projet integer DEFAULT NULL; @@ -448,3 +453,5 @@ ALTER TABLE llx_commande_fournisseur ADD COLUMN extraparams varchar(255) AFTER i ALTER TABLE llx_facture_fourn ADD COLUMN extraparams varchar(255) AFTER import_key; ALTER TABLE llx_boxes ADD COLUMN maxline integer NULL; + +ALTER TABLE llx_commande_fournisseur ADD COLUMN date_livraison date NULL; diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql new file mode 100755 index 00000000000..a67d2bcf9e7 --- /dev/null +++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql @@ -0,0 +1,37 @@ +-- +-- Be carefull to requests order. +-- This file must be loaded by calling /install/index.php page +-- when current version is 3.2.0 or higher. +-- +-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new; +-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol; +-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60); +-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname; +-- To change type of field: ALTER TABLE llx_table MODIFY name varchar(60); +-- To restrict request to Mysql version x.y use -- VMYSQLx.y +-- To restrict request to Pgsql version x.y use -- VPGSQLx.y + + +-- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user); +-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); + +ALTER TABLE llx_societe ADD COLUMN idprof6 varchar(128) after idprof5; + +-- Monaco VAT Rates +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 271, 27,'19.6','0','VAT standard rate (France hors DOM-TOM)',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 272, 27, '8.5','0','VAT standard rate (DOM sauf Guyane et Saint-Martin)',0); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 273, 27, '8.5','1','VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 274, 27, '5.5','0','VAT reduced rate (France hors DOM-TOM)',0); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 275, 27, '0','0','VAT Rate 0 ou non applicable',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 276, 27, '2.1','0','VAT super-reduced rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 277, 27, '7','0','VAT reduced rate',1); + +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 8, 'SRC_WOM', 'Word of mount', 1); +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 9, 'SRC_PARTNER', 'Partner', 1); +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES (10, 'SRC_EMPLOYEE', 'Employee', 1); + + +ALTER TABLE llx_commande_fournisseur CHANGE COLUMN date_cloture date_approve datetime; +ALTER TABLE llx_commande_fournisseur CHANGE COLUMN fk_user_cloture fk_user_approve integer; + +ALTER TABLE llx_mailing MODIFY COLUMN body mediumtext; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql index 1c1a00dbbe0..7a5d2b53cfd 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql @@ -35,11 +35,11 @@ create table llx_commande_fournisseur tms timestamp, date_creation datetime, -- date de creation date_valid datetime, -- date de validation - date_cloture datetime, -- date de cloture + date_approve datetime, -- date de approve date_commande date, -- date de la commande fk_user_author integer, -- createur de la commande fk_user_valid integer, -- valideur de la commande - fk_user_cloture integer, -- auteur cloture + fk_user_approve integer, -- auteur approve source smallint NOT NULL, fk_statut smallint default 0, amount_ht real default 0, @@ -53,11 +53,12 @@ create table llx_commande_fournisseur note text, note_public text, model_pdf varchar(255), - + + date_livraison date default NULL, fk_cond_reglement integer, -- condition de reglement fk_mode_reglement integer, -- mode de reglement fk_methode_commande integer default 0, -- should be named fk_input_method import_key varchar(14), extraparams varchar(255) -- for stock other parameters with json format -)ENGINE=innodb; +)ENGINE=innodb; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_mailing.sql b/htdocs/install/mysql/tables/llx_mailing.sql index 4d8e6d57cf4..aad9949d2d9 100644 --- a/htdocs/install/mysql/tables/llx_mailing.sql +++ b/htdocs/install/mysql/tables/llx_mailing.sql @@ -30,7 +30,7 @@ create table llx_mailing titre varchar(60), -- Ref of mailing entity integer DEFAULT 1 NOT NULL, -- multi company id sujet varchar(60), -- Sujet of mailing - body text, + body mediumtext, bgcolor varchar(8), -- Backgroud color of mailing bgimage varchar(255), -- Backgroud image of mailing cible varchar(60), diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index 23be7cdd29c..a791880eb96 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -59,6 +59,7 @@ create table llx_societe ape varchar(128), -- IDProf3: code ape for france idprof4 varchar(128), -- IDProf4: nu for france idprof5 varchar(128), -- IDProf5: nu for france + idprof6 varchar(128), -- IDProf6: nu for france tva_intra varchar(20), -- tva capital real, -- capital de la societe description text, -- diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index b4ce4b4e78a..4935047e63c 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -39,10 +39,10 @@ error_reporting(0); @set_time_limit(120); error_reporting($err); -$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto'); +$setuplang=GETPOST("selectlang",'',3)?GETPOST("selectlang",'',3):'auto'; $langs->setDefaultLang($setuplang); -$versionfrom=isset($_GET["versionfrom"])?$_GET["versionfrom"]:''; -$versionto=isset($_GET["versionto"])?$_GET["versionto"]:''; +$versionfrom=GETPOST("versionfrom",'',3)?GETPOST("versionfrom",'',3):(empty($argv[1])?'':$argv[1]); +$versionto=GETPOST("versionto",'',3)?GETPOST("versionto",'',3):(empty($argv[2])?'':$argv[2]); $langs->load("admin"); $langs->load("install"); @@ -147,9 +147,7 @@ print ''.$langs->trans("PleaseBePatient").''; flush(); -/* - * Load sql files -*/ +// Run repair SQL file if ($ok) { $dir = "mysql/migration/"; @@ -178,7 +176,7 @@ if ($ok) } } - // Boucle sur chaque fichier + // Loop on each file foreach($filelist as $file) { print ''; @@ -191,7 +189,7 @@ if ($ok) } } - +// Run purge of directory if (GETPOST('purge')) { $conf->setValues($db); @@ -201,7 +199,7 @@ if (GETPOST('purge')) { $filearray=array(); $upload_dir = $conf->$modulepart->dir_output; - if ($modulepart == 'company') $upload_dir = $conf->societe->dir_output; + if ($modulepart == 'company') $upload_dir = $conf->societe->dir_output; // TODO change for multicompany sharing if ($modulepart == 'invoice') $upload_dir = $conf->facture->dir_output; if ($modulepart == 'invoice_supplier') $upload_dir = $conf->fournisseur->facture->dir_output; if ($modulepart == 'order') $upload_dir = $conf->commande->dir_output; @@ -317,11 +315,6 @@ print ''; - -if ($db->connected) $db->close(); - - - if (empty($actiondone)) { print '
    '.$langs->trans("ErrorWrongParameters").'
    '; @@ -334,4 +327,8 @@ print '
    '; pFooter(1,$setuplang); -?> +if ($db->connected) $db->close(); + +// Return code if ran from command line +if (! $ok && isset($argv[1])) exit(1); +?> \ No newline at end of file diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 98a97dc3506..22c69ac4f99 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -42,10 +42,10 @@ error_reporting(0); @set_time_limit(120); error_reporting($err); -$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto'); +$setuplang=GETPOST("selectlang",'',3)?GETPOST("selectlang",'',3):'auto'; $langs->setDefaultLang($setuplang); -$versionfrom=isset($_POST["versionfrom"])?$_POST["versionfrom"]:(isset($_GET["versionfrom"])?$_GET["versionfrom"]:''); -$versionto=isset($_POST["versionto"])?$_POST["versionto"]:(isset($_GET["versionto"])?$_GET["versionto"]:''); +$versionfrom=GETPOST("versionfrom",'',3)?GETPOST("versionfrom",'',3):(empty($argv[1])?'':$argv[1]); +$versionto=GETPOST("versionto",'',3)?GETPOST("versionto",'',3):(empty($argv[2])?'':$argv[2]); $langs->load("admin"); $langs->load("install"); @@ -64,11 +64,11 @@ if (! is_object($conf)) dolibarr_install_syslog("upgrade2: conf file not initial * View */ -pHeader('',"upgrade2",isset($_REQUEST['action'])?$_REQUEST['action']:'','versionfrom='.$versionfrom.'&versionto='.$versionto); +pHeader('',"upgrade2",GETPOST('action'),'versionfrom='.$versionfrom.'&versionto='.$versionto); $actiondone=0; -// Action to launch the repair or migrate script +// Action to launch the migrate script if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) { $actiondone=1; @@ -77,7 +77,7 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) if (! $versionfrom && ! $versionto) { - print '
    Parameter versionfrom or version to missing. Upgrade is launched from page install/index.php (like a first install) instead of install/upgrade.php
    '; + print '
    Parameter versionfrom or versionto missing. Upgrade is launched from page install/index.php (like a first install) instead of install/upgrade.php
    '; exit; } @@ -245,7 +245,7 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) MAIN_DB_PREFIX.'c_methode_commande_fournisseur', // table renamed MAIN_DB_PREFIX.'c_input_method' ); - + $listtables = $db->DDLListTables($conf->db->name,''); foreach ($listtables as $val) { @@ -353,4 +353,8 @@ if (empty($actiondone)) pFooter(! $ok && empty($_GET["ignoreerrors"]),$setuplang); -?> +if ($db->connected) $db->close(); + +// Return code if ran from command line +if (! $ok && isset($argv[1])) exit(1); +?> \ No newline at end of file diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index bb4d872f75b..7efaca24306 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2010 Laurent Destailleur + * Copyright (C) 2005-2012 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2010 Juanjo Menent * @@ -50,10 +50,10 @@ error_reporting(0); @set_time_limit(120); error_reporting($err); -$setuplang=isset($_POST['selectlang'])?$_POST['selectlang']:(isset($_GET['selectlang'])?$_GET['selectlang']:'auto'); +$setuplang=GETPOST("selectlang",'',3)?GETPOST("selectlang",'',3):'auto'; $langs->setDefaultLang($setuplang); -$versionfrom=isset($_POST["versionfrom"])?$_POST["versionfrom"]:(isset($_GET["versionfrom"])?$_GET["versionfrom"]:''); -$versionto=isset($_POST["versionto"])?$_POST["versionto"]:(isset($_GET["versionto"])?$_GET["versionto"]:''); +$versionfrom=GETPOST("versionfrom",'',3)?GETPOST("versionfrom",'',3):(empty($argv[1])?'':$argv[1]); +$versionto=GETPOST("versionto",'',3)?GETPOST("versionto",'',3):(empty($argv[2])?'':$argv[2]); $langs->load('admin'); $langs->load('install'); @@ -75,7 +75,7 @@ if (! is_object($conf)) dolibarr_install_syslog("upgrade2: conf file not initial * View */ -pHeader('','etape5',GETPOST("action"),'versionfrom='.$versionfrom.'&versionto='.$versionto); +pHeader('','etape5',GETPOST("action")?GETPOST("action"):'upgrade','versionfrom='.$versionfrom.'&versionto='.$versionto); if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) @@ -308,6 +308,8 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) $beforeversionarray=explode('.','3.2.9'); if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0) { + migrate_price_contrat($db,$langs,$conf); + migrate_mode_reglement($db,$langs,$conf); // Reload modules @@ -342,6 +344,12 @@ else pFooter($error,$setuplang); +if ($db->connected) $db->close(); + +// Return code if ran from command line +if ($error && isset($argv[1])) exit(1); + + /** * Reporte liens vers une facture de paiements sur table de jointure (lien n-n paiements factures) @@ -1454,7 +1462,6 @@ function migrate_price_contrat($db,$langs,$conf) $pu = $obj->subprice; $txtva = $obj->tva_taux; $remise_percent = $obj->remise_percent; - $remise_percent_global = $obj->remise_percent_global; $info_bits = $obj->info_bits; // On met a jour les 3 nouveaux champs @@ -1462,7 +1469,7 @@ function migrate_price_contrat($db,$langs,$conf) //$contratligne->fetch($rowid); Non requis car le update_total ne met a jour que chp redefinis $contratligne->rowid=$rowid; - $result=calcul_price_total($qty,$pu,$remise_percent,$txtva,0,0,$remise_percent_global,'HT',$info_bits); + $result=calcul_price_total($qty,$pu,$remise_percent,$txtva,0,0,0,'HT',$info_bits); $total_ht = $result[0]; $total_tva = $result[1]; $total_ttc = $result[2]; @@ -1471,30 +1478,10 @@ function migrate_price_contrat($db,$langs,$conf) $contratligne->total_tva = $total_tva; $contratligne->total_ttc = $total_ttc; - dolibarr_install_syslog("upgrade2: Line $rowid: contratdetid=$obj->rowid pu=$pu qty=$qty tva_taux=$txtva remise_percent=$remise_percent remise_global=$remise_percent_global -> $total_ht, $total_tva, $total_ttc"); + dolibarr_install_syslog("upgrade2: Line $rowid: contratdetid=$obj->rowid pu=$pu qty=$qty tva_taux=$txtva remise_percent=$remise_percent -> $total_ht, $total_tva, $total_ttc"); print ". "; $contratligne->update_total($rowid); - - /* On touche pas a contrat mere - $propal = new Propal($db); - $propal->id=$obj->rowid; - if ( $propal->fetch($propal->id) >= 0 ) - { - if ( $propal->update_price() > 0 ) - { - print ". "; - } - else - { - print "Error id=".$propal->id; - } - } - else - { - print "Error #3"; - } - */ $i++; } } @@ -3691,4 +3678,4 @@ update llx_facture set paye=1, fk_statut=2 where close_code is null and rowid in (...) */ -?> +?> \ No newline at end of file diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index 418ba8a88be..65f5d9bb2c9 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -216,6 +216,7 @@ OfficialWebSiteFr=lloc web oficial francòfon OfficialWiki=Wiki Dolibarr OfficialDemo=Demo en línia Dolibarr OfficialMarketPlace=Lloc oficial de mòduls complementaris i extensions +OfficialWebHostingService=Servei oficial d'allotjament (SaaS) ForDocumentationSeeWiki=Per a la documentació d'usuari, desenvolupador o Preguntes Freqüents (FAQ), consulteu el wiki Dolibarr:
    %s ForAnswersSeeForum=Per altres qüestions o realitzar les seves pròpies consultes, pot utilitzar el fòrum Dolibarr:
    %s HelpCenterDesc1=Aquesta aplicació, independent de Dolibarr, us permet ajudar a obtenir un servei de suport de Dolibarr. @@ -265,6 +266,10 @@ FindPackageFromWebSite=Cercar el paquet que respon a la seva necessitat (per exe DownloadPackageFromWebSite=Descarregar el paquet des del lloc %s. UnpackPackageInDolibarrRoot=Descomprimir el paquet a la carpeta arrel de Dolibarr %s sobre els arxius existents (sense desplaçar o esborrar els existents, sota pena de perdre la seva configuració o els mòduls no oficials instal·lats) SetupIsReadyForUse=La instal·lació ha finalitzat i Dolibarr està disponible amb el nou component. +NotExistsDirect=No existeix el directori alternatiu.
    +InfDirAlt=Des de la versió 3 és possible definir un directori root alternatiu, això li permet emmagatzemar en el mateix lloc mòduls i temes personalitzades.
    Només cal crear un directori en l'arrel de Dolibarr (per exemple: custom).
    +InfDirExample=
    Seguidament es declara a l'arxiu conf.php:
    $dolibarr_main_url_root_alt='http://miservidor/custom'
    $dolibarr_main_document_root_alt='/directorio/de/dolibarr/htdocs/custom'
    *Aquestes línies venen comentades amb un "#", per descomentar-les només cal retirar el caràcter. +YouCanSubmitFile=Seleccioneu mòdul: CurrentVersion=Versió actual de Dolibarr CallUpdatePage=Trucar a la pàgina d'actualització de l'estructura i dades de la base de dades %s. LastStableVersion=Última versió estable disponible @@ -868,6 +873,7 @@ MAIN_PROXY_PASS=Contrasenya del servidor proxy DefineHereComplementaryAttributes=Definiu aquí la llista d'atributs addicionals, no disponibles a estàndard, i que vol gestionar per %s. ExtraFields=Atributs addicionals ExtraFieldHasWrongValue=L'atribut %s te un valor incorrecte. +AlphaNumOnlyCharsAndNoSpace=només carateres alfanumèrics sense espais SendingMailSetup=Configuració de l'enviament per mail SendmailOptionNotComplete=Atenció, en alguns sistemes Linux, amb aquest mètode d'enviament, per poder enviar mails en nom seu, la configuració de sendmail ha de contenir l'opció -ba (paràmetre mail.force_extra_parameters a l'arxiu php.ini). Si alguns dels seus destinataris no reben els seus missatges, proveu de modificar aquest paràmetre PHP amb mail.force_extra_parameters =-ba . PathToDocuments=Rutes d'accés a documents diff --git a/htdocs/langs/ca_ES/agenda.lang b/htdocs/langs/ca_ES/agenda.lang index 53c89b3be21..33b6c984cfb 100644 --- a/htdocs/langs/ca_ES/agenda.lang +++ b/htdocs/langs/ca_ES/agenda.lang @@ -10,6 +10,8 @@ LocalAgenda=Calendari local AffectedTo=Assignada a DoneBy=Realitzat per Events=Esdeveniments +MyEvents=Els meus events +OtherEvents=Altres events ListOfActions=Llista d'esdeveniments EventOnFullDay=Esdeveniment per tot el dia Location=Localització @@ -63,12 +65,12 @@ AgendaUrlOptions4=logint=%s per a restringir insercions a accions que afe AgendaUrlOptions5=logind=%s per a restringir insercions a accions realitzades per l'usuari %s. AgendaShowBirthdayEvents=Mostra aniversari dels contactes AgendaHideBirthdayEvents=Amaga aniversari dels contacte -ExtSites=Calendaris externs # External Sites ical +ExportCal=Exportar calendari ExtSites=Calendaris externs ExtSitesEnableThisTool=Mostrar calendaris externs a l'agenda ExtSitesNbOfAgenda=Nombre de calendaris AgendaExtNb=Calendari nº %s ExtSiteUrlAgenda=Url d'accés a l'arxiu. ical -ExtSiteNoLabel=Sense descripció \ No newline at end of file +ExtSiteNoLabel=Sense descripció diff --git a/htdocs/langs/ca_ES/errors.lang b/htdocs/langs/ca_ES/errors.lang index c11165ff8da..3c0f15c9804 100644 --- a/htdocs/langs/ca_ES/errors.lang +++ b/htdocs/langs/ca_ES/errors.lang @@ -105,6 +105,8 @@ ErrorBothFieldCantBeNegative=Els camps %s i %s no poden ser negatius ErrorNoActivatedBarcode=Cap tipus de codi de barres activat ErrorWebServerUserHasNotPermission=El compte d'execució del servidor web %s no disposa dels permisos per això ErrorNoActivatedBarcode=No hi ha activat cap tipus de codi de barres +ErrorOSSystem=La instal·lació en línia no suporta el seu sistema operatiu.
    Instal·leu l'extensió manualment. +ErrorUncompFile=No és possible instal·lar el paquet %s # Warnings WarningSafeModeOnCheckExecDir=Atenció, està activada l'opció PHP safe_mode, la comanda ha d'estar dins d'un directori declarat dins del paràmetre php safe_mode_exec_dir. diff --git a/htdocs/langs/ca_ES/members.lang b/htdocs/langs/ca_ES/members.lang index fd9eebd43ba..0b42727353a 100644 --- a/htdocs/langs/ca_ES/members.lang +++ b/htdocs/langs/ca_ES/members.lang @@ -123,7 +123,6 @@ LastMembersModified=Els %s darrers membres modificats LastSubscriptionsModified=Les %s últimes afiliacions modificades AttributeName=Nom de l'atribut FieldEdition=Edició del camp %s -AlphaNumOnlyCharsAndNoSpace=només carateres alfanumèrics sense espais String=Cadena Text=Text llarg Int=Numèric diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index fbf8a8833cb..48b1c14a998 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -38,7 +38,7 @@ SetupArea=Setup area FormToTestFileUploadForm=Form to test file upload (according to setup) IfModuleEnabled=Note: yes is effective only if module %s is enabled RemoveLock=Remove file %s if it exists to allow usage of the update tool. -RestoreLock=Replace file %s, with read permission only, to disable any usage of update tool. +RestoreLock=Restore file %s, with read permission only, to disable any usage of update tool. SecuritySetup=Security setup ErrorModuleRequirePHPVersion=Error, this module requires PHP version %s or higher ErrorModuleRequireDolibarrVersion=Error, this module requires Dolibarr version %s or higher @@ -215,6 +215,7 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons +OfficialWebHostingService=Official web hosting service (Cloud hosting) ForDocumentationSeeWiki=For user's or developer's documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. @@ -264,6 +265,10 @@ FindPackageFromWebSite=Find a package that provides feature you want (for exampl DownloadPackageFromWebSite=Download package. UnpackPackageInDolibarrRoot=Unpack package file into Dolibarr's root directory %s SetupIsReadyForUse=Install is finished and Dolibarr is ready to use with this new component. +NotExistsDirect=The alternative root directory is not defined.
    +InfDirAlt=Since version 3 it is possible to define an alternative root directory.This allows you to store, same place, plug-ins and custom templates.
    Just create a directory at the root of Dolibarr (eg: custom).
    +InfDirExample=
    Then declare it in the file conf.php
    $dolibarr_main_url_root_alt='http://myserver/custom'
    $dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'
    *These lines are commented with "#", to uncomment only remove the character. +YouCanSubmitFile=Select module: CurrentVersion=Dolibarr current version CallUpdatePage=Go to the page that updates the database structure and datas: %s. LastStableVersion=Last stable version @@ -310,7 +315,7 @@ ResponseTimeout=Response timeout SmsTestMessage=Test message from __PHONEFROM__ to __PHONETO__ ModuleMustBeEnabledFirst=Module %s must be enabled first before using this feature. SecurityToken=Key to secure URLs -NoSmsEngine=No SMS sender manager available. SMS sender manager are not installed with default distribution (because they depends on an external supplier) but you can find some on http://www.dolistore.com +NoSmsEngine=No SMS sender manager available. SMS sender manager are not installed with default distribution (because they depends on an external supplier) but you can find some on %s PDF=PDF PDFDesc=You can set each global options related to the PDF generation PDFAddressForging=Rules to forge address boxes @@ -861,6 +866,7 @@ MAIN_PROXY_PASS=Password to use the proxy server DefineHereComplementaryAttributes=Define here all atributes, not already available by default, and that you want to be supported for %s. ExtraFields=Complementary attributes ExtraFieldHasWrongValue=Attribut %s has a wrong value. +AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space SendingMailSetup=Setup of sendings by email SendmailOptionNotComplete=Warning, on some Linux systems, to send email from your email, sendmail execution setup must conatins option -ba (parameter mail.force_extra_parameters into your php.ini file). If some recipients never receive emails, try to edit this PHP parameter with mail.force_extra_parameters = -ba). PathToDocuments=Path to documents diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 3b758e008ce..aced8c2c897 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -235,7 +235,7 @@ Discount=Discount Discounts=Discounts AddDiscount=Create discount AddRelativeDiscount=Create relative discount -EditRelativelDiscount=Edit relatvie discount +EditRelativeDiscount=Edit relative discount AddGlobalDiscount=Create absolute discount EditGlobalDiscounts=Edit absolute discounts AddCreditNote=Create credit note diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index a9b3a81142b..7786a8ef3fe 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -93,112 +93,133 @@ ProfId2Short=Prof. id 2 ProfId3Short=Prof. id 3 ProfId4Short=Prof. id 4 ProfId5Short=Prof. id 5 +ProfId6Short=Prof. id 5 ProfId1=Professional ID 1 ProfId2=Professional ID 2 ProfId3=Professional ID 3 ProfId4=Professional ID 4 ProfId5=Professional ID 5 +ProfId6=Professional ID 6 ProfId1AR=Prof Id 1 (CUIT/CUIL) ProfId2AR=Prof Id 2 (Revenu brutes) ProfId3AR=- ProfId4AR=- ProfId5AR=- +ProfId6AR=- ProfId1AU=Prof Id 1 (ABN) ProfId2AU=- ProfId3AU=- ProfId4AU=- ProfId5AU=- +ProfId6AU=- ProfId1BE=Prof Id 1 (Professional number) ProfId2BE=- ProfId3BE=- ProfId4BE=- ProfId5BE=- -#ProfId1BR=CNAE -#ProfId2BR=CNPJ -#ProfId3BR=CPF -#ProfId4BR=INSS -#ProfId5BR=IE -#ProfId6BR=IM +ProfId6BE=- +ProfId1BR=CNPJ +ProfId2BR=IE (Inscricao Estadual) +ProfId3BR=IM (Inscricao Municipal) +ProfId4BR=CPF +#ProfId5BR=CNAE +#ProfId6BR=INSS ProfId1CH=- ProfId2CH=- ProfId3CH=Prof Id 1 (Federal number) ProfId4CH=Prof Id 2 (Commercial Record number) ProfId5CH=- +ProfId6CH=- ProfId1CL=Prof Id 1 (R.U.T.) ProfId2CL=- ProfId3CL=- ProfId4CL=- ProfId5CL=- +ProfId6CL=- ProfId1CO=Prof Id 1 (R.U.T.) ProfId2CO=- ProfId3CO=- ProfId4CO=- ProfId5CO=- +ProfId6CO=- ProfId1DE=Prof Id 1 (USt.-IdNr) ProfId2DE=Prof Id 2 (USt.-Nr) ProfId3DE=Prof Id 3 (Handelsregister-Nr.) ProfId4DE=- ProfId5DE=- +ProfId6DE=- ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) ProfId5ES=- +ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=Prof Id 5 +ProfId5FR=- +ProfId6FR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC ProfId4GB=- ProfId5GB=- +ProfId6GB=- ProfId1HN=Id prof. 1 (RTN) ProfId2HN=- ProfId3HN=- ProfId4HN=- ProfId5HN=- +ProfId6HN=- ProfId1IN=Prof Id 1 (TIN) ProfId2IN=Prof Id 2 (PAN) ProfId3IN=Prof Id 3 (SRVC TAX) ProfId4IN=Prof Id 4 ProfId5IN=Prof Id 5 +ProfId6IN=- ProfId1MA=Id prof. 1 (R.C.) ProfId2MA=Id prof. 2 (Patente) ProfId3MA=Id prof. 3 (I.F.) ProfId4MA=Id prof. 4 (C.N.S.S.) ProfId5MA=- +ProfId6MA=- ProfId1MX=Prof Id 1 (R.F.C). ProfId2MX=Prof Id 2 (R..P. IMSS) ProfId3MX=Prof Id 3 (Profesional Charter) ProfId4MX=- ProfId5MX=- +ProfId6MX=- ProfId1NL=KVK nummer ProfId2NL=- ProfId3NL=- -ProfId4NL=- +ProfId4NL=Burgerservicenummer (BSN) ProfId5NL=- +ProfId6NL=- ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) ProfId5PT=- +ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA ProfId3SN=- ProfId4SN=- ProfId5SN=- +ProfId6SN=- ProfId1TN=Prof Id 1 (RC) ProfId2TN=Prof Id 2 (Fiscal matricule) ProfId3TN=Prof Id 3 (Douane code) ProfId4TN=Prof Id 4 (BAN) ProfId5TN=- +ProfId6TN=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) ProfId3RU=Prof Id 3 (KPP) ProfId4RU=Prof Id 4 (OKPO) ProfId5RU=- +ProfId6RU=- VATIntra=VAT number VATIntraShort=VAT number VATIntraVeryShort=VAT @@ -252,6 +273,7 @@ LastProspect=Last ProspectToContact=Prospect to contact CompanyDeleted=Company "%s" deleted from database. ListOfContacts=List of contacts/addresses +ListOfContactsAddresses=List of contacts/adresses ListOfProspectsContacts=List of prospect contacts ListOfCustomersContacts=List of customer contacts ListOfSuppliersContacts=List of supplier contacts diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index c5ddcf6a9c2..11dd26b2d5e 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -104,6 +104,8 @@ ErrorBadValueForCode=Bad value for security code. Try again with new value... ErrorBothFieldCantBeNegative=Fields %s and %s can't be both negative ErrorWebServerUserHasNotPermission=User account %s used to execute web server has no permission for that ErrorNoActivatedBarcode=No barcode type activated +ErrorOSSystem=The online installation does not support your operating system.
    Install the component manually. +ErrorUncompFile=Unable to install the package %s # Warnings WarningSafeModeOnCheckExecDir=Warning, PHP option safe_mode is on so command must be stored inside a directory declared by php parameter safe_mode_exec_dir. diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 9ada97fc97b..d5deed6ec64 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -75,6 +75,8 @@ SentTo=Sent to %s MailingStatusRead=Read CheckRead=Read Receipt YourMailUnsubcribeOK=The email %s is correctly unsubcribe from mailing list +MailtoEMail=Hyper link to email +ActivateCheckRead=Activate Read receipt and unsubcribe tag # Libelle des modules de liste de destinataires mailing MailingModuleDescContactCompanies=Contacts of all third parties (customer, prospect, supplier, ...) diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 4ecd3a3ccba..cfaba733759 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -120,7 +120,6 @@ LastMembersModified=Last %s modified members LastSubscriptionsModified=Last %s modified subscriptions AttributeName=Attribute name FieldEdition=Edition of field %s -AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space String=String Text=Text Int=Int diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index 57a47022b94..d795dc7f28a 100644 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -3,6 +3,7 @@ CHARSET=UTF-8 OrdersArea=Customers orders area SuppliersOrdersArea=Suppliers orders area OrderCard=Order card +OrderId=Order Id Order=Order Orders=Orders OrderLine=Order line diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index a23694d2501..e9a2e4775cc 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -213,9 +213,10 @@ Developpers=Desarrolladores/contribuidores OtherDeveloppers=Otros desarrolladores/contribuidores OfficialWebSite=Sitio web oficial internacional OfficialWebSiteFr=sitio web oficial habla francesa -OfficialWiki=Wiki Dolibarr +OfficialWiki=Wiki documentación Dolibarr OfficialDemo=Demo en línea Dolibarr OfficialMarketPlace=Sitio oficial de módulos complementarios y extensiones +OfficialWebHostingService=Servicio oficial de alojamiento (SaaS) ForDocumentationSeeWiki=Para la documentación de usuario, desarrollador o Preguntas Frecuentes (FAQ), consulte el wiki Dolibarr:
    %s ForAnswersSeeForum=Para otras cuestiones o realizar sus propias consultas, puede utilizar el foro Dolibarr:
    %s HelpCenterDesc1=Esta aplicación, independiente de Dolibarr, le permite ayudarle a obtener un servicio de soporte de Dolibarr. @@ -265,6 +266,12 @@ FindPackageFromWebSite=Buscar el paquete que responde a su necesidad (por ejempl DownloadPackageFromWebSite=Descargar el paquete desde el sitio %s. UnpackPackageInDolibarrRoot=Descomprimir el paquete en el directorio raíz de Dolibarr %s sobre los archivos existentes (sin desplazar o borrar los existentes, so pena de perder su configuración o los módulos no oficiales instalados) SetupIsReadyForUse=La instalación ha finalizado y Dolibarr está disponible con el nuevo componente. + +NotExistsDirect=No existe el directorio alternativo.
    +InfDirAlt=Desde la versión 3 es posible definir un directorio root alternativo, esto le permite almacenar en el mismo lugar módulos y temas personalizados.
    Basta con crear un directorio en el raíz de Dolibarr (por ejemplo: custom).
    +InfDirExample=
    Seguidamente se declara en el archivo conf.php:
    $dolibarr_main_url_root_alt='http://miservidor/custom'
    $dolibarr_main_document_root_alt='/directorio/de/dolibarr/htdocs/custom'
    *Estas lineas vienen comentadas con un "#", para descomentarlas solo hay que retirar el caracter. +YouCanSubmitFile=Seleccione módulo: + CurrentVersion=Versión actual de Dolibarr CallUpdatePage=Llamar a la página de actualización de la estructura y datos de la base de datos %s. LastStableVersion=Última versión estable disponible @@ -311,7 +318,7 @@ ResponseTimeout=Timeout de respuesta SmsTestMessage=Mensaje de prueba de __PHONEFROM__ para __PHONETO__ ModuleMustBeEnabledFirst=Para usar esta función debe estar activado el módulo %s. SecurityToken=Clave para encriptar urls -NoSmsEngine=No hay disponible ningún gestor de envío de SMS. Los gestores de envío de SMS no se instalan en estándar (ya que dependen de un proveedor), pero puede encontrar en la plataforma http://www.dolistore.com +NoSmsEngine=No hay disponible ningún gestor de envío de SMS. Los gestores de envío de SMS no se instalan en estándar (ya que dependen de un proveedor), pero puede encontrar en la plataforma %s PDF=PDF PDFDesc=Puede definir aquí las opciones globales para la generación de los PDF PDFAddressForging=Reglas de visualización de direcciones @@ -868,7 +875,8 @@ MAIN_PROXY_PASS=Contraseña del servidor proxy DefineHereComplementaryAttributes=Defina aquí la lista de atributos adicionales, no disponibles en estándar, y que desea gestionar para %s. ExtraFields=Atributos adicionales ExtraFieldHasWrongValue=El atributo %s tiene un valor incorrecto. -SendingMailSetup=Configuració de l'enviament per mail +AlphaNumOnlyCharsAndNoSpace=solamente caracteres alfanuméricos sin espacios +SendingMailSetup=Configuración del envío por mail SendmailOptionNotComplete=Atención, en algunos sistemas Linux, con este método de envio, para poder enviar mails en su nombre, la configuración de sendmail debe contener la opción -ba (parámetro mail.force_extra_parameters en el archivo php.ini). Si algunos de sus destinatarios no reciben sus mensajes, pruebe a modificar este parámetro PHP con mail.force_extra_parameters=-ba. PathToDocuments=Rutas de acceso a documentos PathDirectory=Directorio diff --git a/htdocs/langs/es_ES/agenda.lang b/htdocs/langs/es_ES/agenda.lang index f7ba39c6fdb..d23a658373d 100644 --- a/htdocs/langs/es_ES/agenda.lang +++ b/htdocs/langs/es_ES/agenda.lang @@ -10,6 +10,8 @@ LocalAgenda=Calendario local AffectedTo=Asignada a DoneBy=Realizado por Events=Eventos +MyEvents=Mis eventos +OtherEvents=Otros eventos ListOfActions=Listado de eventos EventOnFullDay=Evento para todo el día Location=Localización @@ -63,8 +65,10 @@ AgendaUrlOptions4=logint=%s para restringir inserciones a acciones que af AgendaUrlOptions5=logind=%s para restringir inserciones a acciones realizadas por el usuario %s. AgendaShowBirthdayEvents=Mostrar cumpleaños de los contactos AgendaHideBirthdayEvents=Ocultar cumpleaños de los contactos + +# External Sites ical +ExportCal=Exportar calendario ExtSites=Calendarios externos -# External Sites ical= ExtSitesEnableThisTool=Mostrar calendarios externos en la agenda ExtSitesNbOfAgenda=Número de calendarios AgendaExtNb=Calendario nº %s diff --git a/htdocs/langs/es_ES/companies.lang b/htdocs/langs/es_ES/companies.lang index 8d45c2e63bf..7935411caf7 100644 --- a/htdocs/langs/es_ES/companies.lang +++ b/htdocs/langs/es_ES/companies.lang @@ -95,16 +95,18 @@ ProfId2Short=Prof. id 2 ProfId3Short=Prof. id 3 ProfId4Short=Prof. id 4 ProfId5Short=Prof. id 5 -ProfId1AR=CUIT/CUIL -ProfId2AR=Ingresos brutos -ProfId3AR=- -ProfId4AR=- -ProfId5AR=- +ProfId6Short=Prof. id 6 ProfId1=ID profesional 1 ProfId2=ID profesional 2 ProfId3=ID profesional 3 ProfId4=ID profesional 4 ProfId5=ID profesional 5 +ProfId6=ID profesional 6 +ProfId1AR=CUIT/CUIL +ProfId2AR=Ingresos brutos +ProfId3AR=- +ProfId4AR=- +ProfId5AR=- ProfId1AU=ABN ProfId2AU=- ProfId3AU=- @@ -115,12 +117,12 @@ ProfId2BE=- ProfId3BE=- ProfId4BE=- ProfId5BE=- -#ProfId1BR=CNAE -#ProfId2BR=CNPJ -#ProfId3BR=CPF -#ProfId4BR=INSS -#ProfId5BR=IE -#ProfId6BR=IM +ProfId1BR=CNPJ +ProfId2BR=IE (Inscricao Estadual) +ProfId3BR=IM (Inscricao Municipal) +ProfId4BR=CPF +#ProfId5BR=CNAE +#ProfId6BR=INSS ProfId1CH=- ProfId2CH=- ProfId3CH=Número federado @@ -151,6 +153,7 @@ ProfId2FR=SIRET ProfId3FR=NAF (Ex APE) ProfId4FR=RCS/RM ProfId5FR=- +ProfId6FR=- ProfId1GB=Número registro ProfId2GB=- ProfId3GB=SIC diff --git a/htdocs/langs/es_ES/errors.lang b/htdocs/langs/es_ES/errors.lang index 0ec14146485..af2766c4856 100644 --- a/htdocs/langs/es_ES/errors.lang +++ b/htdocs/langs/es_ES/errors.lang @@ -105,6 +105,8 @@ ErrorBothFieldCantBeNegative=Los campos %s y %s no pueden ser negativos ErrorNoActivatedBarcode=Ningún tipo de código de barra activado ErrorWebServerUserHasNotPermission=La cuenta de ejecución del servidor web %s no dispone de los permisos para esto ErrorNoActivatedBarcode=No hay activado ningún tipo de código de barras +ErrorOSSystem=La instalación online no soporta su sistema operativo.
    Instale la extensión manualmente. +ErrorUncompFile=No es posible instalar el paquete %s # Warnings WarningSafeModeOnCheckExecDir=Atención, está activada la opción PHP safe_mode, el comando deberá estar dentro de un directorio declarado dentro del parámetro php safe_mode_exec_dir. diff --git a/htdocs/langs/es_ES/mails.lang b/htdocs/langs/es_ES/mails.lang index c068a7d57d4..ba4acfc091a 100644 --- a/htdocs/langs/es_ES/mails.lang +++ b/htdocs/langs/es_ES/mails.lang @@ -74,6 +74,8 @@ SentTo=Enviado a %s MailingStatusRead=Leido CheckRead=Confirmación de lectura YourMailUnsubcribeOK=El correo electrónico %s es correcta desuscribe. +MailtoEMail=mailto email (hyperlink) +ActivateCheckRead=Activar Confirmación de lectura y desuscribe option # Libelle des modules de liste de destinataires mailing= MailingModuleDescContactCompanies=Contactos de terceros (clientes potenciales, clientes, proveedores...) diff --git a/htdocs/langs/es_ES/members.lang b/htdocs/langs/es_ES/members.lang index 308acf69e5a..fac0c82d0c5 100644 --- a/htdocs/langs/es_ES/members.lang +++ b/htdocs/langs/es_ES/members.lang @@ -123,7 +123,6 @@ LastMembersModified=Los %s últimos miembros modificados LastSubscriptionsModified=Lass %s últimas afiliaciones modificadas AttributeName=Nombre del atributo FieldEdition=Edición del campo %s -AlphaNumOnlyCharsAndNoSpace=solamente caracteres alfanuméricos sin espacios String=Cadena Text=Texto largo Int=Numérico diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index b5053e3aef7..19199ccbf9f 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -216,6 +216,7 @@ OfficialWebSiteFr= Site web officiel francophone OfficialWiki= Wiki de documentation Dolibarr OfficialDemo= Démo en ligne Dolibarr OfficialMarketPlace=Place de marché officielle des modules et extensions complémentaires +OfficialWebHostingService=Service d'hébergement officiel (SaaS) ForDocumentationSeeWiki= Pour la documentation utilisateur, développeur ou les FAQs,
    consultez le wiki Dolibarr:
    %s ForAnswersSeeForum= Pour tout autre question/aide, vous pouvez utiliser le forum Dolibarr:
    %s HelpCenterDesc1= Cette application, indépendante de Dolibarr, vous permet de vous aider à obtenir un service de support sur Dolibarr. @@ -265,6 +266,10 @@ FindPackageFromWebSite=Recherche le package qui répond à votre besoin (par exe DownloadPackageFromWebSite= Télécharger le package. UnpackPackageInDolibarrRoot= Décompresser le package dans le répertoire racine de Dolibarr %s par dessus les fichiers existants (sans déplacer ou effacer cet existant sous peine de perdre sa configuration ou les modules non officiels installés) SetupIsReadyForUse= L'installation est terminée et Dolibarr est prêt à être utilisé avec le nouveau composant. +NotExistsDirect=Il n'y a pas répertoire alternative.
    +InfDirAlt=Depuis la version 3 est possible de définir un répertoire alternatif qui vous permet de stocker dans le même endroit les modules et thèmes personnalisés.
    Il suffit de créer un répertoire à la racine de Dolibarr (par exemple: custom).
    +InfDirExample=
    Ensuite, declarons dans le fichier conf.php:
    $dolibarr_main_url_root_alt='http://monserveur/custom'
    $dolibarr_main_document_root_alt='/repertoire/de/dolibarr/htdocs/custom'
    *Ces lignes sont commentées par "#" de décommenter suffit de supprimer le caractère. +YouCanSubmitFile=Sélectionner le module: CurrentVersion= Version en cours de Dolibarr CallUpdatePage= Appeler la page de l'outil de mise à jour de la structure et données de la base: %s. LastStableVersion= Dernière version stable disponible @@ -311,7 +316,7 @@ ResponseTimeout=Timeout de réponse SmsTestMessage=Message de test de __PHONEFROM__ vers __PHONETO__ ModuleMustBeEnabledFirst=Le module %s doit etre activé pour utiliser cette fonction. SecurityToken=Clé de sécurisation des URLs -NoSmsEngine=Aucun gestionnaire d'envoi de SMS n'est disponible. Les gestionnaires d'envois SMS ne sont pas installés en standard (car dépendent d'un fournisseur) mais vous pourrez en trouver depuis la plateforme http://www.dolistore.com +NoSmsEngine=Aucun gestionnaire d'envoi de SMS n'est disponible. Les gestionnaires d'envois SMS ne sont pas installés en standard (car dépendent d'un fournisseur) mais vous pourrez en trouver depuis la plateforme %s PDF=PDF PDFDesc=Vous pouvez définir ici des options globales sur la génération des PDF PDFAddressForging=Règle de fabrication des zones adresses @@ -866,9 +871,10 @@ MAIN_PROXY_HOST=Nom/Adresse du serveur proxy mandataire MAIN_PROXY_PORT=Port du serveur proxy mandataire MAIN_PROXY_USER=Login pour passer le serveur proxy mandataire MAIN_PROXY_PASS=Mot de passe pour passer le serveur proxy mandataire -DefineHereComplementaryAttributes=Definissez ici la liste des attributs supplémentaire, non disponible en standard, et que vous voulez voir gérez sur les %s. +DefineHereComplementaryAttributes=Définissez ici la liste des attributs supplémentaires, non disponibles en standard, et que vous voulez voir gérer sur les %s. ExtraFields=Attributs suplémentaires ExtraFieldHasWrongValue=L'attribut %s a une valeur incorrecte. +AlphaNumOnlyCharsAndNoSpace=uniquement caractères alphanumériques sans espace SendingMailSetup=Configuration de l'envoi par mail SendmailOptionNotComplete=Attention, sur certains systèmes Linux, avec cette méthode d'envoi, pour pouvoir envoyer des mails en votre nom, la configuration d'exécution de sendmail doit contenir l'option -ba (paramètre mail.force_extra_parameters dans le fichier php.ini). Si certains de vos destinataires ne reçoivent pas de message, essayer de modifer ce paramètre PHP avec mail.force_extra_parameters = -ba. PathToDocuments= Chemin d'accès aux documents diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index 72f1e63930e..530dd6cb1a1 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -95,112 +95,133 @@ ProfId2Short=Id prof. 2 ProfId3Short=Id prof. 3 ProfId4Short=Id prof. 4 ProfId5Short=Id prof. 5 +ProfId6Short=Id prof. 6 ProfId1=Id professionnel 1 ProfId2=Id professionnel 2 ProfId3=Id professionnel 3 ProfId4=Id professionnel 4 ProfId5=Id professionnel 5 +ProfId6=Id professionnel 6 ProfId1AR=Id prof. 1 (CUIT/CUIL) ProfId2AR=Id prof. 2 (Revenu brutes) ProfId3AR=- ProfId4AR=- ProfId5AR=- +ProfId6AR=- ProfId1AU=Id prof. 1 (ABN) ProfId2AU=- ProfId3AU=- ProfId4AU=- ProfId5AU=- +ProfId6AU=- ProfId1BE=Id prof. 1 (N° professionnel) ProfId2BE=- ProfId3BE=- ProfId4BE=- ProfId5BE=- -#ProfId1BR=CNAE -#ProfId2BR=CNPJ -#ProfId3BR=CPF -#ProfId4BR=INSS -#ProfId5BR=IE -#ProfId6BR=IM +ProfId6BE=- +ProfId1BR=CNPJ +ProfId2BR=IE (Inscricao Estadual) +ProfId3BR=IM (Inscricao Municipal) +ProfId4BR=CPF +#ProfId5BR=CNAE +#ProfId6BR=INSS ProfId1CH=- ProfId2CH=- ProfId3CH=Numéro fédéral ProfId4CH=Num registre du commerce ProfId5CH=- +ProfId6CH=- ProfId1CL=Prof Id 1 (R.U.T.) ProfId2CL=- ProfId3CL=- ProfId4CL=- ProfId5CL=- +ProfId6CL=- ProfId1CO=Prof Id 1 (R.U.T.) ProfId2CO=- ProfId3CO=- ProfId4CO=- ProfId5CO=- +ProfId6CO=- ProfId1DE=Id prof. 1 (USt.-IdNr) ProfId2DE=Id prof. 2 (USt.-Nr) ProfId3DE=Id prof. 3 (Handelsregister-Nr.) ProfId4DE=- ProfId5DE=- +ProfId6DE=- ProfId1ES=Id prof. 1 (CIF/NIF) ProfId2ES=Id prof. 2 (Num sécurité social) ProfId3ES=Id prof. 3 (CNAE) ProfId4ES=Id prof. 4 (Num Collégiale) ProfId5ES=- +ProfId6ES=- ProfId1FR=Id prof. 1 (SIREN) ProfId2FR=Id prof. 2 (SIRET) ProfId3FR=Id prof. 3 (NAF, ex APE) ProfId4FR=Id prof. 4 (RCS/RM) -ProfId5FR=Id prof. 5 +ProfId5FR=- +ProfId6FR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC ProfId4GB=- ProfId5GB=- +ProfId6GB=- ProfId1HN=Id prof. 1 (RTN) ProfId2HN=- ProfId3HN=- ProfId4HN=- ProfId5HN=- +ProfId6HN=- ProfId1IN=Id prof. 1 (TIN) ProfId2IN=Id prof. 2 (PAN) ProfId3IN=Id prof. 3 (SRVC TAX) ProfId4IN=Id prof. 4 ProfId5IN=Id prof. 5 +ProfId6IN=- ProfId1MA=Id prof. 1 (R.C.) ProfId2MA=Id prof. 2 (Patente) ProfId3MA=Id prof. 3 (I.F.) ProfId4MA=Id prof. 4 (C.N.S.S.) ProfId5MA=- +ProfId6MA=- ProfId1MX=Prof Id 1 (R.F.C). ProfId2MX=Prof Id 2 (R..P. IMSS) ProfId3MX=Prof Id 3 (Charte Profesional) ProfId4MX=- ProfId5MX=- +ProfId6MX=- ProfId1NL=KVK nummer ProfId2NL=- ProfId3NL=- -ProfId4NL=- +ProfId4NL=Burgerservicenummer (BSN) ProfId5NL=- +ProfId6NL=- ProfId1PT=Id prof. 1 (NIPC) ProfId2PT=Id prof. 2 (Num sécurité social) ProfId3PT=Id prof. 3 (Num enreg. commercial) ProfId4PT=Id prof. 4 (Conservatory) ProfId5PT=Id prof. 5 +ProfId6PT=- ProfId1RU=Id prof.1 (OGRN) ProfId2RU=Id prof.2 (INN) ProfId3RU=Id prof.3 (KPP) ProfId4RU=Id prof.4 (OKPO) ProfId5RU=- +ProfId6RU=- ProfId1SN=RC ProfId2SN=NINEA ProfId3SN=- ProfId4SN=- ProfId5SN=- +ProfId6SN=- ProfId1TN=Id prof. 1 (RC) ProfId2TN=Id prof. 2 (Matricule fiscal) ProfId3TN=Id prof. 3 (Code en douane) ProfId4TN=Id prof. 4 (BAN) ProfId5TN=- +ProfId6TN=- VATIntra=Numéro de TVA VATIntraShort=Num TVA VATIntraVeryShort=N° TVA diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index ce85bd48f60..f1ef34ea9e4 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -105,6 +105,8 @@ ErrorBadValueForCode=Mauvaise valeur saisie pour le code. Réessayez avec une no ErrorBothFieldCantBeNegative=Les champs %s et %s ne peuvent être tous deux négatifs ErrorWebServerUserHasNotPermission=Le compte d'execution du serveur web %s n'a pas les permissions pour cela ErrorNoActivatedBarcode=Aucun type de code bar activé +ErrorOSSystem=L'installation en ligne ne prend pas en charge votre OS.
    Installez le composant manuellement. +ErrorUncompFile=Impossible d'installer le package %s # Warnings WarningSafeModeOnCheckExecDir=Attention, l'option PHP safe_mode est active, la commande doit dont être dans un répertoire déclaré dans le paramètre php safe_mode_exec_dir. diff --git a/htdocs/langs/fr_FR/mails.lang b/htdocs/langs/fr_FR/mails.lang index c80a79615aa..45b5dd24263 100644 --- a/htdocs/langs/fr_FR/mails.lang +++ b/htdocs/langs/fr_FR/mails.lang @@ -75,6 +75,8 @@ SentTo=Envoyés à %s MailingStatusRead=Lu CheckRead=Accusé de lecture YourMailUnsubcribeOK=L'adresse e-mail %s est bien désincrite de la liste. +MailtoEMail=Ecrire a e-mail (lien) +ActivateCheckRead=Activer les tags d'accusé de lecture et de désincription # Libelle des modules de liste de destinataires mailing MailingModuleDescContactCompanies=Contacts de tiers (prospects, clients, fournisseurs...) diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index b28d2c009a4..b89e294a037 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -80,7 +80,7 @@ AttributeCode=Code de l'attribut OptionalFieldsSetup=Configuration des champs optionnels MembersTypeSetup=Configuration des types d'adhérents NewSubscription=Nouvelle adhésion -NewSubscriptionDesc=Ce formulaire permet de vous enregistrer comme nouvel adhérent de l'association. Pour un renouvellement si vous êtes déjà adhérent, contacter plutôt l'association par mail %s. +NewSubscriptionDesc=Ce formulaire permet de vous enregistrer comme nouvel adhérent de l'association. Pour un renouvellement si vous êtes déjà adhérent, contactez plutôt l'association par mail %s. Subscription=Adhésion/cotisation Subscriptions=Adhésions/cotisations SubscriptionLate=En retard @@ -114,8 +114,8 @@ ConfirmValidateMember=Êtes-vous sûr de vouloir valider cet adhérent ? FollowingLinksArePublic=Les liens suivants sont des pages accessibles à tous et non protégées par aucune habilitation Dolibarr. Ces pages n'ont aucun formatage et sont fournies à titre d'exemple pour les associations qui veulent des scripts publics de consultation. PublicMemberList=Liste des membres publics BlankSubscriptionForm=Formulaire publique d'auto-inscription -BlankSubscriptionFormDesc=Dolibarr peut offrir une URL de page publique pour les visiteurs externes permettant de postuler à une adhésion. Si un un module de paiement en ligne est également actif, un formulaire de paiement sera également automatiquement proposé. -EnablePublicSubscriptionForm=Activer le formulaire publique d'autoinscription +BlankSubscriptionFormDesc=Dolibarr peut offrir une URL de page publique permettant de postuler à une adhésion pour les visiteurs externes. S'il existe un module de paiement en ligne, un formulaire de paiement sera également automatiquement proposé. +EnablePublicSubscriptionForm=Activer le formulaire publique d'auto-inscription MemberPublicLinks=Liens/pages publiques ExportDataset_member_1=Adhérents et adhésions ImportDataset_member_1=Adhérents @@ -124,7 +124,6 @@ LastMembersModified=Les %s derniers adhérents modifiés LastSubscriptionsModified=Les %s dernières adhésions modifiées AttributeName=Nom de l'attribut FieldEdition=Édition du champ %s -AlphaNumOnlyCharsAndNoSpace=uniquement caractères alphanumériques sans espace String=Chaîne Text=Texte long Int=Numérique @@ -151,8 +150,8 @@ DescADHERENT_CARD_HEADER_TEXT=Texte imprimé sur le haut des cartes d'adhérent DescADHERENT_CARD_TEXT=Texte imprimé sur les cartes d'adhérent (Aligné à gauche) DescADHERENT_CARD_TEXT_RIGHT=Texte imprimé sur les cartes d'adhérent (Aligné à droite) DescADHERENT_CARD_FOOTER_TEXT=Texte imprimé sur le bas des cartes d'adhérent -DescADHERENT_MAILMAN_LISTS=Liste(s) auxquelles inscrire les nouveaux adhérents (séparés par une virgule) -GlobalConfigUsedIfNotDefined=Le texte définie dans la configuration du module Adhérent sera utilisée si cette valeur est non définie ici. +DescADHERENT_MAILMAN_LISTS=Liste(s) à la quelle (auxquelles) inscrire les nouveaux adhérents (séparés par une virgule) +GlobalConfigUsedIfNotDefined=Le texte défini dans la configuration du module Adhérent sera utilisé si cette valeur est non définie ici. MayBeOverwrited=Cette valeur peut être écrasée par le texte défini au niveau du type d'adhérent ShowTypeCard=Voir type '%s' HTPasswordExport=Génération fichier htpassword @@ -164,10 +163,10 @@ MoreActionBankDirect=Création transaction sur compte bancaire ou caisse directe MoreActionBankViaInvoice=Création facture avec paiement sur compte bancaire ou caisse MoreActionInvoiceOnly=Création facture sans paiement LinkToGeneratedPages=Génération de cartes de visites -LinkToGeneratedPagesDesc=Cet écran vous permet de générer des planches de cartes de visites pour chaque adhérents ou pour un adhérent en particulier. +LinkToGeneratedPagesDesc=Cet écran vous permet de générer des planches de cartes de visite pour chaque adhérent ou pour un adhérent en particulier. DocForAllMembersCards=Génération de cartes pour tous les adhérents (Format de planche actuellement configuré: %s) DocForOneMemberCards=Génération de cartes pour un adhérent particulier (Format de planche actuellement configuré: %s) -DocForLabels=Génération d'étiquette d'adresses (Format de planche actuellement configuré: %s) +DocForLabels=Génération d'étiquettes d'adresses (Format de planche actuellement configuré: %s) SubscriptionPayment=Paiement cotisation LastSubscriptionDate=Date de la dernière cotisation LastSubscriptionAmount=Montant de la dernière cotisation @@ -176,26 +175,26 @@ MembersStatisticsByState=Statistiques des membres par département/province/cant MembersStatisticsByTown=Statistiques des membres par ville NbOfMembers=Nombre de membres NoValidatedMemberYet=Aucun membre validé trouvé -MembersByCountryDesc=Cet écran vous présente une vue statistique du nombre d'adhérent par pays. Le graphique utilise toutefois le service en ligne de graphique de Google et n'est opérationnel uniquement si une connexion internet est disponible. -MembersByStateDesc=Cet écran vous présente une vue statistique du nombre d'adhérent par département/province/canton. -MembersByTownDesc=Cet écran vous présente une vue statistique du nombre d'adhérent par ville. +MembersByCountryDesc=Cet écran vous présente une vue statistique du nombre d'adhérents par pays. Le graphique utilise toutefois le service en ligne de graphique de Google et n'est opérationnel uniquement que si une connexion internet est disponible. +MembersByStateDesc=Cet écran vous présente une vue statistique du nombre d'adhérents par département/province/canton. +MembersByTownDesc=Cet écran vous présente une vue statistique du nombre d'adhérents par ville. MembersStatisticsDesc=Choisissez les statistiques que vous désirez consulter... MenuMembersStats=Statistiques LastMemberDate=Date dernier adhérent Nature=Nature Public=Informations publiques Exports=Exports -NewMemberbyWeb=Nouvel Adherent ajoute. En attente de validation -NewMemberForm=Nouvel Adherent form +NewMemberbyWeb=Nouvel Adhérent ajoute. En attente de validation +NewMemberForm=Nouvel Adhérent form SubscriptionsStatistics=Statistiques sur les cotisations NbOfSubscriptions=Nombre de cotisations AmountOfSubscriptions=Montant de cotisations TurnoverOrBudget=Chiffre affaire (pour société) ou Budget (asso ou collectivité) DefaultAmount=Montant par défaut de la cotisation CanEditAmount=Le visiteur peut modifier/choisir le montant de sa cotisation -MEMBER_NEWFORM_PAYONLINE=Débrancher sur la page intégrée de paiement en ligne +MEMBER_NEWFORM_PAYONLINE=Rediriger sur la page intégrée de paiement en ligne Associations=Associations Collectivités=Collectivités Particuliers=Particuliers Entreprises=Entreprises -DOLIBARRFOUNDATION_PAYMENT_FORM=Pour réaliser le paiement de votre cotisation par virement bancaire ou par chèque, consulter la page http://wiki.dolibarr.org/index.php/Adhérer.
    Pour payer dès maintenant par Carte Bancaire ou Paypal, cliquer sur le bouton au bas de cette page.
    +DOLIBARRFOUNDATION_PAYMENT_FORM=Pour réaliser le paiement de votre cotisation par virement bancaire ou par chèque, consultez la page http://wiki.dolibarr.org/index.php/Adhérer.
    Pour payer dès maintenant par Carte Bancaire ou Paypal, cliquez sur le bouton au bas de cette page.
    diff --git a/htdocs/langs/fr_FR/orders.lang b/htdocs/langs/fr_FR/orders.lang index 3d0532f02e7..e9c4d7c5cac 100644 --- a/htdocs/langs/fr_FR/orders.lang +++ b/htdocs/langs/fr_FR/orders.lang @@ -3,6 +3,7 @@ CHARSET=UTF-8 OrdersArea=Espace commandes clients SuppliersOrdersArea=Espace commandes fournisseurs OrderCard=Fiche commande +OrderId=Id commande Order=Commande Orders=Commandes OrderLine=Ligne de commande @@ -109,6 +110,7 @@ PaymentOrderRef=Paiement commande %s CloneOrder=Cloner commande ConfirmCloneOrder=Êtes-vous sûr de vouloir cloner cette commande %s ? DispatchSupplierOrder=Réception de la commande fournisseur %s +DateDeliveryPlanned=Date de livraison prévue ##### Types de contacts ##### TypeContact_commande_internal_SALESREPFOLL=Responsable suivi commande client TypeContact_commande_internal_SHIPPING=Responsable envoi commande client diff --git a/htdocs/langs/nl_NL/companies.lang b/htdocs/langs/nl_NL/companies.lang index 326d200ab36..d9ea4539cac 100644 --- a/htdocs/langs/nl_NL/companies.lang +++ b/htdocs/langs/nl_NL/companies.lang @@ -128,7 +128,7 @@ ProfId4MA = Id prof. 4 (C.N.S.S.) ProfId1NL = KVK nummer ProfId2NL = ProfId3NL = -ProfId4NL = Burgerservicenummer +ProfId4NL = Burgerservicenummer (BSN) ProfId1PT = Prof. id 1 (NIPC) ProfId2PT = Prof. id 2 (Social security number) ProfId3PT = Prof. Id 3 (Commercial Record aantal) diff --git a/htdocs/langs/pt_BR/banks.lang b/htdocs/langs/pt_BR/banks.lang old mode 100644 new mode 100755 index 25fd06d13b6..aa49bec395d --- a/htdocs/langs/pt_BR/banks.lang +++ b/htdocs/langs/pt_BR/banks.lang @@ -12,7 +12,7 @@ BankAccounts=Contas Bancarias AccountRef=Ref. Conta Financeira AccountLabel=Etiqueta da Conta Financeira CashAccount=Conta Caixa/Efetivo -CashAccounts=Contas Caixa/Efecivo +CashAccounts=Contas Caixa/Efetivo MainAccount=Conta Principal CurrentAccount=Conta Corrente CurrentAccounts=Contas Correntes diff --git a/htdocs/langs/pt_BR/bills.lang b/htdocs/langs/pt_BR/bills.lang old mode 100644 new mode 100755 index 9603063da48..4b4f08b5f62 --- a/htdocs/langs/pt_BR/bills.lang +++ b/htdocs/langs/pt_BR/bills.lang @@ -1,4 +1,5 @@ # Dolibarr language file - pt_BR rev. 0.0 - bills +# 2012 Vinícius Nogueira CHARSET=UTF-8 Bill=Fatura Bills=Faturas @@ -12,6 +13,8 @@ BillsUnpayed=Pendentes de Pagamento BillsLate=Atrasos de Pagamento BillsStatistics=Estatísticas faturas a clientes BillsStatisticsSuppliers=Estatísticas faturas de Fornecedores +RelatedBill=Fatura Anexo +RelatedBills=Faturas Anexos InvoiceStandard=Fatura Standard InvoiceStandardAsk=Fatura Standard InvoiceStandardDesc=Este tipo de fatura é a fatura tradicional. Também é conhecida como Fatura de Débito. @@ -183,8 +186,6 @@ RemainderToTake=Falta Cobrar AmountExpected=Valor Reclamado ExcessReceived=Recebido em Excesso EscompteOffered=Desconto (Pronto pagamento) -CreateDraft=Criar Rascunho -CreateeDraft=Criar Rascunho SendBillRef=Enviar Fatura %s SendReminderBillRef=Lembrete Fatura %s StandingOrders=Débitos Diretos @@ -352,10 +353,12 @@ ChequeDeposits=Depósito de Cheques Cheques=Cheques CreditNoteConvertedIntoDiscount=Este depósito converteu-se em %s UsBillingContactAsIncoiveRecipientIfExist=Utilizar o endereço do contato de cliente de faturação da fatura em vez do endereço do Fornecedor como destinatário das faturas -ShowUnpayedAll=Ver todos os não remunerados -ShowUnpayedLateOnly=Mostrar apenas os não remunerados +ShowUnpaidAll=Mostrar todas as faturas +ShowUnpaidLateOnly=Mostrar apenas faturas em Atraso PaymentInvoiceRef=Pagamento Fatura %s ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Não é possível excluir pagamento de uma Fatura fechada. +CustomerBillsUnpaid=Faturas de Clientes Pendentes de Cobrança +BillsCustomersUnpaid=Faturas de Clientes Pendentes de Cobrança # oursin PDF model Of=de diff --git a/htdocs/langs/pt_BR/commercial.lang b/htdocs/langs/pt_BR/commercial.lang old mode 100644 new mode 100755 index daef48ebcd4..1da77f54c0e --- a/htdocs/langs/pt_BR/commercial.lang +++ b/htdocs/langs/pt_BR/commercial.lang @@ -76,6 +76,8 @@ ActionAC_REL=Lembrete fatura por correio ActionAC_CLO=Fechar ActionAC_EMAILING=Envio mailing massivo ActionAC_COM=Envio Pedido por Correio +ActionAC_OTH=Outro +ActionAC_SHIP=Enviar Por E-Mail Stats=Estatisticas de Venda CAOrder=Ordem CA FromTo=A partir de %s até %s diff --git a/htdocs/langs/pt_BR/companies.lang b/htdocs/langs/pt_BR/companies.lang index b966398e699..2cdef4cf6e5 100644 --- a/htdocs/langs/pt_BR/companies.lang +++ b/htdocs/langs/pt_BR/companies.lang @@ -84,10 +84,14 @@ ProfId1Short=Prof. id 1 ProfId2Short=Prof. id 2 ProfId3Short=Prof. id 3 ProfId4Short=Prof. id 4 +ProfId5Short=Prof. id 5 +ProfId6Short=Prof. id 6 ProfId1=ID profesional 1 ProfId2=ID profesional 2 ProfId3=ID profesional 3 ProfId4=ID profesional 4 +ProfId5=ID profesional 5 +ProfId6=ID profesional 6 ProfId1AU=ABN ProfId2AU=- ProfId3AU=- @@ -96,6 +100,12 @@ ProfId1BE=Núm da Ordem ProfId2BE=- ProfId3BE=- ProfId4BE=- +ProfId1BR=CNPJ +ProfId2BR=IE (Inscricao Estadual) +ProfId3BR=IM (Inscricao Municipal) +ProfId4BR=CPF +#ProfId5BR=CNAE +#ProfId6BR=INSS ProfId1CH=- ProfId2CH=- ProfId3CH=Número federado @@ -112,12 +122,6 @@ ProfId1PT=NIPC ProfId2PT=Núm. Segurança Social ProfId3PT=Num. Reg. Comercial ProfId4PT=Conservatória -#ProfId1BR=CNAE -#ProfId2BR=CNPJ -#ProfId3BR=CPF -#ProfId4BR=INSS -#ProfId5BR=IE -#ProfId6BR=IM ProfId1TN=RC ProfId2TN=Matrícula Fiscal ProfId3TN=Código na Alfandega @@ -149,7 +153,11 @@ DiscountNone=Nenhuma Supplier=Fornecedor CompanyList=Lista de Empresas AddContact=Criar Contato +NewContactAddress=Novo Contato/Endereço Contact=Contato +AddContactAddress=Novo Contato/Endereço +ListOfContacts=Lista de Contatos/Endereços +ListOfContactsAddresses=Lista de Contatos/Endereços NoContactDefined=Nenhum contato definido para este fornecedor DefaultContact=Contato por Padrao AddCompany=Criar Empresa @@ -170,7 +178,6 @@ ThisIsModuleRules=Esta é a regra para este módulo LastProspect=último Cliente Potencial ProspectToContact=Cliente Potencial a Contactar CompanyDeleted=A Empresa "%s" foi Eliminada -ListOfContacts=Lista de Contatos ListOfProspectsContacts=Lista de Contatos Clientes Potenciais ListOfCustomersContacts=Lista de Contatos Clientes ListOfSuppliersContacts=Lista de Contatos Fornecedores @@ -209,7 +216,7 @@ Staff=Empregados ProspectLevelShort=Cli. Potenc. ProspectLevel=Cliente Potencial ContactPrivate=Privado -ContactPublic=Partilhado +ContactPublic=Compartilhado ContactVisibility=Visibilidade OthersNotLinkedToThirdParty=Outros, não associado a um Fornecedor ProspectStatus=Estado cliente potencial diff --git a/htdocs/langs/pt_BR/contracts.lang b/htdocs/langs/pt_BR/contracts.lang old mode 100644 new mode 100755 index bdc06c62afc..babd492a2e2 --- a/htdocs/langs/pt_BR/contracts.lang +++ b/htdocs/langs/pt_BR/contracts.lang @@ -62,7 +62,7 @@ DateStartReal=Data Real Colocação em Serviço DateStartRealShort=Data Inicio DateEndReal=Data Real Fim do Serviço DateEndRealShort=Data Real Finalização -NbOfServices=N� de Serviços +NbOfServices=No de Serviços CloseService=Finalizar Serviço ServicesNomberShort=%s Serviço(s) RunningServices=Serviços Ativos diff --git a/htdocs/langs/pt_BR/main.lang b/htdocs/langs/pt_BR/main.lang old mode 100644 new mode 100755 index f786a7161e0..0e069997cdf --- a/htdocs/langs/pt_BR/main.lang +++ b/htdocs/langs/pt_BR/main.lang @@ -1,4 +1,5 @@ # Dolibarr language file - pt_BR rev. 0.0 - main +# 2012 Vinícius Nogueira CHARSET=UTF-8 SeparatorDecimal=, SeparatorThousand=. @@ -158,7 +159,7 @@ Number=Número Numero=Número Limit=Límite Limits=Limites -DevelopmentTeam=Equipa de Desenvolvimento +DevelopmentTeam=Equipe de Desenvolvimento Logout=Sair Connection=Login Setup=Configuração @@ -175,7 +176,7 @@ DateCreation=Data de Criação DateModification=Data Modificação DateModificationShort=Data Modif. DateLastModification=Data última Modificação -DateValidation=Vata Validação +DateValidation=Data Validação DateClosing=Data de Encerramento DateDue=Data Vencimento DateValue=Data Valor @@ -279,6 +280,7 @@ ActionRunningShort=Iniciado ActionDoneShort=Terminado CompanyFundation=Empresa ou Instituição ContactsForCompany=Contatos desta empresa +ContactsAddressesForCompany=Contatos/Endereços do Cliente ou Fornecedor ActionsOnCompany=Ações nesta sociedade NActions=%s ações NActionsLate=%s em atraso @@ -428,13 +430,13 @@ RebuildDoc=Recriar o doc Entity=Entidade Entities=Entidadees EventLogs=Log -CustomerPreview=Historial Cliente -SupplierPreview=Historial Fornecedor -AccountancyPreview=Historial Contabilidade -ShowCustomerPreview=Ver Historial Cliente -ShowSupplierPreview=Ver Historial Fornecedor -ShowProspectPreview=Ver Historial Cliente Potencial -ShowAccountancyPreview=Ver Historial Contabilidade +CustomerPreview=Historico Cliente +SupplierPreview=Historico Fornecedor +AccountancyPreview=Historico Contabilidade +ShowCustomerPreview=Ver Historico Cliente +ShowSupplierPreview=Ver Historico Fornecedor +ShowProspectPreview=Ver Historico Cliente Potencial +ShowAccountancyPreview=Ver Historico Contabilidade RefCustomer=Ref. Cliente Currency=Moeda InfoAdmin=Informação para os administradores @@ -520,5 +522,6 @@ ShortThursday=Qui ShortFriday=Sex ShortSaturday=Sab ShortSunday=Dom +CreateDraft=Criar Rascunho diff --git a/htdocs/langs/pt_BR/orders.lang b/htdocs/langs/pt_BR/orders.lang old mode 100644 new mode 100755 index 8b4b14c79da..2fed7ad44ce --- a/htdocs/langs/pt_BR/orders.lang +++ b/htdocs/langs/pt_BR/orders.lang @@ -1,6 +1,8 @@ # Dolibarr language file - pt_BR rev. 0.0 - orders +# 2012 Vinícius Nogueira + CHARSET=UTF-8 -OrdersArea=Area de Pedidos de Clientes +OrdersArea=Área de Pedidos de Clientes SuppliersOrdersArea=Área de Pedidos a Fornecedores OrderCard=Ficha Pedido Order=Pedido @@ -59,7 +61,7 @@ ShipProduct=Enviar Produto Discount=Desconto CreateOrder=Criar Pedido RefuseOrder=Rejeitar o Pedido -ApproveOrder=Aceptar o Pedido +ApproveOrder=Aceitar o Pedido ValidateOrder=Confirmar o Pedido DeleteOrder=Eliminar o pedido CancelOrder=Anular o Pedido diff --git a/htdocs/langs/pt_BR/other.lang b/htdocs/langs/pt_BR/other.lang old mode 100644 new mode 100755 index 4c5d70117a0..1435c89e37d --- a/htdocs/langs/pt_BR/other.lang +++ b/htdocs/langs/pt_BR/other.lang @@ -1,4 +1,5 @@ # Dolibarr language file - pt_BR rev. 0.0 - other +# 2012 Vinícius Nogueira CHARSET=UTF-8 SecurityCode=Código Segurança Calendar=Calendário @@ -18,10 +19,10 @@ AttachANewFile=Adicionar Novo Arquivo/Documento LinkedObject=Arquivo Anexo Miscellanous=Diversos NbOfActiveNotifications=Número Notificações -PredefinedMailContentSendInvoice=Le juntamos a fatura __FACREF__\n\n__PERSONALIZED__Cordialmente\n\n__SIGNATURE__ -PredefinedMailContentSendInvoiceReminder=Ponemos na sua conhecimento que a fatura __FACREF__ parece não estar paga. Se a juntamos pois, para que possa revisarla.\n\n__PERSONALIZED__Cordialmente\n\n__SIGNATURE__ -PredefinedMailContentSendProposal=Anexo segue proposta solicitada de codigo__PROPREF__\n\n__PERSONALIZED__Cordialmente\n\n__SIGNATURE__ -PredefinedMailContentSendOrder=Anexo segue o pedido solicitado de codigo __ORDERREF__\n\n__PERSONALIZED__Cordialmente\n\n__SIGNATURE__ +PredefinedMailContentSendInvoice=Le juntamos a fatura __FACREF__\n\nCordialmente\n\n +PredefinedMailContentSendInvoiceReminder=Ponemos na sua conhecimento que a fatura __FACREF__ parece não estar paga. Se a juntamos pois, para que possa revisarla.\n\nCordialmente\n\n +PredefinedMailContentSendProposal=Anexo segue proposta solicitada de codigo__PROPREF__\n\nCordialmente\n\n +PredefinedMailContentSendOrder=Anexo segue o pedido solicitado de codigo __ORDERREF__\n\nCordialmente\n\n DemoDesc=Dolibarr não é um ERP monolítico, mas está composto de módulos funcionais simples e opcionais. uma demonstração que inclua todos estes módulos não tem sentido, já que nunca mais todos Os módulos são utilizados. De todas maneras existe disponíveis muitos perfis de demonstração ChooseYourDemoProfil=quer ver o perfil de demonstração que melhor corresponda e a sua Atividade... DemoFundation=Administração de Membros de uma associação @@ -64,7 +65,7 @@ SizeUnitdm=dm SizeUnitcm=cm SizeUnitmm=mm BugTracker=Incidências -SendNewPasswordDesc=Este formulário permite enviar uma Nova senha. Se enviará à e-mail do usuário
    a modificação da senha não será efetiva até que o usario faça click ao link de confirmação incluido neste e-mail.
    Supervise a sua correio. +SendNewPasswordDesc=Este formulário permite enviar uma Nova senha. Será enviado ao e-mail do usuário
    a modificação da senha não será efetiva até que o usuário click no link de confirmação neste e-mail.
    Verifique sua caixa de correio. BackToLoginPage=Voltar e a página de login AuthenticationDoesNotAllowSendNewPassword=o modo de autentificação de Dolibarr está configurado como "%s".
    neste modo Dolibarr não pode conhecer nem modificar a sua senha
    Contacte com a sua administrador para conhecer as modalidades de alterar. EnableGDLibraryDesc=deve ativar o instalar a Bibliotéca GD na sua PHP para poder ativar esta Opção @@ -112,23 +113,23 @@ ErrorWebcalLoginNotDefined=o login Webcalendar associado e a sua usuário Doliba ErrorPhenixLoginNotDefined=o login Phenix associado e a sua conta Dolibarrr %s não está definido ##### Calendar common #####= AddCalendarEntry=Adicionar entrada ao calendário -NewCompanyToDolibarr=Empresa %s inserida em Dolibarr -ContractValidatedInDolibarr=Contrato %s validado em Dolibarr -ContractCanceledInDolibarr=Contrato %s anulado em Dolibarr -ContractClosedInDolibarr=Contrato %s encerrado no Dolibarr -PropalClosedSignedInDolibarr=Orçamento %s assinado no Dolibarr -PropalClosedRefusedInDolibarr=Orçamento %s rejeitado no Dolibarr -PropalValidatedInDolibarr=orçamento %s validado em Dolibarr -InvoiceValidatedInDolibarr=Fatura %s validada em Dolibarr -InvoicePayedInDolibarr=Fatura %s pasada a paga em Dolibarr -InvoiceCanceledInDolibarr=Fatura %s anulada em Dolibarr -PaymentDoneInDolibarr=pagamento %s realizado em Dolibarr -CustomerPaymentDoneInDolibarr=pagamento de cliente %s em Dolibarr -SupplierPaymentDoneInDolibarr=pagamento a fornecedor %s em Dolibarr -MemberValidatedInDolibarr=membro %s validado em Dolibarr -MemberResiliatedInDolibarr=membro %s dado de baixa em Dolibarr -MemberDeletedInDolibarr=membro %s eliminado de Dolibarr -MemberSubscriptionAddedInDolibarr=Subscrição do membro % adicionada em Dolibarr +NewCompanyToDolibarr=Empresa %s Cadastrada +ContractValidatedInDolibarr=Contrato %s Confirmado +ContractCanceledInDolibarr=Contrato %s Cancelado +ContractClosedInDolibarr=Contrato %s Encerrado +PropalClosedSignedInDolibarr=Orçamento %s Assinado +PropalClosedRefusedInDolibarr=Orçamento %s rejeitado +PropalValidatedInDolibarr=Orçamento %s Validado +InvoiceValidatedInDolibarr=Fatura %s Confirmada +InvoicePayedInDolibarr=Fatura %s recebeu status de PAGA +InvoiceCanceledInDolibarr=Fatura %s Cancelada +PaymentDoneInDolibarr=Pagamento %s Realizado +CustomerPaymentDoneInDolibarr=Pagamento do cliente %s +SupplierPaymentDoneInDolibarr=Pagamento a fornecedor %s +MemberValidatedInDolibarr=Membro %s Confirmado +MemberResiliatedInDolibarr=Membro %s Baixado +MemberDeletedInDolibarr=Membro %s Excluido +MemberSubscriptionAddedInDolibarr=Inscrição do membro % adicionada ##### Export #####= ExportsArea=Área de Exportações AvailableFormats=Formatos disponíveis diff --git a/htdocs/langs/pt_BR/products.lang b/htdocs/langs/pt_BR/products.lang old mode 100644 new mode 100755 index cf5d3865109..d642b09bfe2 --- a/htdocs/langs/pt_BR/products.lang +++ b/htdocs/langs/pt_BR/products.lang @@ -1,4 +1,5 @@ # Dolibarr language file - pt_BR rev. 0.0 - products +# 2012 Vinícius Nogueira CHARSET=UTF-8 ProductRef=Ref. Produto ProductLabel=Nome do Produto diff --git a/htdocs/langs/pt_BR/projects.lang b/htdocs/langs/pt_BR/projects.lang old mode 100644 new mode 100755 index d8604ebec86..ec28c4b03d8 --- a/htdocs/langs/pt_BR/projects.lang +++ b/htdocs/langs/pt_BR/projects.lang @@ -2,7 +2,8 @@ CHARSET=UTF-8 Project=Projeto Projects=Projetos -SharedProject=Projeto Partilhado +SharedProject=Projeto Compartilhado +PrivateProject=Contatos do Projeto Myprojects=Os Meus Projetos ProjectsArea=Área de Projetos NewProject=Novo Projeto diff --git a/htdocs/langs/pt_BR/propal.lang b/htdocs/langs/pt_BR/propal.lang old mode 100644 new mode 100755 index 09660809c97..3ef3db03bb8 --- a/htdocs/langs/pt_BR/propal.lang +++ b/htdocs/langs/pt_BR/propal.lang @@ -1,4 +1,5 @@ # Dolibarr language file - pt_BR rev. 0.0 - propal +# 2012 Vinícius Nogueira CHARSET=UTF-8 Proposals=Orçamentos Proposal=Orçamento diff --git a/htdocs/langs/pt_BR/sendings.lang b/htdocs/langs/pt_BR/sendings.lang old mode 100644 new mode 100755 index 89257cd4079..e51a4dce3cd --- a/htdocs/langs/pt_BR/sendings.lang +++ b/htdocs/langs/pt_BR/sendings.lang @@ -1,4 +1,5 @@ # Dolibarr language file - pt_BR rev. 0.0 - sendings +# 2012 Vinícius Nogueira CHARSET=UTF-8 RefSending=Ref. Envio Sending=Envio diff --git a/htdocs/langs/pt_BR/teste.lang b/htdocs/langs/pt_BR/teste.lang deleted file mode 100644 index bf27e54451c..00000000000 --- a/htdocs/langs/pt_BR/teste.lang +++ /dev/null @@ -1,23 +0,0 @@ -Users=Uasuaaário -acoes=ações -acaes=acçães - - - - - - - - - - - - - - - - - - - - diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 5377fee4f97..e709dc4d6db 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -3,6 +3,7 @@ * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2006-2007 Laurent Destailleur * Copyright (C) 2007 Franky Van Liedekerke + * Copyright (C) 2011-2012 Philippe Grand * * 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 @@ -773,7 +774,7 @@ class Livraison extends CommonObject // Initialise parametres $this->id=0; - $this->ref = 'SPECIMEN_RECEIPT'; + $this->ref = 'SPECIMEN'; $this->specimen=1; $this->socid = 1; $this->date_delivery = $now; @@ -905,4 +906,4 @@ class LivraisonLigne } -?> +?> \ No newline at end of file diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index e382d0200fb..d10a9e91706 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -163,6 +163,13 @@ $sessiontimeout='DOLSESSTIMEOUT_'.$prefix; if (! empty($_COOKIE[$sessiontimeout])) ini_set('session.gc_maxlifetime',$_COOKIE[$sessiontimeout]); session_name($sessionname); session_start(); +if (ini_get('register_globals')) // To solve bug in using $_SESSION +{ + foreach ($_SESSION as $key=>$value) + { + if (isset($GLOBALS[$key])) unset($GLOBALS[$key]); + } +} // Init the 5 global objects // This include will set: $conf, $db, $langs, $user, $mysoc objects @@ -433,7 +440,7 @@ if (! defined('NOLOGIN')) dol_syslog('User not found, connexion refused'); session_destroy(); session_name($sessionname); - session_start(); + session_start(); // Fixing the bug of register_globals here is useless since session is empty if ($resultFetchUser == 0) { @@ -475,7 +482,7 @@ if (! defined('NOLOGIN')) dol_syslog("Can't load user even if session logged. _SESSION['dol_login']=".$login, LOG_WARNING); session_destroy(); session_name($sessionname); - session_start(); + session_start(); // Fixing the bug of register_globals here is useless since session is empty if ($resultFetchUser == 0) { @@ -859,13 +866,17 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs //print ''."\n"; print ''."\n"; } + if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)) // jQuery multiselect + { + print ''."\n"; + } } print ''."\n"; // Output style sheets (optioncss='print' or '') $themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1); - $themeparam='?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss','alpha',1):''); - if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&dol_resetcache='.$_SESSION['dol_resetcache']; + $themeparam='?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss','alpha',1):''); + if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&dol_resetcache='.$_SESSION['dol_resetcache']; //print 'themepath='.$themepath.' themeparam='.$themeparam;exit; print ''."\n"; // CSS forced by modules (relative url starting with /) @@ -977,6 +988,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; print ''."\n"; } + // jQuery Multiselect + if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)) + { + print ''."\n"; + } // CKEditor if (! empty($conf->fckeditor->enabled) && (empty($conf->global->FCKEDITOR_EDITORNAME) || $conf->global->FCKEDITOR_EDITORNAME == 'ckeditor')) { @@ -1213,7 +1229,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a $loginhtmltext.='
    '.$langs->trans("CurrentTheme").': '.$conf->theme; $s=picto_from_langcode($langs->getDefaultLang()); $loginhtmltext.='
    '.$langs->trans("CurrentUserLanguage").': '.($s?$s.' ':'').$langs->getDefaultLang(); - $loginhtmltext.='
    '.$langs->trans("Browser").': '.$conf->browser->name.' ('.$_SERVER['HTTP_USER_AGENT'].')'; + $loginhtmltext.='
    '.$langs->trans("Browser").': '.$conf->browser->name.($conf->browser->version?' '.$conf->browser->version:'').' ('.$_SERVER['HTTP_USER_AGENT'].')'; if (! empty($conf->browser->phone)) $loginhtmltext.='
    '.$langs->trans("Phone").': '.$conf->browser->phone; if (! empty($_SESSION["disablemodules"])) $loginhtmltext.='
    '.$langs->trans("DisabledModules").':
    '.join(', ',explode(',',$_SESSION["disablemodules"])); @@ -1437,7 +1453,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me print '" href="'; print sprintf($helpbaseurl,urlencode(html_entity_decode($helppage))); print '">'; - print img_picto('',DOL_URL_ROOT.'/theme/common/helpdoc.png','',1).' '; + print img_picto('', 'helpdoc').' '; print $langs->trans($mode == 'wiki' ? 'OnlineHelp': 'Help'); //if ($mode == 'wiki') print ' ('.dol_trunc(strtr($helppage,'_',' '),8).')'; print ''; diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index c6f0966ed66..b28fe5f084e 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2010 Laurent Destailleur - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2011-2012 Juanjo Menent * * 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 @@ -36,30 +36,30 @@ $langs->load("paybox"); if (!$user->admin) accessforbidden(); -$action = GETPOST("action"); +$action = GETPOST('action','alpha'); if ($action == 'setvalue' && $user->admin) { $db->begin(); //$result=dolibarr_set_const($db, "PAYBOX_IBS_DEVISE",$_POST["PAYBOX_IBS_DEVISE"],'chaine',0,'',$conf->entity); - $result=dolibarr_set_const($db, "PAYBOX_CGI_URL_V1", GETPOST("PAYBOX_CGI_URL_V1"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYBOX_CGI_URL_V1", GETPOST('PAYBOX_CGI_URL_V1','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYBOX_CGI_URL_V2",GETPOST("PAYBOX_CGI_URL_V2"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYBOX_CGI_URL_V2",GETPOST('PAYBOX_CGI_URL_V2','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYBOX_IBS_SITE",GETPOST("PAYBOX_IBS_SITE"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYBOX_IBS_SITE",GETPOST('PAYBOX_IBS_SITE','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYBOX_IBS_RANG",GETPOST("PAYBOX_IBS_RANG"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYBOX_IBS_RANG",GETPOST('PAYBOX_IBS_RANG','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYBOX_PBX_IDENTIFIANT",GETPOST("PAYBOX_PBX_IDENTIFIANT"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYBOX_PBX_IDENTIFIANT",GETPOST('PAYBOX_PBX_IDENTIFIANT','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYBOX_CREDITOR",GETPOST("PAYBOX_CREDITOR"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYBOX_CREDITOR",GETPOST('PAYBOX_CREDITOR','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYBOX_CSS_URL",GETPOST("PAYBOX_CSS_URL"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYBOX_CSS_URL",GETPOST('PAYBOX_CSS_URL','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYBOX_MESSAGE_OK",GETPOST("PAYBOX_MESSAGE_OK"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYBOX_MESSAGE_OK",GETPOST('PAYBOX_MESSAGE_OK','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYBOX_MESSAGE_KO",GETPOST("PAYBOX_MESSAGE_KO"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYBOX_MESSAGE_KO",GETPOST('PAYBOX_MESSAGE_KO','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; if (! $error) diff --git a/htdocs/paybox/lib/paybox.lib.php b/htdocs/paybox/lib/paybox.lib.php index 8e156b8ef5d..925fda59120 100755 --- a/htdocs/paybox/lib/paybox.lib.php +++ b/htdocs/paybox/lib/paybox.lib.php @@ -221,7 +221,7 @@ function print_paybox_redirect($PRICE,$CURRENCY,$EMAIL,$urlok,$urlko,$TAG) print ''."\n"; print ''."\n"; print ''."\n"; - print ''."\n"; + print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index cf254f1de30..7d185c65c03 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2005-2011 Laurent Destailleur * Copyright (C) 2011-2012 Regis Houssin - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2011-2012 Juanjo Menent * * 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 @@ -39,34 +39,34 @@ $langs->load("paybox"); if (!$user->admin) accessforbidden(); -$action = GETPOST("action"); +$action = GETPOST('action','alpha'); if ($action == 'setvalue' && $user->admin) { $db->begin(); - $result=dolibarr_set_const($db, "PAYPAL_API_SANDBOX",GETPOST("PAYPAL_API_SANDBOX"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYPAL_API_SANDBOX",GETPOST('PAYPAL_API_SANDBOX','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_API_USER",GETPOST("PAYPAL_API_USER"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYPAL_API_USER",GETPOST('PAYPAL_API_USER','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_API_PASSWORD",GETPOST("PAYPAL_API_PASSWORD"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYPAL_API_PASSWORD",GETPOST('PAYPAL_API_PASSWORD','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_API_SIGNATURE",GETPOST("PAYPAL_API_SIGNATURE"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYPAL_API_SIGNATURE",GETPOST('PAYPAL_API_SIGNATURE','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_CREDITOR",GETPOST("PAYPAL_CREDITOR"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYPAL_CREDITOR",GETPOST('PAYPAL_CREDITOR','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_API_INTEGRAL_OR_PAYPALONLY",GETPOST("PAYPAL_API_INTEGRAL_OR_PAYPALONLY"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYPAL_API_INTEGRAL_OR_PAYPALONLY",GETPOST('PAYPAL_API_INTEGRAL_OR_PAYPALONLY','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_CSS_URL",GETPOST("PAYPAL_CSS_URL"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYPAL_CSS_URL",GETPOST('PAYPAL_CSS_URL','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_SECURITY_TOKEN",GETPOST("PAYPAL_SECURITY_TOKEN"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYPAL_SECURITY_TOKEN",GETPOST('PAYPAL_SECURITY_TOKEN','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_SECURITY_TOKEN_UNIQUE",GETPOST("PAYPAL_SECURITY_TOKEN_UNIQUE"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYPAL_SECURITY_TOKEN_UNIQUE",GETPOST('PAYPAL_SECURITY_TOKEN_UNIQUE','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_ADD_PAYMENT_URL",GETPOST("PAYPAL_ADD_PAYMENT_URL"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYPAL_ADD_PAYMENT_URL",GETPOST('PAYPAL_ADD_PAYMENT_URL','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_MESSAGE_OK",GETPOST("PAYPAL_MESSAGE_OK"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYPAL_MESSAGE_OK",GETPOST('PAYPAL_MESSAGE_OK','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_MESSAGE_KO",GETPOST("PAYPAL_MESSAGE_KO"),'chaine',0,'',$conf->entity); + $result=dolibarr_set_const($db, "PAYPAL_MESSAGE_KO",GETPOST('PAYPAL_MESSAGE_KO','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; if (! $error) @@ -286,12 +286,12 @@ if ($conf->commande->enabled) $langs->load("orders"); print ''; print $langs->trans("EnterRefToBuildUrl",$langs->transnoentitiesnoconv("Order")).': '; - print ''; + print ''; print ''; - if (GETPOST('generate_order_ref')) + if (GETPOST('generate_order_ref','alpha')) { print '
    -> '; - $url=getPaypalPaymentUrl(0,'order',GETPOST('generate_order_ref')); + $url=getPaypalPaymentUrl(0,'order',GETPOST('generate_order_ref','alpha')); print $url; print "
    \n"; } @@ -308,12 +308,12 @@ if ($conf->facture->enabled) $langs->load("bills"); print ''; print $langs->trans("EnterRefToBuildUrl",$langs->transnoentitiesnoconv("Invoice")).': '; - print ''; + print ''; print ''; - if (GETPOST('generate_invoice_ref')) + if (GETPOST('generate_invoice_ref','alpha')) { print '
    -> '; - $url=getPaypalPaymentUrl(0,'invoice',GETPOST('generate_invoice_ref')); + $url=getPaypalPaymentUrl(0,'invoice',GETPOST('generate_invoice_ref','alpha')); print $url; print "
    \n"; } @@ -330,12 +330,12 @@ if ($conf->contrat->enabled) $langs->load("contract"); print ''; print $langs->trans("EnterRefToBuildUrl",$langs->transnoentitiesnoconv("Contract")).': '; - print ''; + print ''; print ''; if (GETPOST('generate_contract_ref')) { print '
    -> '; - $url=getPaypalPaymentUrl(0,'contractline',GETPOST('generate_contract_ref')); + $url=getPaypalPaymentUrl(0,'contractline',GETPOST('generate_contract_ref','alpha')); print $url; print "
    \n"; } @@ -352,12 +352,12 @@ if ($conf->adherent->enabled) $langs->load("members"); print ''; print $langs->trans("EnterRefToBuildUrl",$langs->transnoentitiesnoconv("Member")).': '; - print ''; + print ''; print ''; if (GETPOST('generate_member_ref')) { print '
    -> '; - $url=getPaypalPaymentUrl(0,'membersubscription',GETPOST('generate_member_ref')); + $url=getPaypalPaymentUrl(0,'membersubscription',GETPOST('generate_member_ref','alpha')); print $url; print "
    \n"; } diff --git a/htdocs/paypal/lib/paypalfunctions.lib.php b/htdocs/paypal/lib/paypalfunctions.lib.php index bcd995e436d..07e0e2bbb3f 100755 --- a/htdocs/paypal/lib/paypalfunctions.lib.php +++ b/htdocs/paypal/lib/paypalfunctions.lib.php @@ -22,8 +22,17 @@ * \brief Page with Paypal init var. */ -if (session_id() == "") session_start(); - +if (session_id() == "") +{ + session_start(); + if (ini_get('register_globals')) // To solve bug in using $_SESSION + { + foreach ($_SESSION as $key=>$value) + { + if (isset($GLOBALS[$key])) unset($GLOBALS[$key]); + } + } +} // ================================== // PayPal Express Checkout Module diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 1de35cbee03..5e4acbea39d 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -4,7 +4,7 @@ * Copyright (C) 2006-2007 Rodolphe Quiedeville * Copyright (C) 2007 Auguria SARL * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2012 Christophe Battarel ** * This program is free software; you can redistribute it and/or modify @@ -22,9 +22,9 @@ */ /** - * \file htdocs/product/admin/produit.php + * \file htdocs/product/admin/product.php * \ingroup produit - * \brief Page d'administration/configuration du module Produit + * \brief Setup page of product module */ require("../../main.inc.php"); @@ -38,8 +38,8 @@ $langs->load("products"); // Security check if (! $user->admin) accessforbidden(); -$action = GETPOST("action"); -$value = GETPOST("value"); +$action = GETPOST('action','alpha'); +$value = GETPOST('value','alpha'); /* @@ -56,35 +56,35 @@ else if ($action == 'multiprix_num') } if ($action == 'multiprix') { - $multiprix = GETPOST("activate_multiprix"); + $multiprix = GETPOST('activate_multiprix','alpha'); $res = dolibarr_set_const($db, "PRODUIT_MULTIPRICES", $multiprix,'chaine',0,'',$conf->entity); $res =dolibarr_set_const($db, "PRODUIT_MULTIPRICES_LIMIT", "5",'chaine',0,'',$conf->entity); } else if ($action == 'sousproduits') { - $sousproduits = GETPOST("activate_sousproduits"); + $sousproduits = GETPOST('activate_sousproduits','alpha'); $res = dolibarr_set_const($db, "PRODUIT_SOUSPRODUITS", $sousproduits,'chaine',0,'',$conf->entity); } else if ($action == 'viewProdDescInForm') { - $view = GETPOST("activate_viewProdDescInForm"); + $view = GETPOST('activate_viewProdDescInForm','alpha'); $res = dolibarr_set_const($db, "PRODUIT_DESC_IN_FORM", $view,'chaine',0,'',$conf->entity); } else if ($action == 'viewProdTextsInThirdpartyLanguage') { - $view = GETPOST("activate_viewProdTextsInThirdpartyLanguage"); + $view = GETPOST('activate_viewProdTextsInThirdpartyLanguage','alpha'); $res = dolibarr_set_const($db, "PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE", $view,'chaine',0,'',$conf->entity); } else if ($action == 'usesearchtoselectproduct') { - $usesearch = GETPOST("activate_usesearchtoselectproduct"); + $usesearch = GETPOST('activate_usesearchtoselectproduct','alpha'); $res = dolibarr_set_const($db, "PRODUIT_USE_SEARCH_TO_SELECT", $usesearch,'chaine',0,'',$conf->entity); } else if ($action == 'set') { - $const = "PRODUCT_SPECIAL_".strtoupper($_GET["spe"]); - if ($_GET["value"]) $res = dolibarr_set_const($db, $const, $value,'chaine',0,'',$conf->entity); + $const = "PRODUCT_SPECIAL_".strtoupper(GETPOST('spe','alpha')); + if (GETPOST('value','alpha')) $res = dolibarr_set_const($db, $const, $value,'chaine',0,'',$conf->entity); else $res = dolibarr_del_const($db, $const,$conf->entity); } /*else if ($action == 'useecotaxe') diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index 8b63af356b6..73ea52ce705 100755 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -213,9 +213,9 @@ class ActionsCardProduct extends Product // Photo $this->tpl['nblignes'] = 4; - if ($this->object->is_photo_available($conf->product->dir_output)) + if ($this->object->is_photo_available($conf->product->multidir_output[$this->object->entity])) { - $this->tpl['photos'] = $this->object->show_photos($conf->product->dir_output,1,1,0,0,0,80); + $this->tpl['photos'] = $this->object->show_photos($conf->product->multidir_output[$this->object->entity],1,1,0,0,0,80); } // Nature diff --git a/htdocs/product/canvas/product/tpl/card_view.tpl.php b/htdocs/product/canvas/product/tpl/card_view.tpl.php index f6cb1470bf4..d8b02863ee1 100755 --- a/htdocs/product/canvas/product/tpl/card_view.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_view.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2012 Regis Houssin * * 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 diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index 7ebe1e68047..b21db469db1 100755 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -208,9 +208,9 @@ class ActionsCardService extends Product // Photo $this->tpl['nblignes'] = 4; - if ($this->object->is_photo_available($conf->service->dir_output)) + if ($this->object->is_photo_available($conf->service->multidir_output[$this->object->entity])) { - $this->tpl['photos'] = $this->object->show_photos($conf->service->dir_output,1,1,0,0,0,80); + $this->tpl['photos'] = $this->object->show_photos($conf->service->multidir_output[$this->object->entity],1,1,0,0,0,80); } // Duration diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index ff3b788f80b..8380d390a96 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -885,7 +885,7 @@ class Product extends CommonObject * @param int $newnpr 0=Standard vat rate, 1=Special vat rate for French NPR VAT * @return int <0 if KO, >0 if OK */ - function update_price($id, $newprice, $newpricebase, $user, $newvat='',$newminprice='', $level=0, $newnpr=0) + function updatePrice($id, $newprice, $newpricebase, $user, $newvat='',$newminprice='', $level=0, $newnpr=0) { global $conf,$langs; @@ -1015,7 +1015,7 @@ class Product extends CommonObject $sql.= " tobuy, fk_product_type, duration, seuil_stock_alerte, canvas,"; $sql.= " weight, weight_units, length, length_units, surface, surface_units, volume, volume_units, barcode, fk_barcode_type, finished,"; $sql.= " accountancy_code_buy, accountancy_code_sell, stock, pmp,"; - $sql.= " datec, tms, import_key"; + $sql.= " datec, tms, import_key, entity"; $sql.= " FROM ".MAIN_DB_PREFIX."product"; if ($id) $sql.= " WHERE rowid = '".$id."'"; else @@ -1031,60 +1031,61 @@ class Product extends CommonObject { if ($this->db->num_rows($resql) > 0) { - $object = $this->db->fetch_object($resql); + $obj = $this->db->fetch_object($resql); - $this->id = $object->rowid; - $this->ref = $object->ref; - $this->libelle = $object->label; // TODO deprecated - $this->label = $object->label; - $this->description = $object->description; - $this->note = $object->note; + $this->id = $obj->rowid; + $this->ref = $obj->ref; + $this->libelle = $obj->label; // TODO deprecated + $this->label = $obj->label; + $this->description = $obj->description; + $this->note = $obj->note; - $this->type = $object->fk_product_type; - $this->status = $object->tosell; - $this->status_buy = $object->tobuy; + $this->type = $obj->fk_product_type; + $this->status = $obj->tosell; + $this->status_buy = $obj->tobuy; - $this->customcode = $object->customcode; - $this->country_id = $object->fk_country; - $this->country_code = getCountry($this->country_id,2,$this->db); - $this->price = $object->price; - $this->price_ttc = $object->price_ttc; - $this->price_min = $object->price_min; - $this->price_min_ttc = $object->price_min_ttc; - $this->price_base_type = $object->price_base_type; - $this->tva_tx = $object->tva_tx; + $this->customcode = $obj->customcode; + $this->country_id = $obj->fk_country; + $this->country_code = getCountry($this->country_id,2,$this->db); + $this->price = $obj->price; + $this->price_ttc = $obj->price_ttc; + $this->price_min = $obj->price_min; + $this->price_min_ttc = $obj->price_min_ttc; + $this->price_base_type = $obj->price_base_type; + $this->tva_tx = $obj->tva_tx; //! French VAT NPR - $this->tva_npr = $object->tva_npr; + $this->tva_npr = $obj->tva_npr; //! Spanish local taxes - $this->localtax1_tx = $object->localtax1_tx; - $this->localtax2_tx = $object->localtax2_tx; + $this->localtax1_tx = $obj->localtax1_tx; + $this->localtax2_tx = $obj->localtax2_tx; - $this->finished = $object->finished; - $this->duration = $object->duration; - $this->duration_value = substr($object->duration,0,dol_strlen($object->duration)-1); - $this->duration_unit = substr($object->duration,-1); - $this->canvas = $object->canvas; - $this->weight = $object->weight; - $this->weight_units = $object->weight_units; - $this->length = $object->length; - $this->length_units = $object->length_units; - $this->surface = $object->surface; - $this->surface_units = $object->surface_units; - $this->volume = $object->volume; - $this->volume_units = $object->volume_units; - $this->barcode = $object->barcode; - $this->barcode_type = $object->fk_barcode_type; + $this->finished = $obj->finished; + $this->duration = $obj->duration; + $this->duration_value = substr($obj->duration,0,dol_strlen($obj->duration)-1); + $this->duration_unit = substr($obj->duration,-1); + $this->canvas = $obj->canvas; + $this->weight = $obj->weight; + $this->weight_units = $obj->weight_units; + $this->length = $obj->length; + $this->length_units = $obj->length_units; + $this->surface = $obj->surface; + $this->surface_units = $obj->surface_units; + $this->volume = $obj->volume; + $this->volume_units = $obj->volume_units; + $this->barcode = $obj->barcode; + $this->barcode_type = $obj->fk_barcode_type; - $this->accountancy_code_buy = $object->accountancy_code_buy; - $this->accountancy_code_sell= $object->accountancy_code_sell; + $this->accountancy_code_buy = $obj->accountancy_code_buy; + $this->accountancy_code_sell = $obj->accountancy_code_sell; - $this->seuil_stock_alerte = $object->seuil_stock_alerte; - $this->stock_reel = $object->stock; - $this->pmp = $object->pmp; + $this->seuil_stock_alerte = $obj->seuil_stock_alerte; + $this->stock_reel = $obj->stock; + $this->pmp = $obj->pmp; - $this->date_creation = $object->datec; - $this->date_modification = $object->tms; - $this->import_key = $object->import_key; + $this->date_creation = $obj->datec; + $this->date_modification = $obj->tms; + $this->import_key = $obj->import_key; + $this->entity = $obj->entity; $this->db->free($resql); @@ -2596,7 +2597,7 @@ class Product extends CommonObject if ($nbbyrow) $return.= ''; $return.= "\n"; - $return.= ''; + $return.= ''; // Show image (width height=$maxHeight) // Si fichier vignette disponible et image source trop grande, on utilise la vignette, sinon on utilise photo origine @@ -2604,11 +2605,11 @@ class Product extends CommonObject $alt.=' - '.$langs->transnoentitiesnoconv('Size').': '.$imgarray['width'].'x'.$imgarray['height']; if ($photo_vignette && $imgarray['height'] > $maxHeight) { $return.= ''; - $return.= ''; + $return.= ''; } else { $return.= ''; - $return.= ''; + $return.= ''; } $return.= ''."\n"; @@ -2640,7 +2641,7 @@ class Product extends CommonObject } if ($size == 0) { // Format origine - $return.= ''; + $return.= ''; if ($showfilename) $return.= '
    '.$viewfilename; if ($showaction) diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 768c2508f0c..0a4bab631c8 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -34,16 +34,16 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php"); $langs->load("other"); $langs->load("products"); -$action=GETPOST('action', 'alpha'); +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action=GETPOST('action','alpha'); +$confirm=GETPOST('confirm','alpha'); // Security check -if (isset($_GET["id"]) || isset($_GET["ref"])) -{ - $id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:''); -} -$fieldid = isset($_GET["ref"])?'ref':'rowid'; +$fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); +$fieldtype = (! empty($ref) ? 'ref' : 'rowid'); if ($user->societe_id) $socid=$user->societe_id; -$result=restrictedArea($user,'produit|service',$id,'product&product','','',$fieldid); +$result=restrictedArea($user,'produit|service',$fielvalue,'product&product','','',$fieldtype); // Get parameters $sortfield = GETPOST("sortfield",'alpha'); @@ -57,14 +57,13 @@ if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; -$product = new Product($db); -if ($_GET['id'] || $_GET["ref"]) +$object = new Product($db); +if ($id > 0 || ! empty($ref)) { - if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]); - if ($_GET["id"]) $result = $product->fetch($_GET["id"]); + $result = $object->fetch($id, $ref); - if ($conf->product->enabled) $upload_dir = $conf->product->dir_output.'/'.dol_sanitizeFileName($product->ref); - elseif ($conf->service->enabled) $upload_dir = $conf->service->dir_output.'/'.dol_sanitizeFileName($product->ref); + if ($conf->product->enabled) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); + elseif ($conf->service->enabled) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); } $modulepart='produit'; @@ -109,10 +108,10 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) $form = new Form($db); -llxHeader("","",$langs->trans("CardProduct".$product->type)); +llxHeader("","",$langs->trans("CardProduct".$object->type)); -if ($product->id) +if ($object->id) { if ( $error_msg ) { @@ -126,9 +125,9 @@ if ($product->id) //if ($result >= 0) $mesg=$langs->trans("FileWasRemoced"); } - $head=product_prepare_head($product, $user); - $titre=$langs->trans("CardProduct".$product->type); - $picto=($product->type==1?'service':'product'); + $head=product_prepare_head($object, $user); + $titre=$langs->trans("CardProduct".$object->type); + $picto=($object->type==1?'service':'product'); dol_fiche_head($head, 'documents', $titre, 0, $picto); @@ -146,21 +145,21 @@ if ($product->id) // Ref print ''; print ''.$langs->trans("Ref").''; - print $form->showrefnav($product,'ref','',1,'ref'); + print $form->showrefnav($object,'ref','',1,'ref'); print ''; print ''; // Label - print ''.$langs->trans("Label").''.$product->libelle.''; + print ''.$langs->trans("Label").''.$object->libelle.''; // Status (to sell) print ''.$langs->trans("Status").' ('.$langs->trans("Sell").')'; - print $product->getLibStatut(2,0); + print $object->getLibStatut(2,0); print ''; // Status (to buy) print ''.$langs->trans("Status").' ('.$langs->trans("Buy").')'; - print $product->getLibStatut(2,1); + print $object->getLibStatut(2,1); print ''; print ''.$langs->trans("NbOfAttachedFiles").''.count($filearray).''; @@ -172,12 +171,12 @@ if ($product->id) // Affiche formulaire upload $formfile=new FormFile($db); - $formfile->form_attach_new_file(DOL_URL_ROOT.'/product/document.php?id='.$product->id,'',0,0,($user->rights->produit->creer||$user->rights->service->creer)); + $formfile->form_attach_new_file(DOL_URL_ROOT.'/product/document.php?id='.$object->id,'',0,0,($user->rights->produit->creer||$user->rights->service->creer)); // List of document - $param='&id='.$product->id; - $formfile->list_of_documents($filearray,$product,'produit',$param); + $param='&id='.$object->id; + $formfile->list_of_documents($filearray,$object,'produit',$param); } else @@ -185,7 +184,7 @@ else print $langs->trans("UnkownError"); } -$db->close(); llxFooter(); +$db->close(); ?> diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index f6ce3c148b4..376697cfcad 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2007 Rodolphe Quiedeville * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005 Eric Seigne - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2006 Auguria SARL * Copyright (C) 2010-2011 Juanjo Menent @@ -47,8 +47,8 @@ $mesg=''; $error=0; $errors=array(); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action=(GETPOST('action') ? GETPOST('action') : 'view'); -$confirm=GETPOST('confirm'); +$action=(GETPOST('action','alpha') ? GETPOST('action','alpha') : 'view'); +$confirm=GETPOST('confirm','alpha'); $socid=GETPOST('socid','int'); if ($user->societe_id) $socid=$user->societe_id; @@ -121,7 +121,7 @@ if (empty($reshook)) $result = $object->setValueFrom('accountancy_code_buy', $_POST['accountancy_code_buy']); if ($result < 0) { - $mesg=join(',',$product->errors); + $mesg=join(',',$object->errors); } $action=""; } @@ -132,7 +132,7 @@ if (empty($reshook)) $result = $object->setValueFrom('accountancy_code_sell', $_POST['accountancy_code_sell']); if ($result < 0) { - $mesg=join(',',$product->errors); + $mesg=join(',',$object->errors); } $action=""; } @@ -159,45 +159,43 @@ if (empty($reshook)) $error++; } - $product=new Product($db); - if (! $error) { - $product->ref = $ref; - $product->libelle = $_POST["libelle"]; - $product->price_base_type = $_POST["price_base_type"]; - if ($product->price_base_type == 'TTC') $product->price_ttc = $_POST["price"]; - else $product->price = $_POST["price"]; - if ($product->price_base_type == 'TTC') $product->price_min_ttc = $_POST["price_min"]; - else $product->price_min = $_POST["price_min"]; - $product->tva_tx = str_replace('*','',$_POST['tva_tx']); - $product->tva_npr = preg_match('/\*/',$_POST['tva_tx'])?1:0; + $object->ref = $ref; + $object->libelle = $_POST["libelle"]; + $object->price_base_type = $_POST["price_base_type"]; + if ($object->price_base_type == 'TTC') $object->price_ttc = $_POST["price"]; + else $object->price = $_POST["price"]; + if ($object->price_base_type == 'TTC') $object->price_min_ttc = $_POST["price_min"]; + else $object->price_min = $_POST["price_min"]; + $object->tva_tx = str_replace('*','',$_POST['tva_tx']); + $object->tva_npr = preg_match('/\*/',$_POST['tva_tx'])?1:0; // local taxes. - $product->localtax1_tx = get_localtax($product->tva_tx,1); - $product->localtax2_tx = get_localtax($product->tva_tx,2); + $object->localtax1_tx = get_localtax($object->tva_tx,1); + $object->localtax2_tx = get_localtax($object->tva_tx,2); - $product->type = $_POST["type"]; - $product->status = $_POST["statut"]; - $product->status_buy = $_POST["statut_buy"]; - $product->description = dol_htmlcleanlastbr($_POST["desc"]); - $product->note = dol_htmlcleanlastbr($_POST["note"]); - $product->customcode = $_POST["customcode"]; - $product->country_id = $_POST["country_id"]; - $product->duration_value = $_POST["duration_value"]; - $product->duration_unit = $_POST["duration_unit"]; - $product->seuil_stock_alerte = $_POST["seuil_stock_alerte"]?$_POST["seuil_stock_alerte"]:0; - $product->canvas = $_POST["canvas"]; - $product->weight = $_POST["weight"]; - $product->weight_units = $_POST["weight_units"]; - $product->length = $_POST["size"]; - $product->length_units = $_POST["size_units"]; - $product->surface = $_POST["surface"]; - $product->surface_units = $_POST["surface_units"]; - $product->volume = $_POST["volume"]; - $product->volume_units = $_POST["volume_units"]; - $product->finished = $_POST["finished"]; - $product->hidden = $_POST["hidden"]=='yes'?1:0; + $object->type = $_POST["type"]; + $object->status = $_POST["statut"]; + $object->status_buy = $_POST["statut_buy"]; + $object->description = dol_htmlcleanlastbr($_POST["desc"]); + $object->note = dol_htmlcleanlastbr($_POST["note"]); + $object->customcode = $_POST["customcode"]; + $object->country_id = $_POST["country_id"]; + $object->duration_value = $_POST["duration_value"]; + $object->duration_unit = $_POST["duration_unit"]; + $object->seuil_stock_alerte = $_POST["seuil_stock_alerte"]?$_POST["seuil_stock_alerte"]:0; + $object->canvas = $_POST["canvas"]; + $object->weight = $_POST["weight"]; + $object->weight_units = $_POST["weight_units"]; + $object->length = $_POST["size"]; + $object->length_units = $_POST["size_units"]; + $object->surface = $_POST["surface"]; + $object->surface_units = $_POST["surface_units"]; + $object->volume = $_POST["volume"]; + $object->volume_units = $_POST["volume_units"]; + $object->finished = $_POST["finished"]; + $object->hidden = $_POST["hidden"]=='yes'?1:0; // MultiPrix if($conf->global->PRODUIT_MULTIPRICES) @@ -206,12 +204,12 @@ if (empty($reshook)) { if($_POST["price_".$i]) { - $product->multiprices["$i"] = price2num($_POST["price_".$i],'MU'); - $product->multiprices_base_type["$i"] = $_POST["multiprices_base_type_".$i]; + $object->multiprices["$i"] = price2num($_POST["price_".$i],'MU'); + $object->multiprices_base_type["$i"] = $_POST["multiprices_base_type_".$i]; } else { - $product->multiprices["$i"] = ""; + $object->multiprices["$i"] = ""; } } } @@ -221,11 +219,11 @@ if (empty($reshook)) { if (preg_match("/^options_/",$key)) { - $product->array_options[$key]=$_POST[$key]; + $object->array_options[$key]=$_POST[$key]; } } - $id = $product->create($user); + $id = $object->create($user); if ($id > 0) { @@ -234,7 +232,7 @@ if (empty($reshook)) } else { - $mesg='
    '.$langs->trans($product->error).'
    '; + $mesg='
    '.$langs->trans($object->error).'
    '; $action = "create"; $_GET["type"] = $_POST["type"]; } @@ -250,51 +248,50 @@ if (empty($reshook)) } else { - $product=new Product($db); - if ($product->fetch($id,$ref)) + if ($object->fetch($id,$ref)) { - $product->ref = $ref; - $product->libelle = $_POST["libelle"]; - $product->description = dol_htmlcleanlastbr($_POST["desc"]); - $product->note = dol_htmlcleanlastbr($_POST["note"]); - $product->customcode = $_POST["customcode"]; - $product->country_id = $_POST["country_id"]; - $product->status = $_POST["statut"]; - $product->status_buy = $_POST["statut_buy"]; - $product->seuil_stock_alerte = $_POST["seuil_stock_alerte"]; - $product->duration_value = $_POST["duration_value"]; - $product->duration_unit = $_POST["duration_unit"]; - $product->canvas = $_POST["canvas"]; - $product->weight = $_POST["weight"]; - $product->weight_units = $_POST["weight_units"]; - $product->length = $_POST["size"]; - $product->length_units = $_POST["size_units"]; - $product->surface = $_POST["surface"]; - $product->surface_units = $_POST["surface_units"]; - $product->volume = $_POST["volume"]; - $product->volume_units = $_POST["volume_units"]; - $product->finished = $_POST["finished"]; - $product->hidden = $_POST["hidden"]=='yes'?1:0; + $object->ref = $ref; + $object->libelle = $_POST["libelle"]; + $object->description = dol_htmlcleanlastbr($_POST["desc"]); + $object->note = dol_htmlcleanlastbr($_POST["note"]); + $object->customcode = $_POST["customcode"]; + $object->country_id = $_POST["country_id"]; + $object->status = $_POST["statut"]; + $object->status_buy = $_POST["statut_buy"]; + $object->seuil_stock_alerte = $_POST["seuil_stock_alerte"]; + $object->duration_value = $_POST["duration_value"]; + $object->duration_unit = $_POST["duration_unit"]; + $object->canvas = $_POST["canvas"]; + $object->weight = $_POST["weight"]; + $object->weight_units = $_POST["weight_units"]; + $object->length = $_POST["size"]; + $object->length_units = $_POST["size_units"]; + $object->surface = $_POST["surface"]; + $object->surface_units = $_POST["surface_units"]; + $object->volume = $_POST["volume"]; + $object->volume_units = $_POST["volume_units"]; + $object->finished = $_POST["finished"]; + $object->hidden = $_POST["hidden"]=='yes'?1:0; // Get extra fields foreach($_POST as $key => $value) { if (preg_match("/^options_/",$key)) { - $product->array_options[$key]=$_POST[$key]; + $object->array_options[$key]=$_POST[$key]; } } - if ($product->check()) + if ($object->check()) { - if ($product->update($product->id, $user) > 0) + if ($object->update($object->id, $user) > 0) { $action = ''; } else { $action = 'edit'; - $mesg = $product->error; + $mesg = $object->error; } } else @@ -317,47 +314,46 @@ if (empty($reshook)) { $db->begin(); - $product = new Product($db); $originalId = $id; - if ($product->fetch($id,$ref) > 0) + if ($object->fetch($id,$ref) > 0) { - $product->ref = GETPOST('clone_ref'); - $product->status = 0; - $product->status_buy = 0; - $product->finished = 1; - $product->id = null; + $object->ref = GETPOST('clone_ref'); + $object->status = 0; + $object->status_buy = 0; + $object->finished = 1; + $object->id = null; - if ($product->check()) + if ($object->check()) { - $id = $product->create($user); + $id = $object->create($user); if ($id > 0) { - // $product->clone_fournisseurs($originalId, $id); + // $object->clone_fournisseurs($originalId, $id); $db->commit(); $db->close(); - Header("Location: fiche.php?id=$id"); + Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else { - if ($product->error == 'ErrorProductAlreadyExists') + if ($object->error == 'ErrorProductAlreadyExists') { $db->rollback(); $_error = 1; $action = ""; - $mesg='
    '.$langs->trans("ErrorProductAlreadyExists",$product->ref); - $mesg.=' '.$langs->trans("ShowCardHere").'.'; + $mesg='
    '.$langs->trans("ErrorProductAlreadyExists",$object->ref); + $mesg.=' '.$langs->trans("ShowCardHere").'.'; $mesg.='
    '; - //dol_print_error($product->db); + //dol_print_error($object->db); } else { $db->rollback(); - dol_print_error($product->db); + dol_print_error($object->db); } } } @@ -365,7 +361,7 @@ if (empty($reshook)) else { $db->rollback(); - dol_print_error($product->db); + dol_print_error($object->db); } } } @@ -759,7 +755,7 @@ else // Duration if ($_GET["type"] == 1) { - print ''.$langs->trans("Duration").'  '; + print ''.$langs->trans("Duration").'  '; print ''.$langs->trans("Hour").' '; print ''.$langs->trans("Day").' '; print ''.$langs->trans("Week").' '; @@ -837,13 +833,13 @@ else // PRIX print ''.$langs->trans("SellingPrice").''; - print ''; - print $form->select_PriceBaseType($product->price_base_type, "price_base_type"); + print ''; + print $form->select_PriceBaseType($object->price_base_type, "price_base_type"); print ''; // MIN PRICE print ''.$langs->trans("MinPrice").''; - print ''; + print ''; print ''; // VAT @@ -861,7 +857,7 @@ else print ''; } - /** + /* * Product card */ @@ -881,12 +877,12 @@ else dol_htmloutput_errors($mesg); // Main official, simple, and not duplicated code - print '
    '."\n"; + print ''."\n"; print ''; print ''; print ''; print ''; - print ''; + print '
    '; // Ref print ''; @@ -1048,7 +1044,7 @@ else if ($ret == 'html') print '
    '; } - $showphoto=$object->is_photo_available($conf->product->dir_output); + $showphoto=$object->is_photo_available($conf->product->multidir_output[$object->entity]); $showbarcode=$conf->barcode->enabled && $user->rights->barcode->lire; // En mode visu @@ -1074,7 +1070,7 @@ else if ($showphoto || $showbarcode) { print ''; @@ -1099,10 +1095,10 @@ else print '
    '.$langs->trans("Ref").'
    '; - if ($showphoto) print $object->show_photos($conf->product->dir_output,1,1,0,0,0,80); + if ($showphoto) print $object->show_photos($conf->product->multidir_output[$object->entity],1,1,0,0,0,80); if ($showphoto && $showbarcode) print '

    '; if ($showbarcode) print $form->showbarcode($object); print '
    '; + if (($action != 'editbarcodetype') && $user->rights->barcode->creer) print ''; print '
    '; print $langs->trans("BarcodeType"); print ''; - if (($_GET['action'] != 'editbarcodetype') && $user->rights->barcode->creer) print 'id.'">'.img_edit($langs->trans('Edit'),1).'id.'">'.img_edit($langs->trans('Edit'),1).'
    '; print ''; - if ($_GET['action'] == 'editbarcodetype') + if ($action == 'editbarcodetype') { require_once(DOL_DOCUMENT_ROOT."/core/class/html.formbarcode.class.php"); $formbarcode = new FormBarCode($db); @@ -1120,10 +1116,10 @@ else print ''; + if (($action != 'editbarcode') && $user->rights->barcode->creer) print ''; print '
    '; print $langs->trans("BarcodeValue"); print ''; - if (($_GET['action'] != 'editbarcode') && $user->rights->barcode->creer) print 'id.'">'.img_edit($langs->trans('Edit'),1).'id.'">'.img_edit($langs->trans('Edit'),1).'
    '; print ''; - if ($_GET['action'] == 'editbarcode') + if ($action == 'editbarcode') { print ''; print ''; @@ -1281,7 +1277,7 @@ if ($action == 'clone' || $conf->use_javascript_ajax) array('type' => 'checkbox', 'name' => 'clone_prices', 'label' => $langs->trans("ClonePricesProduct").' ('.$langs->trans("FeatureNotYetAvailable").')', 'value' => 0, 'disabled' => true) ); // Paiement incomplet. On demande si motif = escompte ou autre - $form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneProduct'),$langs->trans('ConfirmCloneProduct',$object->ref),'confirm_clone',$formquestion,'yes','action-clone',230,600); + $form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id,$langs->trans('CloneProduct'),$langs->trans('ConfirmCloneProduct',$object->ref),'confirm_clone',$formquestion,'yes','action-clone',230,600); } @@ -1297,7 +1293,7 @@ if ($action == '' || $action == 'view') { if ($user->rights->produit->creer || $user->rights->service->creer) { - if ($object->no_button_edit <> 1) print 'id.'">'.$langs->trans("Modify").''; + if ($object->no_button_edit <> 1) print ''.$langs->trans("Modify").''; if ($object->no_button_copy <> 1) { @@ -1307,12 +1303,12 @@ if ($action == '' || $action == 'view') } else { - print 'id.'">'.$langs->trans("ToClone").''; + print ''.$langs->trans("ToClone").''; } } } - $object_is_used = $object->isObjectUsed($object->id); + $object_is_used = $object->isObjectUsed($id); if (($object->type == 0 && $user->rights->produit->supprimer) || ($object->type == 1 && $user->rights->service->supprimer)) { @@ -1324,7 +1320,7 @@ if ($action == '' || $action == 'view') } else { - print 'id.'">'.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } } else @@ -1345,7 +1341,7 @@ print "\n

    \n"; * All the "Add to" areas */ -if ($object->id && ($action == '' || $action == 'view') && $object->status) +if ($id && ($action == '' || $action == 'view') && $object->status) { print ''; @@ -1395,7 +1391,7 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) { $objp = $db->fetch_object($result); $var=!$var; - print ''; + print ''; print ''; print ''; print ""; @@ -1433,7 +1429,7 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) $var=true; $otherprop = $propal->liste_array(1,1,1); - print ''; + print ''; print ''; print '
    '; if (is_array($otherprop) && count($otherprop)) @@ -1512,7 +1508,7 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) { $objc = $db->fetch_object($result); $var=!$var; - print ''; + print ''; print ''; print ''; print ""; @@ -1551,7 +1547,7 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) $var=true; $othercom = $commande->liste_array(1, $user); - print ''; + print ''; print ''; print '
    '; if (is_array($othercom) && count($othercom)) @@ -1626,7 +1622,7 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) { $objp = $db->fetch_object($result); $var=!$var; - print ''; + print ''; print ''; print ''; print ""; @@ -1691,7 +1687,7 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) $objp = $db->fetch_object($result); $var=!$var; - print ''; + print ''; print ''; print ''; print ""; diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 670b0c0e2d6..bfd666fad2b 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -159,7 +159,7 @@ print '
    '; print ''; /* - * Derniers produits/services en vente + * Last modified products */ $max=15; $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.tosell, p.tobuy,"; @@ -186,7 +186,10 @@ if ($result) print ''; - print ''; + $colnb=5; + if (empty($conf->global->PRODUIT_MULTIPRICES)) $colnb++; + + print ''; $var=True; @@ -211,7 +214,7 @@ if ($result) } $var=!$var; - print ""; + print ""; print '"; + // Sell price + if (empty($conf->global->PRODUIT_MULTIPRICES)) + { + print ''; + } print '"; @@ -244,7 +255,7 @@ else print '
    '.$transRecordedType.'
    '.$transRecordedType.'
    '; $product_static->id=$objp->rowid; $product_static->ref=$objp->ref; @@ -222,6 +225,14 @@ if ($result) print ""; print dol_print_date($db->jdate($objp->datem),'day'); print "'; + if ($objp->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC"); + else print price($objp->price).' '.$langs->trans("HT"); + print ''; print $product_static->LibStatut($objp->tosell,5,0); print "
    '; -$db->close(); - llxFooter(); + +$db->close(); ?> diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 4338139e62c..6663a9f527e 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -82,6 +82,7 @@ if (isset($_POST["button_removefilter_x"])) $sref=""; $sbarcode=""; $snom=""; + $search_categ=0; } if ($conf->categorie->enabled && GETPOST('catid')) @@ -190,6 +191,7 @@ else $param="&sref=".$sref.($sbarcode?"&sbarcode=".$sbarcode:"")."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy; $param.=($fourn_id?"&fourn_id=".$fourn_id:""); + $param.=($search_categ?"&search_categ=".$search_categ:""); $param.=isset($type)?"&type=".$type:""; print_barre_liste($texte, $page, "liste.php", $param, $sortfield, $sortorder,'',$num); diff --git a/htdocs/product/photos.php b/htdocs/product/photos.php index 45533e043cb..e5aa4bf123d 100644 --- a/htdocs/product/photos.php +++ b/htdocs/product/photos.php @@ -43,9 +43,14 @@ $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); if ($user->societe_id) $socid=$user->societe_id; $result=restrictedArea($user,'produit|service',$fieldvalue,'product&product','','',$fieldtype); - $mesg = ''; -$dir = (!empty($conf->product->dir_output)?$conf->product->dir_output:$conf->service->dir_output); + +$object = new Product($db); +if ($id > 0 || ! empty($ref)) +{ + $result = $object->fetch($id, $ref); + $dir = (! empty($conf->product->multidir_output[$object->entity])?$conf->product->multidir_output[$object->entity]:$conf->service->multidir_output[$object->entity]); +} /* @@ -54,25 +59,17 @@ $dir = (!empty($conf->product->dir_output)?$conf->product->dir_output:$conf->ser if ($_FILES['userfile']['size'] > 0 && $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) { - if ($id) - { - $product = new Product($db); - $result = $product->fetch($id); - - $result = $product->add_photo($dir, $_FILES['userfile']); - } + if ($object->id) $result = $object->add_photo($dir, $_FILES['userfile']); } if ($action == 'confirm_delete' && $_GET["file"] && $confirm == 'yes' && ($user->rights->produit->creer || $user->rights->service->creer)) { - $product = new Product($db); - $product->delete_photo($dir."/".$_GET["file"]); + $object->delete_photo($dir."/".$_GET["file"]); } if ($action == 'addthumb' && $_GET["file"]) { - $product = new Product($db); - $product->add_thumb($dir."/".$_GET["file"]); + $object->add_thumb($dir."/".$_GET["file"]); } @@ -82,118 +79,111 @@ if ($action == 'addthumb' && $_GET["file"]) $form = new Form($db); -if ($id > 0 || ! empty($ref)) +if ($object->id) { - $product = new Product($db); - - $result = $product->fetch($id, $ref); - - llxHeader("","",$langs->trans("CardProduct".$product->type)); - - if ($result) - { - /* - * En mode visu - */ - $head=product_prepare_head($product, $user); - $titre=$langs->trans("CardProduct".$product->type); - $picto=($product->type==1?'service':'product'); - dol_fiche_head($head, 'photos', $titre, 0, $picto); - - /* - * Confirmation de la suppression de photo - */ - if ($_GET['action'] == 'delete') - { - $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$product->id.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); - if ($ret == 'html') print '
    '; - } - - print($mesg); - - print ''; - - // Reference - print ''; - print ''; - print ''; - - // Libelle - print ''; - print ''; - - // Status (to sell) - print ''; - - // Status (to buy) - print ''; - - print "
    '.$langs->trans("Ref").''; - print $form->showrefnav($product,'ref','',1,'ref'); - print '
    '.$langs->trans("Label").''.$product->libelle.'
    '.$langs->trans("Status").' ('.$langs->trans("Sell").')'; - print $product->getLibStatut(2,0); - print '
    '.$langs->trans("Status").' ('.$langs->trans("Buy").')'; - print $product->getLibStatut(2,1); - print '
    \n"; - - print "\n"; - - - - /* ************************************************************************** */ - /* */ - /* Barre d'action */ - /* */ - /* ************************************************************************** */ - - print "\n
    \n"; - - if ($_GET["action"] != 'ajout_photo' && ($user->rights->produit->creer || $user->rights->service->creer)) - { - if (! empty($conf->global->MAIN_UPLOAD_DOC)) - { - print 'id.'">'; - print $langs->trans("AddPhoto").''; - } - else - { - print 'e'; - print $langs->trans("AddPhoto").''; - } - } - - print "\n
    \n"; - - /* - * Add a photo - */ - if ($action == 'ajout_photo' && ($user->rights->produit->creer || $user->rights->service->creer) && ! empty($conf->global->MAIN_UPLOAD_DOC)) - { - // Affiche formulaire upload - $formfile=new FormFile($db); - $formfile->form_attach_new_file($_SERVER["PHP_SELF"].'?id='.$product->id,$langs->trans("AddPhoto"),1); - } - - // Affiche photos - if ($action != 'ajout_photo') - { - $nbphoto=0; - $nbbyrow=5; - - $maxWidth = 160; - $maxHeight = 120; - - print $product->show_photos($dir,1,1000,$nbbyrow,1,1); - - if ($product->nbphoto < 1) - { - print '
    '; - print ''; print ''; - print '
    '; - print "
    ".$langs->trans("NoPhotoYet")."

    "; - print '
    '; - } - } + llxHeader("","",$langs->trans("CardProduct".$object->type)); + + /* + * En mode visu + */ + $head=product_prepare_head($object, $user); + $titre=$langs->trans("CardProduct".$object->type); + $picto=($object->type==1?'service':'product'); + dol_fiche_head($head, 'photos', $titre, 0, $picto); + + /* + * Confirmation de la suppression de photo + */ + if ($_GET['action'] == 'delete') + { + $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); + if ($ret == 'html') print '
    '; + } + + print($mesg); + + print ''; + + // Reference + print ''; + print ''; + print ''; + + // Libelle + print ''; + print ''; + + // Status (to sell) + print ''; + + // Status (to buy) + print ''; + + print "
    '.$langs->trans("Ref").''; + print $form->showrefnav($object,'ref','',1,'ref'); + print '
    '.$langs->trans("Label").''.$object->libelle.'
    '.$langs->trans("Status").' ('.$langs->trans("Sell").')'; + print $object->getLibStatut(2,0); + print '
    '.$langs->trans("Status").' ('.$langs->trans("Buy").')'; + print $object->getLibStatut(2,1); + print '
    \n"; + + print "\n"; + + + + /* ************************************************************************** */ + /* */ + /* Barre d'action */ + /* */ + /* ************************************************************************** */ + + print "\n
    \n"; + + if ($_GET["action"] != 'ajout_photo' && ($user->rights->produit->creer || $user->rights->service->creer)) + { + if (! empty($conf->global->MAIN_UPLOAD_DOC)) + { + print 'id.'">'; + print $langs->trans("AddPhoto").''; + } + else + { + print 'e'; + print $langs->trans("AddPhoto").''; + } + } + + print "\n
    \n"; + + /* + * Add a photo + */ + if ($action == 'ajout_photo' && ($user->rights->produit->creer || $user->rights->service->creer) && ! empty($conf->global->MAIN_UPLOAD_DOC)) + { + // Affiche formulaire upload + $formfile=new FormFile($db); + $formfile->form_attach_new_file($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans("AddPhoto"),1); + } + + // Affiche photos + if ($action != 'ajout_photo') + { + $nbphoto=0; + $nbbyrow=5; + + $maxWidth = 160; + $maxHeight = 120; + + print $object->show_photos($dir,1,1000,$nbbyrow,1,1); + + if ($object->nbphoto < 1) + { + print '
    '; + print ''; print ''; + print '
    '; + print "
    ".$langs->trans("NoPhotoYet")."

    "; + print '
    '; + } } } else @@ -203,6 +193,5 @@ else llxFooter(); - $db->close(); ?> diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 6e47c543265..c6045df5920 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -84,7 +84,7 @@ if ($action == 'update_price' && ! $_POST["cancel"] && ($user->rights->produit-> $newvat=str_replace('*','',$_POST["tva_tx"]); } - if ($object->update_price($object->id, $newprice, $newpricebase, $user, $newvat, $newprice_min, $level, $newnpr) > 0) + if ($object->updatePrice($object->id, $newprice, $newpricebase, $user, $newvat, $newprice_min, $level, $newnpr) > 0) { $action = ''; $mesg = '
    '.$langs->trans("RecordSaved").'
    '; @@ -130,14 +130,14 @@ print ''; // Label print ''.$langs->trans("Label").''.$object->libelle.''; -$isphoto=$object->is_photo_available($conf->product->dir_output); +$isphoto=$object->is_photo_available($conf->product->multidir_output[$object->entity]); $nblignes=5; if ($isphoto) { // Photo print ''; - print $object->show_photos($conf->product->dir_output,1,1,0,0,0,80); + print $object->show_photos($conf->product->multidir_output[$object->entity],1,1,0,0,0,80); print ''; } @@ -446,7 +446,7 @@ if ($result) // Il doit au moins y avoir la ligne de prix initial. // On l'ajoute donc pour remettre a niveau (pb vieilles versions) - $object->update_price($object->id, $object->price, 'HT', $user, $newprice_min); + $object->updatePrice($object->id, $object->price, 'HT', $user, $newprice_min); $result = $db->query($sql); $num = $db->num_rows($result); diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index 8c0752d0c7c..24b1444ddcc 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -111,7 +111,7 @@ if (! empty($id) || ! empty($ref)) // Generation des graphs $WIDTH=380; $HEIGHT=160; - $dir = (!empty($conf->product->dir_temp)?$conf->product->dir_temp:$conf->service->dir_temp); + $dir = (! empty($conf->product->multidir_temp[$object->entity])?$conf->product->multidir_temp[$object->entity]:$conf->service->multidir_temp[$object->entity]); if (! file_exists($dir.'/'.$object->id)) { if (dol_mkdir($dir.'/'.$object->id) < 0) @@ -168,7 +168,7 @@ if (! empty($id) || ! empty($ref)) $px->SetShading(3); //print 'x '.$key.' '.$graphfiles[$key]['file']; - $url=DOL_URL_ROOT.'/viewimage.php?modulepart='.$graphfiles[$key]['modulepart'].'&file='.urlencode($graphfiles[$key]['file']); + $url=DOL_URL_ROOT.'/viewimage.php?modulepart='.$graphfiles[$key]['modulepart'].'&entity='.$object->entity.'&file='.urlencode($graphfiles[$key]['file']); $px->draw($dir."/".$graphfiles[$key]['file'],$url); $graphfiles[$key]['output']=$px->show(); diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 6e9a390cf7d..483d2034553 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1,8 +1,8 @@ - * Copyright (C) 2005-2008 Laurent Destailleur - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2012 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin * * 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 @@ -54,12 +54,12 @@ class Project extends CommonObject /** * Constructor * - * @param DoliDB $DB Database handler + * @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; } @@ -721,7 +709,7 @@ class Project extends CommonObject { global $user, $langs, $conf; - $now = mktime(); + $now = dol_now(); // Charge tableau des produits prodids $prodids = array(); @@ -748,7 +736,6 @@ class Project extends CommonObject $this->id = 0; $this->ref = 'SPECIMEN'; $this->specimen = 1; - $socid = rand(1, $num_socs); $this->socid = 1; $this->date_c = $now; $this->date_m = $now; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index d1b8c41cb78..a2b9e337f26 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010 Regis Houssin +/* Copyright (C) 2008-2012 Laurent Destailleur + * Copyright (C) 2010_2012 Regis Houssin * * 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 @@ -64,12 +64,11 @@ class Task extends CommonObject /** * Constructor * - * @param DoliDB $DB Database handler + * @param DoliDB $db Database handler */ - function Task($DB) + function __construct($db) { - $this->db = $DB; - return 1; + $this->db = $db; } @@ -369,7 +368,29 @@ 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; } } @@ -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 } } -?> \ No newline at end of file +?> diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index d7f501e0a0f..f1fe6eb5c55 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -248,8 +248,8 @@ if ($id > 0 || ! empty($ref)) print ''; // Line to add external contact. Only if project is linked to a third party. - if ($project->societe->id) - { + //if ($project->societe->id) + //{ print '
    '; print ''; print ''; @@ -265,12 +265,12 @@ if ($id > 0 || ! empty($ref)) print ''; $selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$project->societe->id; - $selectedCompany = $formcompany->selectCompaniesForNewContact($project, 'id', $selectedCompany, 'newcompany'); + $selectedCompany = $formcompany->selectCompaniesForNewContact($project, 'id', $selectedCompany, 'newcompany', (empty($project->societe->id)?array():array($project->societe->id))); print ''; print ''; $nbofcontacts=$form->select_contacts($selectedCompany, '', 'contactid'); - if ($nbofcontacts == 0) print $langs->trans("NoContactDefined"); + //if ($nbofcontacts == 0) print $langs->trans("NoContactDefined"); print ''; print ''; $formcompany->selectTypeContact($project, '', 'type','external','rowid'); @@ -287,7 +287,7 @@ if ($id > 0 || ! empty($ref)) print ''; print "
    "; - } + //} print ' '; } diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index d93a6462db6..925f93e0465 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -339,6 +339,7 @@ if ($action == 'create' && $user->rights->projet->creer) print ''; } print ''; + print ''; } @@ -415,7 +416,9 @@ else // Customer print ''.$langs->trans("Company").''; - print $form->select_company($project->societe->id,'socid','',1,1); + $text=$form->select_company($project->societe->id,'socid','',1,1); + $texthelp=$langs->trans("IfNeedToUseOhterObjectKeepEmpty"); + print $form->textwithtooltip($text.' '.img_help(),$texthelp,1); print ''; // Visibility @@ -443,10 +446,12 @@ else print ''; print ''; - print ''; - print '   '; - print ''; print ''; + + print '

    '; + print '   '; + print '
    '; + print ''; } else diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 69543c2a163..f4b4d03fd23 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -1,7 +1,7 @@ - * Copyright (C) 2006-2010 Laurent Destailleur - * Copyright (C) 2010 Regis Houssin +/* Copyright (C) 2005 Rodolphe Quiedeville + * Copyright (C) 2006-2010 Laurent Destailleur + * Copyright (C) 2010-2012 Regis Houssin * * 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 @@ -33,17 +33,21 @@ require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'); $langs->load("projects"); $langs->load("companies"); -$taskid = isset($_GET["id"])?$_GET["id"]:''; -$id = GETPOST('id','int'); -$ref= GETPOST('ref'); -$action=GETPOST('action'); -$withproject=GETPOST('withproject'); +$id=GETPOST('id','int'); +$ref=GETPOST('ref','alpha'); +$action=GETPOST('action','alpha'); +$confirm=GETPOST('confirm','alpha'); +$withproject=GETPOST('withproject','int'); +$project_ref=GETPOST('project_ref','alpha'); // Security check $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; -//$result = restrictedArea($user, 'projet', $taskid, 'projet_task'); -if (!$user->rights->projet->lire) accessforbidden(); +//$result = restrictedArea($user, 'projet', $id, 'projet_task'); +if (! $user->rights->projet->lire) accessforbidden(); + +$object = new Task($db); +$projectstatic = new Project($db); /* @@ -53,31 +57,28 @@ if (!$user->rights->projet->lire) accessforbidden(); // Add new contact if ($action == 'addcontact' && $user->rights->projet->creer) { + $result = $object->fetch($id); - $result = 0; - $task = new Task($db); - $result = $task->fetch($taskid); - - if ($result > 0 && $taskid > 0) + if ($result > 0 && $id > 0) { - $result = $task->add_contact($_POST["contactid"], $_POST["type"], $_POST["source"]); + $result = $object->add_contact($_POST["contactid"], $_POST["type"], $_POST["source"]); } if ($result >= 0) { - Header("Location: contact.php?id=".$task->id); + Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id.($withproject?'&withproject=1':'')); exit; } else { - if ($task->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); $mesg = '
    '.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'
    '; } else { - $mesg = '
    '.$task->error.'
    '; + $mesg = '
    '.$object->error.'
    '; } } } @@ -85,10 +86,9 @@ if ($action == 'addcontact' && $user->rights->projet->creer) // bascule du statut d'un contact if ($action == 'swapstatut' && $user->rights->projet->creer) { - $task = new Task($db); - if ($task->fetch($taskid)) + if ($object->fetch($id)) { - $result=$task->swapContactStatus(GETPOST('ligne')); + $result=$object->swapContactStatus(GETPOST('ligne')); } else { @@ -99,13 +99,12 @@ if ($action == 'swapstatut' && $user->rights->projet->creer) // Efface un contact if ($action == 'deleteline' && $user->rights->projet->creer) { - $task = new Task($db); - $task->fetch($taskid); - $result = $task->delete_contact($_GET["lineid"]); + $object->fetch($id); + $result = $object->delete_contact($_GET["lineid"]); if ($result >= 0) { - Header("Location: contact.php?id=".$task->id); + Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id.($withproject?'&withproject=1':'')); exit; } else @@ -114,6 +113,23 @@ if ($action == 'deleteline' && $user->rights->projet->creer) } } +// Retreive First Task ID of Project if withprojet is on to allow project prev next to work +if (! empty($project_ref) && ! empty($withproject)) +{ + if ($projectstatic->fetch(0,$project_ref) > 0) + { + $tasksarray=$object->getTasksArray(0, 0, $projectstatic->id, $socid, 0); + if (count($tasksarray) > 0) + { + $id=$tasksarray[0]->id; + } + else + { + Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject?'&withproject=1':'').(empty($mode)?'':'&mode='.$mode)); + exit; + } + } +} /* * View @@ -125,8 +141,6 @@ $form = new Form($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); $userstatic = new User($db); -$project = new Project($db); -$task = new Task($db); /* *************************************************************************** */ @@ -137,19 +151,19 @@ $task = new Task($db); if ($id > 0 || ! empty($ref)) { - if ($task->fetch($id,$ref) > 0) + if ($object->fetch($id) > 0) { - $result=$project->fetch($task->fk_project); - if (! empty($project->socid)) $project->societe->fetch($project->socid); + $result=$projectstatic->fetch($object->fk_project); + if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); - $userWrite = $project->restrictedProjectArea($user,'write'); + $userWrite = $projectstatic->restrictedProjectArea($user,'write'); if ($withproject) { // Tabs for project $tab='tasks'; - $head=project_prepare_head($project); - dol_fiche_head($head, $tab, $langs->trans("Project"),0,($project->public?'projectpub':'project')); + $head=project_prepare_head($projectstatic); + dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project')); $param=($mode=='mine'?'&mode=mine':''); @@ -162,28 +176,28 @@ if ($id > 0 || ! empty($ref)) // Define a complementary filter for search of next/prev ref. if (! $user->rights->projet->all->lire) { - $projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,0); - $project->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; + $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,0); + $projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } - print $form->showrefnav($project,'ref','',1,'ref','ref','',$param); + print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1'); print ''; - print ''.$langs->trans("Label").''.$project->title.''; + print ''.$langs->trans("Label").''.$projectstatic->title.''; print ''.$langs->trans("Company").''; - if (! empty($project->societe->id)) print $project->societe->getNomUrl(1); + if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1); else print ' '; print ''; print ''; // Visibility print ''.$langs->trans("Visibility").''; - if ($project->public) print $langs->trans('SharedProject'); + if ($projectstatic->public) print $langs->trans('SharedProject'); else print $langs->trans('PrivateProject'); print ''; // Statut - print ''.$langs->trans("Status").''.$project->getLibStatut(4).''; + print ''.$langs->trans("Status").''.$projectstatic->getLibStatut(4).''; print ''; @@ -193,12 +207,12 @@ if ($id > 0 || ! empty($ref)) } // To verify role of users - //$userAccess = $project->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project - //$arrayofuseridoftask=$task->getListContactId('internal'); + //$userAccess = $projectstatic->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project + //$arrayofuseridoftask=$object->getListContactId('internal'); dol_htmloutput_mesg($mesg); - $head = task_prepare_head($task); + $head = task_prepare_head($object); dol_fiche_head($head, 'task_contact', $langs->trans("Task"), 0, 'projecttask'); @@ -208,33 +222,33 @@ if ($id > 0 || ! empty($ref)) print ''; $param=(GETPOST('withproject')?'&withproject=1':''); - $linkback=GETPOST('withproject')?''.$langs->trans("BackToList").'':''; + $linkback=GETPOST('withproject')?''.$langs->trans("BackToList").'':''; // Ref print ''; // Label - print ''; + print ''; // Project if (empty($withproject)) { print ''; // Customer print ""; print ''; } @@ -269,6 +283,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; + print ''; // Ligne ajout pour contact interne print ""; @@ -283,11 +298,11 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; print ''; @@ -295,13 +310,13 @@ if ($id > 0 || ! empty($ref)) print ''; // Line to add an external contact. Only if project linked to a third party. - if ($project->socid) + if ($projectstatic->socid) { - print ''; + print ''; print ''; print ''; print ''; - print ''; + print ''; $var=!$var; print ""; @@ -311,18 +326,18 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; print ''; print ''; // Icon update et delete @@ -415,7 +430,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->projet->creer) { print ' '; - print ''; + print ''; print img_delete(); print ''; } diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 12840e9dd34..65a758ee137 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -1,5 +1,7 @@ +/* Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2006-2012 Laurent Destailleur + * Copyright (C) 2012 Florian Henry * * 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,12 +34,14 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php"); $langs->load('projects'); $langs->load('other'); -$action=GETPOST('action'); +$action=GETPOST('action','alpha'); +$confirm=GETPOST('confirm','alpha'); $mine = $_REQUEST['mode']=='mine' ? 1 : 0; //if (! $user->rights->projet->all->lire) $mine=1; // Special for projects $id = GETPOST('id','int'); -$ref= GETPOST('ref'); -$withproject=GETPOST('withproject'); +$ref= GETPOST('ref','alpha'); +$withproject=GETPOST('withproject','int'); +$project_ref = GETPOST('project_ref','alpha'); // Security check $socid=0; @@ -57,22 +61,10 @@ if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; +$object = new Task($db); +$projectstatic = new Project($db); -$task = new Task($db); -if ($task->fetch($id,$ref) > 0) -{ - $projectstatic = new Project($db); - $projectstatic->fetch($task->fk_project); - - if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); - - $upload_dir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($task->ref); -} -else -{ - dol_print_error($db); -} /* @@ -118,143 +110,172 @@ if ($action=='delete') $mesg = '
    '.$langs->trans("FileWasRemoved").'
    '; } +// Retreive First Task ID of Project if withprojet is on to allow project prev next to work +if (! empty($project_ref) && ! empty($withproject)) +{ + if ($projectstatic->fetch(0,$project_ref) > 0) + { + $tasksarray=$object->getTasksArray(0, 0, $projectstatic->id, $socid, 0); + if (count($tasksarray) > 0) + { + $id=$tasksarray[0]->id; + $object->fetch($id); + } + else + { + Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject?'&withproject=1':'').(empty($mode)?'':'&mode='.$mode)); + exit; + } + } +} + +// Find upload dir after retreive is task if necessary +if ($id > 0 || ! empty($ref)) +{ + if ($object->fetch($id,$ref) > 0) + { + $projectstatic->fetch($object->fk_project); + + if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); + + $upload_dir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref); + } + else + { + dol_print_error($db); + } +} /* * View */ $form = new Form($db); -$project = new Project($db); -$task = new Task($db); llxHeader('',$langs->trans('Project')); -if ($id > 0 || ! empty($ref)) +if ($object->id > 0) { - if ($task->fetch($id,$ref) >= 0) - { - $result=$project->fetch($task->fk_project); - if (! empty($project->socid)) $project->societe->fetch($project->socid); + if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); - $userWrite = $project->restrictedProjectArea($user,'write'); + $userWrite = $projectstatic->restrictedProjectArea($user,'write'); - if ($withproject) + if (! empty($withproject)) + { + // Tabs for project + $tab='tasks'; + $head=project_prepare_head($projectstatic); + dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project')); + + $param=($mode=='mine'?'&mode=mine':''); + + print '
    '.$langs->trans('Ref').''; - if (! GETPOST('withproject') || empty($project->id)) + if (! GETPOST('withproject') || empty($projectstatic->id)) { - $projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,1); - $task->next_prev_filter=" fk_projet in (".$projectsListId.")"; + $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1); + $object->next_prev_filter=" fk_projet in (".$projectsListId.")"; } - else $task->next_prev_filter=" fk_projet = ".$project->id; - print $form->showrefnav($task,'id',$linkback,1,'rowid','ref','',$param); + else $object->next_prev_filter=" fk_projet = ".$projectstatic->id; + print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param); print '
    '.$langs->trans("Label").''.$task->label.'
    '.$langs->trans("Label").''.$object->label.'
    '.$langs->trans("Project").''; - print $project->getNomUrl(1); + print $projectstatic->getNomUrl(1); print '
    ".$langs->trans("Company")."'; - if ($project->societe->id > 0) print $project->societe->getNomUrl(1); + if ($projectstatic->societe->id > 0) print $projectstatic->societe->getNomUrl(1); else print ' '; print '
    '; // On recupere les id des users deja selectionnes - $contactsofproject=$project->getListContactId('internal'); + $contactsofproject=$projectstatic->getListContactId('internal'); $form->select_users($user->id,'contactid',0,'',0,'',$contactsofproject); print ''; - $formcompany->selectTypeContact($task, '', 'type','internal','rowid'); + $formcompany->selectTypeContact($object, '', 'type','internal','rowid'); print '
    '; - $thirdpartyofproject=$project->getListContactId('thirdparty'); - $selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$project->societe->id; - $selectedCompany = $formcompany->selectCompaniesForNewContact($task, 'id', $selectedCompany, 'newcompany',$thirdpartyofproject); + $thirdpartyofproject=$projectstatic->getListContactId('thirdparty'); + $selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$projectstatic->societe->id; + $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany',$thirdpartyofproject); print ''; - $contactofproject=$project->getListContactId('external'); + $contactofproject=$projectstatic->getListContactId('external'); $nbofcontacts=$form->select_contacts($selectedCompany,'','contactid',0,'',$contactofproject); if ($nbofcontacts == 0) print $langs->trans("NoContactDefined"); print ''; - $formcompany->selectTypeContact($task, '', 'type','external','rowid'); + $formcompany->selectTypeContact($object, '', 'type','external','rowid'); print ' 0 || ! empty($ref)) foreach(array('internal','external') as $source) { - $tab = $task->liste_contact(-1,$source); + $tab = $object->liste_contact(-1,$source); $num=count($tab); $i = 0; @@ -405,9 +420,9 @@ if ($id > 0 || ! empty($ref)) // Statut print ''; // Activation desativation du contact - if ($task->statut >= 0) print ''; + if ($object->statut >= 0) print ''; print $contactstatic->LibStatut($tab[$i]['status'],3); - if ($task->statut >= 0) print ''; + if ($object->statut >= 0) print ''; print '
    '; + + // Ref + print ''; - $head = task_prepare_head($task); - dol_fiche_head($head, 'task_document', $langs->trans("Task"), 0, 'projecttask'); + print ''; - $param=(GETPOST('withproject')?'&withproject=1':''); - $linkback=GETPOST('withproject')?''.$langs->trans("BackToList").'':''; + print ''; + print ''; - // Files list constructor - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); - $totalsize=0; - foreach($filearray as $key => $file) - { - $totalsize+=$file['size']; - } + // Visibility + print ''; - print '
    '; + print $langs->trans("Ref"); + print ''; + // Define a complementary filter for search of next/prev ref. + if (! $user->rights->projet->all->lire) { - // Tabs for project - $tab='tasks'; - $head=project_prepare_head($project); - dol_fiche_head($head, $tab, $langs->trans("Project"),0,($project->public?'projectpub':'project')); - - $param=($mode=='mine'?'&mode=mine':''); - - print ''; - - // Ref - print ''; - - print ''; - - print ''; - print ''; - - // Visibility - print ''; - - // Statut - print ''; - - print '
    '; - print $langs->trans("Ref"); - print ''; - // Define a complementary filter for search of next/prev ref. - if (! $user->rights->projet->all->lire) - { - $projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,0); - $project->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; - } - print $form->showrefnav($project,'ref','',1,'ref','ref','',$param); - print '
    '.$langs->trans("Label").''.$project->title.'
    '.$langs->trans("Company").''; - if (! empty($project->societe->id)) print $project->societe->getNomUrl(1); - else print ' '; - print '
    '.$langs->trans("Visibility").''; - if ($project->public) print $langs->trans('SharedProject'); - else print $langs->trans('PrivateProject'); - print '
    '.$langs->trans("Status").''.$project->getLibStatut(4).'
    '; - - dol_fiche_end(); - - print '
    '; + $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,0); + $projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } + print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1'); + print '
    '.$langs->trans("Label").''.$projectstatic->title.'
    '.$langs->trans("Company").''; + if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1); + else print ' '; + print '
    '.$langs->trans("Visibility").''; + if ($projectstatic->public) print $langs->trans('SharedProject'); + else print $langs->trans('PrivateProject'); + print '
    '; + // Statut + print ''; - // Ref - print ''; - print ''; + print '
    '.$langs->trans("Status").''.$projectstatic->getLibStatut(4).'
    '; - print $langs->trans("Ref"); - print ''; - if (! GETPOST('withproject') || empty($project->id)) - { - $projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,1); - $task->next_prev_filter=" fk_projet in (".$projectsListId.")"; - } - else $task->next_prev_filter=" fk_projet = ".$project->id; - print $form->showrefnav($task,'id',$linkback,1,'rowid','ref','',$param); - print '
    '; - // Label - print ''.$langs->trans("Label").''.$task->label.''; + dol_fiche_end(); - // Project - if (empty($withproject)) - { - print ''.$langs->trans("Project").''; - print $projectstatic->getNomUrl(1); - print ''; + print '
    '; + } - // Third party - print ''.$langs->trans("Company").''; - if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1); - else print ' '; - print ''; - } + $head = task_prepare_head($object); + dol_fiche_head($head, 'task_document', $langs->trans("Task"), 0, 'projecttask'); - // Files infos - print ''.$langs->trans("NbOfAttachedFiles").''.count($filearray).''; - print ''.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").''; + $param=(GETPOST('withproject')?'&withproject=1':''); + $linkback=GETPOST('withproject')?''.$langs->trans("BackToList").'':''; - print "\n"; + // Files list constructor + $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $totalsize=0; + foreach($filearray as $key => $file) + { + $totalsize+=$file['size']; + } - dol_fiche_end(); + print ''; - print '
    '; + // Ref + print ''; + print ''; - dol_htmloutput_mesg($mesg); + // Label + print ''; + + // Project + if (empty($withproject)) + { + print ''; + + // Third party + print ''; + } + + // Files infos + print ''; + print ''; + + print "
    '; + print $langs->trans("Ref"); + print ''; + if (empty($withproject) || empty($projectstatic->id)) + { + $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1); + $object->next_prev_filter=" fk_projet in (".$projectsListId.")"; + } + else $object->next_prev_filter=" fk_projet = ".$projectstatic->id; + print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param); + print '
    '.$langs->trans("Label").''.$object->label.'
    '.$langs->trans("Project").''; + print $projectstatic->getNomUrl(1); + print '
    '.$langs->trans("Company").''; + if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1); + else print ' '; + print '
    '.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
    '.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
    \n"; + + dol_fiche_end(); + + print '
    '; + + dol_htmloutput_mesg($mesg); - // Affiche formulaire upload - $formfile=new FormFile($db); - $formfile->form_attach_new_file(DOL_URL_ROOT.'/projet/tasks/document.php?id='.$task->id,'',0,0,$user->rights->projet->creer); + // Affiche formulaire upload + $formfile=new FormFile($db); + $formfile->form_attach_new_file(DOL_URL_ROOT.'/projet/tasks/document.php?id='.$object->id.($withproject?'&withproject=1':''),'',0,0,$user->rights->projet->creer); - // List of document - $param='&id='.$task->id; - $formfile->list_of_documents($filearray,$task,'projet',$param,0,dol_sanitizeFileName($project->ref).'/'.dol_sanitizeFileName($task->ref).'/'); - } + // List of document + $param='&id='.$object->id; + $formfile->list_of_documents($filearray,$object,'projet',$param,0,dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref).'/'); } else { @@ -266,4 +287,4 @@ else llxFooter(); $db->close(); -?> +?> \ No newline at end of file diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 5946dd5d23c..11cf96ca9c7 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2012 Regis Houssin * * 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,12 +28,14 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/project.lib.php"); $langs->load('projects'); -$action=GETPOST('action'); +$action=GETPOST('action','alpha'); +$confirm=GETPOST('confirm','alpha'); $mine = $_REQUEST['mode']=='mine' ? 1 : 0; //if (! $user->rights->projet->all->lire) $mine=1; // Special for projects $id = GETPOST('id','int'); $ref= GETPOST('ref', 'alpha'); -$withproject=GETPOST('withproject'); +$withproject=GETPOST('withproject','int'); +$project_ref = GETPOST('project_ref','alpha'); // Security check $socid=0; @@ -42,7 +44,39 @@ if (!$user->rights->projet->lire) accessforbidden(); //$result = restrictedArea($user, 'projet', $id, '', 'task'); // TODO ameliorer la verification $object = new Task($db); -$object->fetch($id, $ref); +$projectstatic = new Project($db); + +if ($id > 0 || ! empty($ref)) +{ + if ($object->fetch($id,$ref) > 0) + { + $projectstatic->fetch($object->fk_project); + if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); + } + else + { + dol_print_error($db); + } +} + + +// Retreive First Task ID of Project if withprojet is on to allow project prev next to work +if (! empty($project_ref) && ! empty($withproject)) +{ + if ($projectstatic->fetch(0,$project_ref) > 0) + { + $tasksarray=$object->getTasksArray(0, 0, $projectstatic->id, $socid, 0); + if (count($tasksarray) > 0) + { + $id=$tasksarray[0]->id; + $object->fetch($id); + } + else + { + Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.(empty($mode)?'':'&mode='.$mode)); + } + } +} /* @@ -70,24 +104,20 @@ else if ($action == 'setnote_private' && $user->rights->ficheinter->creer) llxHeader(); $form = new Form($db); -$project = new Project($db); $userstatic = new User($db); $now=dol_now(); -if ($id > 0 || ! empty($ref)) +if ($object->id > 0) { - $result=$project->fetch($object->fk_project); - if (! empty($project->socid)) $project->societe->fetch($project->socid); + $userWrite = $projectstatic->restrictedProjectArea($user,'write'); - $userWrite = $project->restrictedProjectArea($user,'write'); - - if ($withproject) + if (! empty($withproject)) { // Tabs for project $tab='tasks'; - $head=project_prepare_head($project); - dol_fiche_head($head, $tab, $langs->trans("Project"),0,($project->public?'projectpub':'project')); + $head=project_prepare_head($projectstatic); + dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project')); $param=($mode=='mine'?'&mode=mine':''); @@ -100,30 +130,30 @@ if ($id > 0 || ! empty($ref)) // Define a complementary filter for search of next/prev ref. if (! $user->rights->projet->all->lire) { - $projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,0); - $project->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; + $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,0); + $projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } - print $form->showrefnav($project,'ref','',1,'ref','ref','',$param); + print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1'); print ''; // Project - print ''.$langs->trans("Label").''.$project->title.''; + print ''.$langs->trans("Label").''.$projectstatic->title.''; // Company print ''.$langs->trans("Company").''; - if (! empty($project->societe->id)) print $project->societe->getNomUrl(1); + if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1); else print ' '; print ''; print ''; // Visibility print ''.$langs->trans("Visibility").''; - if ($project->public) print $langs->trans('SharedProject'); + if ($projectstatic->public) print $langs->trans('SharedProject'); else print $langs->trans('PrivateProject'); print ''; // Statut - print ''.$langs->trans("Status").''.$project->getLibStatut(4).''; + print ''.$langs->trans("Status").''.$projectstatic->getLibStatut(4).''; print ''; @@ -138,16 +168,16 @@ if ($id > 0 || ! empty($ref)) print ''; $param=(GETPOST('withproject')?'&withproject=1':''); - $linkback=GETPOST('withproject')?''.$langs->trans("BackToList").'':''; + $linkback=GETPOST('withproject')?''.$langs->trans("BackToList").'':''; // Ref print ''; @@ -158,12 +188,12 @@ if ($id > 0 || ! empty($ref)) if (empty($withproject)) { print ''; // Third party print ''; } @@ -180,7 +210,7 @@ if ($id > 0 || ! empty($ref)) dol_fiche_end(); } -llxFooter(); +llxFooter(); $db->close(); ?> diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 261dbd2d985..b31b2ccb328 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -1,7 +1,7 @@ - * Copyright (C) 2006-2011 Laurent Destailleur - * Copyright (C) 2010 Regis Houssin +/* Copyright (C) 2005 Rodolphe Quiedeville + * Copyright (C) 2006-2012 Laurent Destailleur + * Copyright (C) 2010-2012 Regis Houssin * * 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 @@ -19,7 +19,7 @@ /** * \file htdocs/projet/tasks/task.php - * \ingroup projet + * \ingroup project * \brief Page of a project task */ @@ -29,17 +29,20 @@ require_once(DOL_DOCUMENT_ROOT."/projet/class/task.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/project.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formother.class.php"); -$taskid = GETPOST('id','int'); -$taskref = GETPOST("ref"); -$id = GETPOST('id','int'); -$ref= GETPOST('ref'); -$action=GETPOST('action'); -$withproject=GETPOST('withproject'); +$id=GETPOST('id','int'); +$ref=GETPOST('ref','alpha'); +$action=GETPOST('action','alpha'); +$confirm=GETPOST('confirm','alpha'); +$withproject=GETPOST('withproject','int'); +$project_ref=GETPOST('project_ref','alpha'); // Security check $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; -if (!$user->rights->projet->lire) accessforbidden(); +if (! $user->rights->projet->lire) accessforbidden(); + +$object = new Task($db); +$projectstatic = new Project($db); /* @@ -57,44 +60,38 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->projet->creer) } if (! $error) { - $task = new Task($db); - $task->fetch($id); + $object->fetch($id); $tmparray=explode('_',$_POST['task_parent']); $task_parent=$tmparray[1]; if (empty($task_parent)) $task_parent = 0; // If task_parent is '' - $task->label = $_POST["label"]; - $task->description = $_POST['description']; - $task->fk_task_parent = $task_parent; - $task->date_start = dol_mktime(12,0,0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear']); - $task->date_end = dol_mktime(12,0,0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear']); - $task->progress = $_POST['progress']; + $object->label = $_POST["label"]; + $object->description = $_POST['description']; + $object->fk_task_parent = $task_parent; + $object->date_start = dol_mktime(12,0,0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear']); + $object->date_end = dol_mktime(12,0,0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear']); + $object->progress = $_POST['progress']; - $result=$task->update($user); - - $taskid=$task->id; // On retourne sur la fiche tache + $result=$object->update($user); } else { - $taskid=$_POST["id"]; $action='edit'; } } -if ($action == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->projet->supprimer) +if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->supprimer) { - $task = new Task($db); - if ($task->fetch($id) >= 0 ) + if ($object->fetch($id) >= 0 ) { - $projet = new Project($db); - $result=$projet->fetch($task->fk_projet); - if (! empty($projet->socid)) + $result=$projecstatict->fetch($object->fk_projet); + if (! empty($projecstatic->socid)) { - $projet->societe->fetch($projet->socid); + $projecstatic->societe->fetch($projecstatic->socid); } - if ($task->delete($user) > 0) + if ($object->delete($user) > 0) { Header("Location: index.php"); exit; @@ -102,12 +99,28 @@ if ($action == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights-> else { $langs->load("errors"); - $mesg='
    '.$langs->trans($task->error).'
    '; - $_POST["action"]=''; + $mesg='
    '.$langs->trans($object->error).'
    '; + $action=''; } } } +// Retreive First Task ID of Project if withprojet is on to allow project prev next to work +if (! empty($project_ref) && ! empty($withproject)) +{ + if ($projectstatic->fetch('',$project_ref) > 0) + { + $tasksarray=$object->getTasksArray(0, 0, $projectstatic->id, $socid, 0); + if (count($tasksarray) > 0) + { + $id=$tasksarray[0]->id; + } + else + { + Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.(empty($mode)?'':'&mode='.$mode)); + } + } +} /* * View @@ -117,24 +130,22 @@ llxHeader("",$langs->trans("Task")); $form = new Form($db); $formother = new FormOther($db); -$project = new Project($db); -$task = new Task($db); -if ($taskid) +if ($id > 0 || ! empty($ref)) { - if ($task->fetch($taskid) > 0) + if ($object->fetch($id) > 0) { - $result=$project->fetch($task->fk_project); - if (! empty($project->socid)) $project->societe->fetch($project->socid); + $result=$projectstatic->fetch($object->fk_project); + if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); - $userWrite = $project->restrictedProjectArea($user,'write'); + $userWrite = $projectstatic->restrictedProjectArea($user,'write'); - if ($withproject) + if (! empty($withproject)) { // Tabs for project $tab='tasks'; - $head=project_prepare_head($project); - dol_fiche_head($head, $tab, $langs->trans("Project"),0,($project->public?'projectpub':'project')); + $head=project_prepare_head($projectstatic); + dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project')); $param=($mode=='mine'?'&mode=mine':''); @@ -147,28 +158,28 @@ if ($taskid) // Define a complementary filter for search of next/prev ref. if (! $user->rights->projet->all->lire) { - $projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,0); - $project->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; + $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,0); + $projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } - print $form->showrefnav($project,'ref','',1,'ref','ref','',$param); + print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1'); print ''; - print '
    '; + print ''; print ''; print ''; // Visibility print ''; // Statut - print ''; + print ''; print '
    '.$langs->trans("Ref").''; - if (! GETPOST('withproject') || empty($project->id)) + if (empty($withproject) || empty($projectstatic->id)) { - $projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,1); + $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1); $object->next_prev_filter=" fk_projet in (".$projectsListId.")"; } - else $object->next_prev_filter=" fk_projet = ".$project->id; + else $object->next_prev_filter=" fk_projet = ".$projectstatic->id; print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param); print '
    '.$langs->trans("Project").''; - print $project->getNomUrl(1); + print $projectstatic->getNomUrl(1); print '
    '.$langs->trans("Company").''; - if ($project->societe->id > 0) print $project->societe->getNomUrl(1); + if ($projectstatic->societe->id > 0) print $projectstatic->societe->getNomUrl(1); else print' '; print '
    '.$langs->trans("Label").''.$project->title.'
    '.$langs->trans("Label").''.$projectstatic->title.'
    '.$langs->trans("Company").''; - if (! empty($project->societe->id)) print $project->societe->getNomUrl(1); + if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1); else print ' '; print '
    '.$langs->trans("Visibility").''; - if ($project->public) print $langs->trans('SharedProject'); + if ($projectstatic->public) print $langs->trans('SharedProject'); else print $langs->trans('PrivateProject'); print '
    '.$langs->trans("Status").''.$project->getLibStatut(4).'
    '.$langs->trans("Status").''.$projectstatic->getLibStatut(4).'
    '; @@ -184,7 +195,7 @@ if ($taskid) if ($user->rights->projet->all->creer || $user->rights->projet->creer) { - if ($project->public || $userWrite > 0) + if ($projectstatic->public || $userWrite > 0) { print ''.$langs->trans('AddTask').''; } @@ -202,12 +213,12 @@ if ($taskid) */ // To verify role of users - //$userAccess = $project->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project - //$arrayofuseridoftask=$task->getListContactId('internal'); + //$userAccess = $projectstatic->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project + //$arrayofuseridoftask=$object->getListContactId('internal'); dol_htmloutput_mesg($mesg); - $head=task_prepare_head($task); + $head=task_prepare_head($object); dol_fiche_head($head, 'task_task', $langs->trans("Task"),0,'projecttask'); if ($action == 'edit' && $user->rights->projet->creer) @@ -216,56 +227,56 @@ if ($taskid) print ''; print ''; print ''; - print ''; + print ''; print ''; // Ref print ''; - print ''; + print ''; // Label print ''; - print ''; + print ''; // Project if (empty($withproject)) { print ''; // Third party print ''; } // Task parent print ''; // Date start print ''; // Date end print ''; // Progress print ''; // Description print ''; print ''; print '
    '.$langs->trans("Ref").''.$task->ref.'
    '.$object->ref.'
    '.$langs->trans("Label").'
    '.$langs->trans("Project").''; - print $project->getNomUrl(1); + print $projectstatic->getNomUrl(1); print '
    '.$langs->trans("Company").''; - if ($project->societe->id) print $project->societe->getNomUrl(1); + if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1); else print ' '; print '
    '.$langs->trans("ChildOfTask").''; - print $formother->selectProjectTasks($task->fk_task_parent,$project->id, 'task_parent', $user->admin?0:1, 0); + print $formother->selectProjectTasks($object->fk_task_parent,$projectstatic->id, 'task_parent', $user->admin?0:1, 0); print '
    '.$langs->trans("DateStart").''; - print $form->select_date($task->date_start,'dateo'); + print $form->select_date($object->date_start,'dateo'); print '
    '.$langs->trans("DateEnd").''; - print $form->select_date($task->date_end?$task->date_end:-1,'datee'); + print $form->select_date($object->date_end?$object->date_end:-1,'datee'); print '
    '.$langs->trans("Progress").''; - print $formother->select_percent($task->progress,'progress'); + print $formother->select_percent($object->progress,'progress'); print '
    '.$langs->trans("Description").''; - print ''; + print ''; print '
    '; @@ -283,7 +294,7 @@ if ($taskid) * Fiche tache en mode visu */ $param=($withproject?'&withproject=1':''); - $linkback=$withproject?''.$langs->trans("BackToList").'':''; + $linkback=$withproject?''.$langs->trans("BackToList").'':''; if ($action == 'delete') { @@ -297,51 +308,51 @@ if ($taskid) print ''; print $langs->trans("Ref"); print ''; - if (! GETPOST('withproject') || empty($project->id)) + if (! GETPOST('withproject') || empty($projectstatic->id)) { - $projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,1); - $task->next_prev_filter=" fk_projet in (".$projectsListId.")"; + $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1); + $object->next_prev_filter=" fk_projet in (".$projectsListId.")"; } - else $task->next_prev_filter=" fk_projet = ".$project->id; - print $form->showrefnav($task,'id',$linkback,1,'rowid','ref','',$param); + else $object->next_prev_filter=" fk_projet = ".$projectstatic->id; + print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param); print ''; print ''; // Label - print ''.$langs->trans("Label").''.$task->label.''; + print ''.$langs->trans("Label").''.$object->label.''; // Project if (empty($withproject)) { print ''.$langs->trans("Project").''; - print $project->getNomUrl(1); + print $projectstatic->getNomUrl(1); print ''; // Third party print ''.$langs->trans("Company").''; - if ($project->societe->id) print $project->societe->getNomUrl(1); + if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1); else print ' '; print ''; } // Date start print ''.$langs->trans("DateStart").''; - print dol_print_date($task->date_start,'day'); + print dol_print_date($object->date_start,'day'); print ''; // Date end print ''.$langs->trans("DateEnd").''; - print dol_print_date($task->date_end,'day'); + print dol_print_date($object->date_end,'day'); print ''; // Progress print ''.$langs->trans("Progress").''; - print $task->progress.' %'; + print $object->progress.' %'; print ''; // Description print ''.$langs->trans("Description").''; - print nl2br($task->description); + print nl2br($object->description); print ''; print ''; @@ -361,7 +372,7 @@ if ($taskid) // Modify if ($user->rights->projet->creer) { - print ''.$langs->trans('Modify').''; + print ''.$langs->trans('Modify').''; } else { @@ -369,9 +380,9 @@ if ($taskid) } // Delete - if ($user->rights->projet->supprimer && ! $task->hasChildren()) + if ($user->rights->projet->supprimer && ! $object->hasChildren()) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { @@ -385,6 +396,5 @@ if ($taskid) llxFooter(); - $db->close(); ?> diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 8f93368d6e4..2e0d8b66984 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -1,8 +1,8 @@ - * Copyright (C) 2006-2012 Laurent Destailleur - * Copyright (C) 2010 Regis Houssin - * Copyright (C) 2011 Juanjo Menent +/* Copyright (C) 2005 Rodolphe Quiedeville + * Copyright (C) 2006-2012 Laurent Destailleur + * Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2011 Juanjo Menent * * 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 +20,7 @@ /** * \file htdocs/projet/tasks/time.php - * \ingroup projet + * \ingroup project * \brief Page to add new time spent on a task */ @@ -32,21 +32,26 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"); $langs->load('projects'); -$taskid = isset($_GET["id"])?$_GET["id"]:''; -$id = GETPOST('id','int'); -$ref= GETPOST('ref'); -$action=GETPOST('action'); -$withproject=GETPOST('withproject'); +$id=GETPOST('id','int'); +$ref=GETPOST('ref','alpha'); +$action=GETPOST('action','alpha'); +$confirm=GETPOST('confirm','alpha'); +$withproject=GETPOST('withproject','int'); +$project_ref=GETPOST('project_ref','alpha'); // Security check $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; if (!$user->rights->projet->lire) accessforbidden(); +$object = new Task($db); +$projectstatic = new Project($db); + /* * Actions */ + if ($action == 'addtimespent' && $user->rights->projet->creer) { $error=0; @@ -64,28 +69,27 @@ if ($action == 'addtimespent' && $user->rights->projet->creer) if (! $error) { - $task = new Task($db); - $task->fetch($_POST["id"]); + $object->fetch($id); - $task->timespent_note = $_POST["timespent_note"]; - $task->timespent_duration = $_POST["timespent_durationhour"]*60*60; // We store duration in seconds - $task->timespent_duration+= $_POST["timespent_durationmin"]*60; // We store duration in seconds - $task->timespent_date = dol_mktime(12,0,0,$_POST["timemonth"],$_POST["timeday"],$_POST["timeyear"]); - $task->timespent_fk_user = $_POST["userid"]; + $object->timespent_note = $_POST["timespent_note"]; + $object->timespent_duration = $_POST["timespent_durationhour"]*60*60; // We store duration in seconds + $object->timespent_duration+= $_POST["timespent_durationmin"]*60; // We store duration in seconds + $object->timespent_date = dol_mktime(12,0,0,$_POST["timemonth"],$_POST["timeday"],$_POST["timeyear"]); + $object->timespent_fk_user = $_POST["userid"]; - $result=$task->addTimeSpent($user); + $result=$object->addTimeSpent($user); if ($result >= 0) { } else { - $mesg='
    '.$langs->trans($task->error).'
    '; + $mesg='
    '.$langs->trans($object->error).'
    '; } } else { - $_POST["action"]=''; + $action=''; } } @@ -101,44 +105,60 @@ if ($action == 'updateline' && ! $_POST["cancel"] && $user->rights->projet->cree if (! $error) { - $task = new Task($db); - $task->fetch($_POST["id"]); + $object->fetch($id); - $task->timespent_id = $_POST["lineid"]; - $task->timespent_note = $_POST["timespent_note_line"]; - $task->timespent_old_duration = $_POST["old_duration"]; - $task->timespent_duration = $_POST["new_durationhour"]*60*60; // We store duration in seconds - $task->timespent_duration+= $_POST["new_durationmin"]*60; // We store duration in seconds - $task->timespent_date = dol_mktime(12,0,0,$_POST["timelinemonth"],$_POST["timelineday"],$_POST["timelineyear"]); - $task->timespent_fk_user = $_POST["userid_line"]; + $object->timespent_id = $_POST["lineid"]; + $object->timespent_note = $_POST["timespent_note_line"]; + $object->timespent_old_duration = $_POST["old_duration"]; + $object->timespent_duration = $_POST["new_durationhour"]*60*60; // We store duration in seconds + $object->timespent_duration+= $_POST["new_durationmin"]*60; // We store duration in seconds + $object->timespent_date = dol_mktime(12,0,0,$_POST["timelinemonth"],$_POST["timelineday"],$_POST["timelineyear"]); + $object->timespent_fk_user = $_POST["userid_line"]; - $result=$task->updateTimeSpent($user); + $result=$object->updateTimeSpent($user); if ($result >= 0) { } else { - $mesg='
    '.$langs->trans($task->error).'
    '; + $mesg='
    '.$langs->trans($object->error).'
    '; } } else { - $_POST["action"]=''; + $action=''; } } -if ($action == 'confirm_delete' && $_REQUEST["confirm"] == "yes" && $user->rights->projet->creer) +if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->creer) { - $task = new Task($db); - $task->fetchTimeSpent($_GET['lineid']); - $result = $task->delTimeSpent($user); + $object->fetchTimeSpent($_GET['lineid']); + $result = $object->delTimeSpent($user); if (!$result) { $langs->load("errors"); - $mesg='
    '.$langs->trans($task->error).'
    '; - $_POST["action"]=''; + $mesg='
    '.$langs->trans($object->error).'
    '; + $action=''; + } +} + +// Retreive First Task ID of Project if withprojet is on to allow project prev next to work +if (! empty($project_ref) && ! empty($withproject)) +{ + if ($projectstatic->fetch(0,$project_ref) > 0) + { + $tasksarray=$object->getTasksArray(0, 0, $projectstatic->id, $socid, 0); + if (count($tasksarray) > 0) + { + $id=$tasksarray[0]->id; + } + else + { + Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject?'&withproject=1':'').(empty($mode)?'':'&mode='.$mode)); + exit; + } } } @@ -147,10 +167,6 @@ if ($action == 'confirm_delete' && $_REQUEST["confirm"] == "yes" && $user->right * View */ -$form = new Form($db); -$project = new Project($db); -$task = new Task($db); - llxHeader("",$langs->trans("Task")); $form = new Form($db); @@ -160,19 +176,19 @@ if ($id > 0 || ! empty($ref)) /* * Fiche projet en mode visu */ - if ($task->fetch($id,$ref) >= 0) + if ($object->fetch($id) >= 0) { - $result=$project->fetch($task->fk_project); - if (! empty($project->socid)) $project->societe->fetch($project->socid); + $result=$projectstatic->fetch($object->fk_project); + if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); - $userWrite = $project->restrictedProjectArea($user,'write'); + $userWrite = $projectstatic->restrictedProjectArea($user,'write'); if ($withproject) { // Tabs for project $tab='tasks'; - $head=project_prepare_head($project); - dol_fiche_head($head, $tab, $langs->trans("Project"),0,($project->public?'projectpub':'project')); + $head=project_prepare_head($projectstatic); + dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project')); $param=($mode=='mine'?'&mode=mine':''); @@ -185,28 +201,28 @@ if ($id > 0 || ! empty($ref)) // Define a complementary filter for search of next/prev ref. if (! $user->rights->projet->all->lire) { - $projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,0); - $project->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; + $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,0); + $projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } - print $form->showrefnav($project,'ref','',1,'ref','ref','',$param); + print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1'); print ''; - print ''.$langs->trans("Label").''.$project->title.''; + print ''.$langs->trans("Label").''.$projectstatic->title.''; print ''.$langs->trans("Company").''; - if (! empty($project->societe->id)) print $project->societe->getNomUrl(1); + if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1); else print ' '; print ''; print ''; // Visibility print ''.$langs->trans("Visibility").''; - if ($project->public) print $langs->trans('SharedProject'); + if ($projectstatic->public) print $langs->trans('SharedProject'); else print $langs->trans('PrivateProject'); print ''; // Statut - print ''.$langs->trans("Status").''.$project->getLibStatut(4).''; + print ''.$langs->trans("Status").''.$projectstatic->getLibStatut(4).''; print ''; @@ -215,48 +231,48 @@ if ($id > 0 || ! empty($ref)) print '
    '; } - $head=task_prepare_head($task); + $head=task_prepare_head($object); dol_fiche_head($head, 'task_time', $langs->trans("Task"),0,'projecttask'); dol_htmloutput_mesg($mesg); if ($action == 'deleteline') { - $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"].'&lineid='.$_GET["lineid"],$langs->trans("DeleteATimeSpent"),$langs->trans("ConfirmDeleteATimeSpent"),"confirm_delete",'','',1); + $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id.'&lineid='.$_GET["lineid"].($withproject?'&withproject=1':''),$langs->trans("DeleteATimeSpent"),$langs->trans("ConfirmDeleteATimeSpent"),"confirm_delete",'','',1); if ($ret == 'html') print '
    '; } print ''; $param=($withproject?'&withproject=1':''); - $linkback=$withproject?''.$langs->trans("BackToList").'':''; + $linkback=$withproject?''.$langs->trans("BackToList").'':''; // Ref print ''; // Label - print ''; + print ''; // Project if (empty($withproject)) { print ''; // Third party print ''; } @@ -273,10 +289,11 @@ if ($id > 0 || ! empty($ref)) { print '
    '; - print ''; + print ''; print ''; print ''; - print ''; + print ''; + print ''; print '
    '; print $langs->trans("Ref"); print ''; - if (! GETPOST('withproject') || empty($project->id)) + if (! GETPOST('withproject') || empty($projectstatic->id)) { - $projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,1); - $task->next_prev_filter=" fk_projet in (".$projectsListId.")"; + $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1); + $object->next_prev_filter=" fk_projet in (".$projectsListId.")"; } - else $task->next_prev_filter=" fk_projet = ".$project->id; - print $form->showrefnav($task,'id',$linkback,1,'rowid','ref','',$param); + else $object->next_prev_filter=" fk_projet = ".$projectstatic->id; + print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param); print '
    '.$langs->trans("Label").''.$task->label.'
    '.$langs->trans("Label").''.$object->label.'
    '.$langs->trans("Project").''; - print $project->getNomUrl(1); + print $projectstatic->getNomUrl(1); print '
    '.$langs->trans("Company").''; - if ($project->societe->id) print $project->societe->getNomUrl(1); + if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1); else print ' '; print '
    '; @@ -298,7 +315,7 @@ if ($id > 0 || ! empty($ref)) // Contributor print ''; @@ -329,7 +346,7 @@ if ($id > 0 || ! empty($ref)) $sql.= ", u.name, u.firstname"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t"; $sql .= " , ".MAIN_DB_PREFIX."user as u"; - $sql .= " WHERE t.fk_task =".$task->id; + $sql .= " WHERE t.fk_task =".$object->id; $sql .= " AND t.fk_user = u.rowid"; $sql .= " ORDER BY t.task_date DESC"; @@ -353,10 +370,10 @@ if ($id > 0 || ! empty($ref)) dol_print_error($db); } - print ''; + print ''; print ''; print ''; - print ''; + print ''; print '
    '; - $contactoftask=$task->getListContactId('internal'); + $contactoftask=$object->getListContactId('internal'); print img_object('','user'); print $form->select_users($_POST["userid"]?$_POST["userid"]:$user->id,'userid',0,'',0,'',$contactoftask); print '
    '; print ''; @@ -427,7 +444,7 @@ if ($id > 0 || ! empty($ref)) // Edit and delete icon print '
    '; - if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid) + if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) { print ''; print ''; @@ -437,12 +454,12 @@ if ($id > 0 || ! empty($ref)) else if ($user->rights->projet->creer) { print ' '; - print 'rowid.'">'; + print 'rowid.($withproject?'&withproject=1':'').'">'; print img_edit(); print ''; print ' '; - print 'rowid.'">'; + print 'rowid.($withproject?'&withproject=1':'').'">'; print img_delete(); print ''; } @@ -460,7 +477,7 @@ if ($id > 0 || ! empty($ref)) } } -$db->close(); llxFooter(); +$db->close(); ?> diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php index 53fc43c00e0..a08bdad1814 100644 --- a/htdocs/public/agenda/agendaexport.php +++ b/htdocs/public/agenda/agendaexport.php @@ -55,9 +55,6 @@ require_once(DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'); // Security check if (! $conf->agenda->enabled) accessforbidden('',1,1,1); -$mainmenu=isset($_GET["mainmenu"])?$_GET["mainmenu"]:""; -$leftmenu=isset($_GET["leftmenu"])?$_GET["leftmenu"]:""; - // Define format, type and filter $format='ical'; $type='event'; @@ -152,19 +149,15 @@ if ($format == 'ical' || $format == 'vcal') if ($contenttype) header('Content-Type: '.$contenttype.($outputencoding?'; charset='.$outputencoding:'')); if ($attachment) header('Content-Disposition: attachment; filename="'.$shortfilename.'"'); - // Ajout directives pour resoudre bug IE - //header('Cache-Control: Public, must-revalidate'); - //header('Pragma: public'); - - // Google Agenda import tweak - header('Cache-Control: max-age=7200, private, must-revalidate'); + if ($cachedelay) header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); + else header('Cache-Control: private, must-revalidate'); // Clean parameters $outputfile=$conf->agenda->dir_temp.'/'.$filename; $result=readfile($outputfile); if (! $result) print 'File '.$outputfile.' was empty.'; - // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); + //header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); exit; } else @@ -194,6 +187,8 @@ if ($format == 'rss') // Ajout directives pour resoudre bug IE //header('Cache-Control: Public, must-revalidate'); //header('Pragma: public'); + if ($cachedelay) header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); + else header('Cache-Control: private, must-revalidate'); // Clean parameters $outputfile=$conf->agenda->dir_temp.'/'.$filename; diff --git a/htdocs/public/emailing/mailing-read.php b/htdocs/public/emailing/mailing-read.php index 9b5721b70da..884509eebde 100644 --- a/htdocs/public/emailing/mailing-read.php +++ b/htdocs/public/emailing/mailing-read.php @@ -1,6 +1,5 @@ -#!/usr/bin/php * Copyright (C) 2005-2011 Laurent Destailleur * Copyright (C) 2012 Florian Henry @@ -21,11 +20,11 @@ /** - * \file scripts/emailings/mailing-read.php + * \file public/emailing/mailing-read.php * \ingroup mailing * \brief Script use to update mail status if destinaries read it (if images during mail read are display) */ - + define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. @@ -33,21 +32,34 @@ require("../../main.inc.php"); $id=GETPOST('tag'); +if (empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) accessforbidden('Option not enabled'); + + +/* + * Actions + */ if ($id!='') { $statut='2'; $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".$statut." WHERE tag='".$id."'"; dol_syslog("public/emailing/mailing-read.php : Mail read : ".$sql, LOG_DEBUG); - - $resql=$db->query($sql); - - $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag='".$id."')"; - dol_syslog("public/emailing/mailing-read.php : Mail read : ".$sql, LOG_DEBUG); - - $resql=$db->query($sql); -} + $resql=$db->query($sql); + + //Update status communication of thirdparty prospect + $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=3 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag='".$id."' AND source_type='thirdparty' AND source_id is not null)"; + dol_syslog("public/emailing/mailing-read.php : Mail read thirdparty : ".$sql, LOG_DEBUG); + + $resql=$db->query($sql); + + //Update status communication of contact prospect + $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=3 WHERE rowid IN (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.tag = '".$id."' AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)"; + dol_syslog("public/emailing/mailing-read.php : Mail read contact : ".$sql, LOG_DEBUG); + + $resql=$db->query($sql); + +} $db->close(); ?> diff --git a/htdocs/public/emailing/mailing-usubscribe.php b/htdocs/public/emailing/mailing-unsubscribe.php similarity index 78% rename from htdocs/public/emailing/mailing-usubscribe.php rename to htdocs/public/emailing/mailing-unsubscribe.php index a46946b9661..57a4a6fa2f7 100644 --- a/htdocs/public/emailing/mailing-usubscribe.php +++ b/htdocs/public/emailing/mailing-unsubscribe.php @@ -1,5 +1,5 @@ * Copyright (C) 2005-2011 Laurent Destailleur * Copyright (C) 2012 Florian Henry @@ -20,11 +20,11 @@ /** - * \file scripts/emailings/mailing-read.php + * \file public/emailing/mailing-unsubscribe.php * \ingroup mailing * \brief Script use to update unsubcribe contact to prospect mailing list */ - + define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. @@ -39,20 +39,32 @@ $langs->load("mails"); $id=GETPOST('tag'); $unsuscrib=GETPOST('unsuscrib'); +if (empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) accessforbidden('Option not enabled'); + + +/* + * Actions + */ if (($id!='') && ($unsuscrib=='1')) { //Udate status of mail in Destinaries maling list $statut='3'; $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".$statut." WHERE tag='".$id."'"; - dol_syslog("public/emailing/mailing-read.php : Mail unsubcribe : ".$sql, LOG_DEBUG); - + dol_syslog("public/emailing/mailing-unsubscribe.php : Mail unsubcribe : ".$sql, LOG_DEBUG); + $resql=$db->query($sql); - - //Update status communication of prospect - $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=-1 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag='".$id."' AND source_type='thirdparty')"; - dol_syslog("public/emailing/mailing-read.php : Mail unsubcribe : ".$sql, LOG_DEBUG); - + + //Update status communication of thirdparty prospect + $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=-1 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag='".$id."' AND source_type='thirdparty' AND source_id is not null)"; + dol_syslog("public/emailing/mailing-unsubscribe.php : Mail unsubcribe thirdparty : ".$sql, LOG_DEBUG); + + $resql=$db->query($sql); + + //Update status communication of contact prospect + $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=-1 WHERE rowid IN (SELECT fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.tag = '".$id."' AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)"; + dol_syslog("public/emailing/mailing-unsubscribe.php : Mail unsubcribe contact : ".$sql, LOG_DEBUG); + $resql=$db->query($sql); $sql = "SELECT mc.email"; @@ -60,9 +72,9 @@ if (($id!='') && ($unsuscrib=='1')) $sql .= " WHERE mc.tag='".$id."'"; $resql=$db->query($sql); - + $obj = $db->fetch_object($resql); - + header("Content-type: text/html; charset=".$conf->file->character_set_client); print ''; @@ -86,8 +98,6 @@ if (($id!='') && ($unsuscrib=='1')) print '
    '; print "\n"; print "\n"; - - } $db->close(); diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php index 3b0d23a2016..8f2c4c55d76 100644 --- a/htdocs/public/paybox/newpayment.php +++ b/htdocs/public/paybox/newpayment.php @@ -80,9 +80,22 @@ $urlok=$urlwithouturlroot.DOL_URL_ROOT.'/public/paybox/paymentok.php?'; $urlko=$urlwithouturlroot.DOL_URL_ROOT.'/public/paybox/paymentko.php?'; // Complete urls +$SOURCE=GETPOST("source",'alpha'); +$ref=$REF=GETPOST('ref','alpha'); $TAG=GETPOST("tag",'alpha'); $FULLTAG=GETPOST("fulltag",'alpha'); // fulltag is tag with more informations +$SECUREKEY=GETPOST("securekey"); // Secure key +if (! empty($SOURCE)) +{ + $urlok.='source='.urlencode($SOURCE).'&'; + $urlko.='source='.urlencode($SOURCE).'&'; +} +if (! empty($REF)) +{ + $urlok.='ref='.urlencode($REF).'&'; + $urlko.='ref='.urlencode($REF).'&'; +} if (!empty($TAG)) { $urlok.='tag='.urlencode($TAG).'&'; @@ -96,6 +109,9 @@ if (!empty($FULLTAG)) $urlok=preg_replace('/&$/','',$urlok); // Remove last & $urlko=preg_replace('/&$/','',$urlko); // Remove last & +// Check security token +$valid=true; + /* * Actions @@ -110,6 +126,8 @@ if (GETPOST("action") == 'dopayment') elseif (empty($email)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("YourEMail")); elseif (! isValidEMail($email)) $mesg=$langs->trans("ErrorBadEMail",$email); elseif (empty($FULLTAG)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PaymentCode")); + elseif (dol_strlen($urlok) > 150) $mesg='Error urlok too long '.$urlok; + elseif (dol_strlen($urlko) > 150) $mesg='Error urlko too long '.$urlko; if (empty($mesg)) { @@ -142,12 +160,12 @@ print '
    '; print ''; print ''; print ''; -print ''; print ''; print ''; print "\n"; print ''."\n"; print ''."\n"; +print ''."\n"; print ''."\n"; print ''."\n"; print "\n"; @@ -212,7 +230,7 @@ $var=false; // Free payment -if (! GETPOST("source")) +if (! GETPOST("source") && $valid) { $found=true; $tag=GETPOST("tag"); @@ -230,7 +248,11 @@ if (! GETPOST("source")) print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; - if (empty($amount) || ! is_numeric($amount)) print ''; + if (empty($amount) || ! is_numeric($amount)) + { + print ''; + print ''; + } else { print ''.price($amount).''; print ''; @@ -259,7 +281,7 @@ if (! GETPOST("source")) // Payment on customer order -if (GETPOST("source") == 'order') +if (GETPOST("source") == 'order' && $valid) { $found=true; $langs->load("orders"); @@ -267,7 +289,7 @@ if (GETPOST("source") == 'order') require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php"); $order=new Commande($db); - $result=$order->fetch('',$_REQUEST["ref"]); + $result=$order->fetch('',$ref); if ($result < 0) { $mesg=$order->error; @@ -282,8 +304,9 @@ if (GETPOST("source") == 'order') if (GETPOST("amount",'int')) $amount=GETPOST("amount",'int'); $amount=price2num($amount); - $fulltag='IR='.$order->ref.'.TPID='.$order->thirdparty->id.'.TP='.strtr($order->thirdparty->name,"-"," "); - if (! empty($_REQUEST["tag"])) { $tag=$_REQUEST["tag"]; $fulltag.='.TAG='.$_REQUEST["tag"]; } + $fulltag='IR='.$order->ref.'.TPID='.$order->thirdparty->id; + //$fulltag.='.TP='.strtr($order->thirdparty->name,"-"," "); We disable this because url that will contains FULLTAG must be lower than 150 + if (! empty($TAG)) { $tag=$TAG; $fulltag.='.TAG='.$TAG; } $fulltag=dol_string_unaccent($fulltag); // Creditor @@ -312,7 +335,11 @@ if (GETPOST("source") == 'order') print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; - if (empty($amount) || ! is_numeric($amount)) print ''; + if (empty($amount) || ! is_numeric($amount)) + { + print ''; + print ''; + } else { print ''.price($amount).''; print ''; @@ -342,7 +369,7 @@ if (GETPOST("source") == 'order') // Payment on customer invoice -if (GETPOST("source") == 'invoice') +if (GETPOST("source") == 'invoice' && $valid) { $found=true; $langs->load("bills"); @@ -350,7 +377,7 @@ if (GETPOST("source") == 'invoice') require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); $invoice=new Facture($db); - $result=$invoice->fetch('',$_REQUEST["ref"]); + $result=$invoice->fetch('',$ref); if ($result < 0) { $mesg=$invoice->error; @@ -361,12 +388,13 @@ if (GETPOST("source") == 'invoice') $result=$invoice->fetch_thirdparty($invoice->socid); } - $amount=$invoice->total_ttc - $invoice->getSommePaiement(); + $amount=price2num($invoice->total_ttc - $invoice->getSommePaiement()); if (GETPOST("amount",'int')) $amount=GETPOST("amount",'int'); $amount=price2num($amount); - $fulltag='IR='.$invoice->ref.'.TPID='.$invoice->thirdparty->id.'.TP='.strtr($invoice->thirdparty->name,"-"," "); - if (! empty($_REQUEST["tag"])) { $tag=$_REQUEST["tag"]; $fulltag.='.TAG='.$_REQUEST["tag"]; } + $fulltag='IR='.$invoice->ref.'.TPID='.$invoice->thirdparty->id; + //$fulltag.='.TP='.strtr($invoice->thirdparty->name,"-"," "); We disable this because url that will contains FULLTAG must be lower than 150 + if (! empty($TAG)) { $tag=$TAG; $fulltag.='.TAG='.$TAG; } $fulltag=dol_string_unaccent($fulltag); // Creditor @@ -395,7 +423,11 @@ if (GETPOST("source") == 'invoice') print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; - if (empty($amount) || ! is_numeric($amount)) print ''; + if (empty($amount) || ! is_numeric($amount)) + { + print ''; + print ''; + } else { print ''.price($amount).''; print ''; @@ -424,7 +456,7 @@ if (GETPOST("source") == 'invoice') } // Payment on contract line -if (GETPOST("source") == 'contractline') +if (GETPOST("source") == 'contractline' && $valid) { $found=true; $langs->load("contracts"); @@ -432,7 +464,7 @@ if (GETPOST("source") == 'contractline') require_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"); $contractline=new ContratLigne($db); - $result=$contractline->fetch('',$_REQUEST["ref"]); + $result=$contractline->fetch('',$ref); if ($result < 0) { $mesg=$contractline->error; @@ -491,12 +523,13 @@ if (GETPOST("source") == 'contractline') if (GETPOST("amount",'int')) $amount=GETPOST("amount",'int'); $amount=price2num($amount); - $fulltag='CLR='.$contractline->ref.'.CR='.$contract->ref.'.TPID='.$contract->thirdparty->id.'.TP='.strtr($contract->thirdparty->name,"-"," "); - if (! empty($_REQUEST["tag"])) { $tag=$_REQUEST["tag"]; $fulltag.='.TAG='.$_REQUEST["tag"]; } + $fulltag='CLR='.$contractline->ref.'.CR='.$contract->ref.'.TPID='.$contract->thirdparty->id; + //$fulltag.='.TP='.strtr($contract->thirdparty->name,"-"," "); We disable this because url that will contains FULLTAG must be lower than 150 + if (! empty($TAG)) { $tag=$TAG; $fulltag.='.TAG='.$TAG; } $fulltag=dol_string_unaccent($fulltag); $qty=1; - if (isset($_REQUEST["qty"])) $qty=$_REQUEST["qty"]; + if (GETPOST('qty')) $qty=GETPOST('qty'); // Creditor $var=!$var; @@ -566,7 +599,11 @@ if (GETPOST("source") == 'contractline') print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; - if (empty($amount) || ! is_numeric($amount)) print ''; + if (empty($amount) || ! is_numeric($amount)) + { + print ''; + print ''; + } else { print ''.price($amount).''; print ''; @@ -596,7 +633,7 @@ if (GETPOST("source") == 'contractline') } // Payment on member subscription -if (GETPOST("source") == 'membersubscription') +if (GETPOST("source") == 'membersubscription' && $valid) { $found=true; $langs->load("members"); @@ -605,7 +642,7 @@ if (GETPOST("source") == 'membersubscription') require_once(DOL_DOCUMENT_ROOT."/adherents/class/cotisation.class.php"); $member=new Adherent($db); - $result=$member->fetch('',GETPOST("ref")); + $result=$member->fetch('',$ref); if ($result < 0) { $mesg=$member->error; @@ -620,8 +657,9 @@ if (GETPOST("source") == 'membersubscription') if (GETPOST("amount",'int')) $amount=GETPOST("amount",'int'); $amount=price2num($amount); - $fulltag='MID='.$member->id.'.M='.strtr($member->getFullName($langs),"-"," "); - if (! empty($_REQUEST["tag"])) { $tag=$_REQUEST["tag"]; $fulltag.='.TAG='.$_REQUEST["tag"]; } + $fulltag='MID='.$member->id; + //$fulltag.='.M='.dol_trunc(strtr($member->getFullName($langs),"-"," "),12); We disable this because url that will contains FULLTAG must be lower than 150 + if (! empty($TAG)) { $tag=$TAG; $fulltag.='.TAG='.$TAG; } $fulltag=dol_string_unaccent($fulltag); // Creditor @@ -639,7 +677,7 @@ if (GETPOST("source") == 'membersubscription') // Object $var=!$var; $text=''.$langs->trans("PaymentSubscription").''; - print ''.$langs->trans("Designation"); + print ''.$langs->trans("Designation"); print ''.$text; print ''; print ''; @@ -667,11 +705,19 @@ if (GETPOST("source") == 'membersubscription') print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; - if (empty($amount) || ! is_numeric($amount)) print ''; + if (empty($amount) || ! is_numeric($amount)) + { + $valtoshow=GETPOST("newamount",'int'); + if (! empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow=max($conf->global->MEMBER_MIN_AMOUNT,$valtoshow); + print ''; + print ''; + } else { - print ''.price($amount).''; - print ''; - print ''; + $valtoshow=$amount; + if (! empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow=max($conf->global->MEMBER_MIN_AMOUNT,$valtoshow); + print ''.price($valtoshow).''; + print ''; + print ''; } // Currency print ' '.$langs->trans("Currency".$currency).''; diff --git a/htdocs/public/paypal/newpayment.php b/htdocs/public/paypal/newpayment.php index b2bf8ad54e9..f2f8842843a 100755 --- a/htdocs/public/paypal/newpayment.php +++ b/htdocs/public/paypal/newpayment.php @@ -1,13 +1,13 @@ - * Copyright (C) 2006-2011 Laurent Destailleur + * Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - *e + * * 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 @@ -116,7 +116,7 @@ if (! empty($SECUREKEY)) $urlok=preg_replace('/&$/','',$urlok); // Remove last & $urlko=preg_replace('/&$/','',$urlko); // Remove last & -// Clean parameters +// Check parameters $PAYPAL_API_OK=""; if ($urlok) $PAYPAL_API_OK=$urlok; $PAYPAL_API_KO=""; @@ -252,7 +252,6 @@ print '
    '."\n"; print ''."\n"; print ''."\n"; print ''."\n"; -print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; @@ -341,7 +340,11 @@ if (! GETPOST("source") && $valid) print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; - if (empty($amount) || ! is_numeric($amount)) print ''; + if (empty($amount) || ! is_numeric($amount)) + { + print ''; + print ''; + } else { print ''.price($amount).''; print ''; @@ -420,7 +423,11 @@ if (GETPOST("source") == 'order' && $valid) print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; - if (empty($amount) || ! is_numeric($amount)) print ''; + if (empty($amount) || ! is_numeric($amount)) + { + print ''; + print ''; + } else { print ''.price($amount).''; print ''; @@ -523,7 +530,11 @@ if (GETPOST("source") == 'invoice' && $valid) print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; - if (empty($amount) || ! is_numeric($amount)) print ''; + if (empty($amount) || ! is_numeric($amount)) + { + print ''; + print ''; + } else { print ''.price($amount).''; print ''; @@ -714,7 +725,11 @@ if (GETPOST("source") == 'contractline' && $valid) print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; - if (empty($amount) || ! is_numeric($amount)) print ''; + if (empty($amount) || ! is_numeric($amount)) + { + print ''; + print ''; + } else { print ''.price($amount).''; print ''; @@ -833,11 +848,19 @@ if (GETPOST("source") == 'membersubscription' && $valid) print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; - if (empty($amount) || ! is_numeric($amount)) print ''; + if (empty($amount) || ! is_numeric($amount)) + { + $valtoshow=GETPOST("newamount",'int'); + if (! empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow=max($conf->global->MEMBER_MIN_AMOUNT,$valtoshow); + print ''; + print ''; + } else { - print ''.price($amount).''; - print ''; - print ''; + $valtoshow=$amount; + if (! empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow=max($conf->global->MEMBER_MIN_AMOUNT,$valtoshow); + print ''.price($valtoshow).''; + print ''; + print ''; } // Currency print ' '.$langs->trans("Currency".$currency).''; diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 67e2782e144..0944f14e9fe 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -3,7 +3,7 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2011-2012 Juanjo Menent * * 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,8 +31,8 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/company.lib.php"); $langs->load("admin"); -$action=GETPOST("action"); -$value=GETPOST("value"); +$action=GETPOST('action','alpha'); +$value=GETPOST('value','alpha'); if (!$user->admin) accessforbidden(); @@ -69,7 +69,7 @@ if ($action == 'setcodecompta') if ($action == 'COMPANY_USE_SEARCH_TO_SELECT') { - $companysearch = GETPOST("activate_COMPANY_USE_SEARCH_TO_SELECT"); + $companysearch = GETPOST('activate_COMPANY_USE_SEARCH_TO_SELECT','alpha'); $res = dolibarr_set_const($db, "COMPANY_USE_SEARCH_TO_SELECT", $companysearch,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; if (! $error) @@ -93,8 +93,8 @@ if ($action == 'setModuleOptions') { if (array_key_exists('param'.$i,$_POST)) { - $param=$_POST["param".$i]; - $value=$_POST["value".$i]; + $param=GETPOST("param".$i,'alpha'); + $value=GETPOST("value".$i,'alpha'); if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; } @@ -114,8 +114,8 @@ if ($action == 'setModuleOptions') // Activate a document generator module if ($action == 'set') { - $label = GETPOST("label"); - $scandir = GETPOST("scandir"); + $label = GETPOST('label','alpha'); + $scandir = GETPOST('scandir','alpha'); $type='company'; $sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)"; @@ -141,8 +141,8 @@ if ($action== 'del') // Define default generator if ($action == 'setdoc') { - $label = GETPOST("label"); - $scandir = GETPOST("scandir"); + $label = GETPOST('label','alpha'); + $scandir = GETPOST('scandir','alpha'); $db->begin(); @@ -154,7 +154,7 @@ if ($action == 'setdoc') // On active le modele $type='company'; $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."document_model"; - $sql_del.= " WHERE nom = '".$db->escape($_GET["value"])."'"; + $sql_del.= " WHERE nom = '".$db->escape(GETPOST('value','alpha'))."'"; $sql_del.= " AND type = '".$type."'"; $sql_del.= " AND entity = ".$conf->entity; dol_syslog("societe.php ".$sql); @@ -181,7 +181,7 @@ if ($action == 'setdoc') //Activate ProfId if ($action == 'setprofid') { - $status = GETPOST("status"); + $status = GETPOST('status','alpha'); $idprof="SOCIETE_IDPROF".$value."_UNIQUE"; if (dolibarr_set_const($db, $idprof,$status,'chaine',0,'',$conf->entity) > 0) diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index fc239fb69a3..15bb0519539 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -80,17 +80,9 @@ abstract class ActionsCardCommon { $ret = $this->getInstanceDao(); - if (is_object($this->object) && method_exists($this->object,'fetch')) - { - if (! empty($id) || ! empty($ref)) $this->object->fetch($id,$ref); - } - else - { - // TODO Keep only this part of code. Previous in this method is useless - $object = new Societe($this->db); - if (! empty($id) || ! empty($ref)) $object->fetch($id,$ref); - $this->object = $object; - } + $object = new Societe($this->db); + if (! empty($id) || ! empty($ref)) $object->fetch($id,$ref); + $this->object = $object; } /** @@ -398,14 +390,14 @@ abstract class ActionsCardCommon if ($conf->use_javascript_ajax) { $this->tpl['ajax_selecttype'] = "\n".''."\n"; else print ''."\n"; -print ' -'."\n"; +print ''."\n"; if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER; print ' '; diff --git a/htdocs/theme/cameleo/img/helpdoc.png b/htdocs/theme/cameleo/img/helpdoc.png new file mode 100644 index 00000000000..8cd950e7be1 Binary files /dev/null and b/htdocs/theme/cameleo/img/helpdoc.png differ diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 4e74e9ca714..8cc873eefc9 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -522,6 +522,46 @@ foreach($mainmenuusedarray as $key => $val) /* Login */ +form#login { + margin-top: 70px; + margin-bottom: 30px; + font-size: 13px; +} +.login_table_title { + width: 540px; + color: #888888; + text-shadow: 1px 1px 1px #FFF; +} +.login_table label { + text-shadow: 1px 1px 1px #FFF; +} +.login_table { + padding:12px; + width: 540px; + border: 1px solid #C0C0C0; + background-color: #E0E0E0; + + -moz-box-shadow: 4px 4px 4px #CCC; + -webkit-box-shadow: 4px 4px 4px #CCC; + box-shadow: 4px 4px 4px #CCC; + + border-radius: 12px; + border:solid 1px rgba(168,168,168,.4); + border-top:solid 1px f8f8f8; + background-color: #f8f8f8; + background-image: -o-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); + background-image: -moz-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); + background-image: -webkit-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); + background-image: -ms-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); + background-image: linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); +} +#img_securitycode { + border: 1px solid #DDDDDD; +} +#img_logo { + max-width: 200px; +} + div.login_block { position: absolute; : 5px; @@ -813,13 +853,17 @@ td.photo { border: 1px solid #BBB !important; } -.toolbarbutton { - margin-top: 2px; +a.toolbarbutton { + margin-top: 1px; margin-left: 4px; + margin-right: 4px; + height: 30px; /* border: solid 1px #AAAAAA; - width: 34px;*/ - height: 34px; -/* background: #FFFFFF;*/ + width: 32px; + background: #FFFFFF;*/ +} +img.toolbarbutton { + height: 28px; } @@ -2121,6 +2165,128 @@ div.table-val-border-col { } + +/* ============================================================================== */ +/* JSGantt */ +/* ============================================================================== */ + +div.scroll2 { + width: 582px !important; +} + + +/* ============================================================================== */ +/* jFileTree */ +/* ============================================================================== */ + +.ecmfiletree { + width: 99%; + height: 99%; + background: #FFF; + padding-left: 2px; + font-weight: normal; +} + +.fileview { + width: 99%; + height: 99%; + background: #FFF; + padding-left: 2px; + padding-top: 4px; + font-weight: normal; +} + +div.filedirelem { + position: relative; + display: block; + text-decoration: none; +} + +ul.filedirelem { + padding: 2px; + margin: 0 5px 5px 5px; +} +ul.filedirelem li { + list-style: none; + padding: 2px; + margin: 0 10px 20px 10px; + width: 160px; + height: 120px; + text-align: center; + display: block; + float: ; + border: solid 1px #DDDDDD; +} + +ui-layout-north { + +} + +ul.ecmjqft { + font-size: 11px; + line-height: 16px; + padding: 0px; + margin: 0px; + font-weight: normal; +} + +ul.ecmjqft li { + list-style: none; + padding: 0px; + padding-left: 20px; + margin: 0px; + white-space: nowrap; + display: block; +} + +ul.ecmjqft a { + line-height: 16px; + vertical-align: middle; + color: #333; + padding: 0px 0px; + font-weight:normal; + display: inline-block !important; +/* float: left;*/ +} +ul.ecmjqft a:active { + font-weight: bold !important; +} +ul.ecmjqft a:hover { + text-decoration: underline; +} +div.ecmjqft { + vertical-align: middle; + display: inline-block !important; + text-align: right; + position:absolute; + right:8px; +} + +/* Core Styles */ +.ecmjqft LI.directory { font-weight:normal; background: url() left top no-repeat; } +.ecmjqft LI.expanded { font-weight:normal; background: url() left top no-repeat; } +.ecmjqft LI.wait { font-weight:normal; background: url() left top no-repeat; } + + + +/* ============================================================================== */ +/* jNotify */ +/* ============================================================================== */ + +.jnotify-container { + position: fixed !important; +global->MAIN_JQUERY_JNOTIFY_BOTTOM) { ?> + top: auto !important; + bottom: 4px !important; + + text-align: center; + min-width: 500px; + width: auto; + padding-left: 10px !important; + padding-right: 10px !important; +} + + close(); ?> diff --git a/htdocs/theme/common/treemenu/folder2-expanded.png b/htdocs/theme/common/treemenu/folder2-expanded.png new file mode 100755 index 00000000000..4e3548352fc Binary files /dev/null and b/htdocs/theme/common/treemenu/folder2-expanded.png differ diff --git a/htdocs/theme/common/treemenu/folder2.png b/htdocs/theme/common/treemenu/folder2.png new file mode 100755 index 00000000000..784e8fa4823 Binary files /dev/null and b/htdocs/theme/common/treemenu/folder2.png differ diff --git a/htdocs/theme/dolibarr_logo.png b/htdocs/theme/dolibarr_logo.png index da9baa40406..5c361732926 100755 Binary files a/htdocs/theme/dolibarr_logo.png and b/htdocs/theme/dolibarr_logo.png differ diff --git a/htdocs/theme/eldy/graph-color.php b/htdocs/theme/eldy/graph-color.php index 5f5ec26f190..a6a9c5735be 100644 --- a/htdocs/theme/eldy/graph-color.php +++ b/htdocs/theme/eldy/graph-color.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2012 Laurent Destailleur * * 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 @@ -17,9 +17,13 @@ */ /** - * \file htdocs/theme/eldy/graph-color.php - * \brief File to declare colors to use to build graphics with theme Eldy - * \ingroup core + * \file htdocs/theme/eldy/graph-color.php + * \brief File to declare colors to use to build graphics with theme Eldy + * \ingroup core + * + * To include file, do this: + * $color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/graph-color.php'; + * if (is_readable($color_file)) include_once($color_file); */ global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; diff --git a/htdocs/theme/eldy/img/helpdoc.png b/htdocs/theme/eldy/img/helpdoc.png new file mode 100644 index 00000000000..8cd950e7be1 Binary files /dev/null and b/htdocs/theme/eldy/img/helpdoc.png differ diff --git a/htdocs/theme/eldy/img/liste_titre.png b/htdocs/theme/eldy/img/liste_titre.png new file mode 100644 index 00000000000..7405550c080 Binary files /dev/null and b/htdocs/theme/eldy/img/liste_titre.png differ diff --git a/htdocs/theme/eldy/img/liste_titre2.png b/htdocs/theme/eldy/img/liste_titre2.png new file mode 100755 index 00000000000..038c8d3c5d5 Binary files /dev/null and b/htdocs/theme/eldy/img/liste_titre2.png differ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 03d598f27fa..e0d82a22852 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -84,6 +84,7 @@ $isblue=max(0,(2*$colblue-$colred-$colgreen)/2); // 0 - 255 $colorback1=($colred-3).','.($colgreen-3).','.($colblue-3); // topmenu $colorback2=($colred+5).','.($colgreen+5).','.($colblue+5); $colorbacktab1=($colred+15).','.($colgreen+16).','.($colblue+17); // vmenu +$colorbacktab1b=($colred+5).','.($colgreen+6).','.($colblue+7); // vmenu (not menu) $colorbacktab2=($colred-15).','.($colgreen-15).','.($colblue-15); $colorbacktitle1=($colred-5).','.($colgreen-5).','.($colblue-5); // title of array $colorbacktitle2=($colred-15).','.($colgreen-15).','.($colblue-15); @@ -105,6 +106,7 @@ if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) $conf->global->THEME_ELDY_TOPMENU_BACK1='180,196,216'; // topmenu $conf->global->THEME_ELDY_TOPMENU_BACK2='190,206,226'; $conf->global->THEME_ELDY_VERMENU_BACK1='246,248,250'; // vmenu + $conf->global->THEME_ELDY_VERMENU_BACK1b='226,228,230'; // vmenu (not menu) $conf->global->THEME_ELDY_VERMENU_BACK2='220,224,227'; $conf->global->THEME_ELDY_BACKTITLE1='140,160,185'; // title of arrays $conf->global->THEME_ELDY_BACKTITLE2='210,220,235'; @@ -123,6 +125,7 @@ if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) $colorback1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK1)?$colorback1:$conf->global->THEME_ELDY_TOPMENU_BACK1) :(empty($user->conf->THEME_ELDY_TOPMENU_BACK1)?$colorback1:$user->conf->THEME_ELDY_TOPMENU_BACK1); $colorback2 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK2)?$colorback2:$conf->global->THEME_ELDY_TOPMENU_BACK2) :(empty($user->conf->THEME_ELDY_TOPMENU_BACK2)?$colorback2:$user->conf->THEME_ELDY_TOPMENU_BACK2); $colorbacktab1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_VERMENU_BACK1)?$colorbacktab1:$conf->global->THEME_ELDY_VERMENU_BACK1) :(empty($user->conf->THEME_ELDY_VERMENU_BACK1)?$colorbacktab1:$user->conf->THEME_ELDY_VERMENU_BACK1); +$colorbacktab1b =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_VERMENU_BACK1b)?$colorbacktab1:$conf->global->THEME_ELDY_VERMENU_BACK1b) :(empty($user->conf->THEME_ELDY_VERMENU_BACK1b)?$colorbacktab1b:$user->conf->THEME_ELDY_VERMENU_BACK1b); $colorbacktab2 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_VERMENU_BACK2)?$colorbacktab2:$conf->global->THEME_ELDY_VERMENU_BACK2) :(empty($user->conf->THEME_ELDY_VERMENU_BACK2)?$colorbacktab2:$user->conf->THEME_ELDY_VERMENU_BACK2); $colorbacktitle1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_BACKTITLE1) ?$colorbacktitle1:$conf->global->THEME_ELDY_BACKTITLE1) :(empty($user->conf->THEME_ELDY_BACKTITLE1)?$colorbacktitle1:$user->conf->THEME_ELDY_BACKTITLE1); $colorbacktitle2 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_BACKTITLE2) ?$colorbacktitle2:$conf->global->THEME_ELDY_BACKTITLE2) :(empty($user->conf->THEME_ELDY_BACKTITLE2)?$colorbacktitle2:$user->conf->THEME_ELDY_BACKTITLE2); @@ -154,6 +157,10 @@ print 'colorbacklinepair1='.$colorbacklinepair1."\n"; print 'colorbacklinepair2='.$colorbacklinepair2."\n"; print '*/'."\n"; +$usecss3=true; +if ($conf->browser->name == 'ie' && round($conf->browser->version,2) < 10) $usecss3=false; +elseif ($conf->browser->name == 'iceweasel') $usecss3=false; +elseif ($conf->browser->name == 'epiphany') $usecss3=false; ?> /* ============================================================================== */ @@ -185,7 +192,7 @@ input, input.flat, textarea, textarea.flat, form.flat select, select.flat { font-size: px; font-family: ; background: #FDFDFD; - border: 1px solid #ACBCBB; + border: 1px solid #C0C0C0; padding: 1px 1px 1px 1px; margin: 0px 0px 0px 0px; } @@ -196,6 +203,7 @@ input:disabled { background:#ddd; } input:-webkit-autofill { background-color: #FCFEFA !important; background-image:none !important; } + textarea:disabled { background:#ddd; } @@ -203,7 +211,7 @@ textarea:disabled { font-family: ; background-image: url(); background-position: bottom; - border: 1px solid #ACBCBB; + border: 1px solid #C0C0C0; padding: 0.1em 0.7em; margin: 0em 0.5em; -moz-border-radius:0px 5px 0px 5px; @@ -218,7 +226,7 @@ textarea:disabled { color: #222244; background-image: url(); background-position: bottom; - border: 1px solid #ACBCBB; + border: 1px solid #C0C0C0; } .button:hover { background: #dee7ec; @@ -256,6 +264,9 @@ th .button { -webkit-border-radius:0px !important; border-radius:0px !important; } +.valignmiddle { + vertical-align: middle; +} /* ============================================================================== */ /* Styles to hide objects */ @@ -302,7 +313,7 @@ div.fichethirdleft { browser->phone)) { print "padding-bottom: 6px;\n"; } ?> } div.fichetwothirdright { - browser->phone)) { print "float: ".$left.";\n"; } ?> + browser->phone)) { print "float: ".$right.";\n"; } ?> browser->phone)) { print "width: 65%;\n"; } ?> browser->phone)) { print "padding-bottom: 6px\n"; } ?> } @@ -311,7 +322,7 @@ div.fichehalfleft { browser->phone)) { print "width: 50%;\n"; } ?> } div.fichehalfright { - browser->phone)) { print "float: ".$left.";\n"; } ?> + browser->phone)) { print "float: ".$right.";\n"; } ?> browser->phone)) { print "width: 50%;\n"; } ?> } div.ficheaddleft { @@ -349,16 +360,21 @@ div.tmenu { border-bottom: 1px solid #FFFFFF; padding: 0px 0px 0px 0px; /* t r b l */ margin: 0px 0px 7px 0px; /* t r b l */ + font-size: 13px; font-weight: normal; - height: px; - -/* DYN */ -background-image: linear-gradient(bottom, rgb() 75%, rgb() 100%); -background-image: -o-linear-gradient(bottom, rgb() 75%, rgb() 100%); -background-image: -moz-linear-gradient(bottom, rgb() 75%, rgb() 100%); -background-image: -webkit-linear-gradient(bottom, rgb() 40%, rgb() 60%, rgb() 100%); -background-image: -ms-linear-gradient(bottom, rgb() 75%, rgb() 100%); + height: px; + + background-image: -o-linear-gradient(bottom, rgb() 75%, rgb() 100%); + background-image: -moz-linear-gradient(bottom, rgb() 75%, rgb() 100%); + background-image: -webkit-linear-gradient(bottom, rgb() 40%, rgb() 60%, rgb() 100%); + background-image: -ms-linear-gradient(bottom, rgb() 75%, rgb() 100%); + background-image: linear-gradient(bottom, rgb() 75%, rgb() 100%); + + background-image: url(); + background-position:top; + background-repeat:repeat-x; + color: #000000; text-decoration: none; @@ -391,7 +407,7 @@ a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active { padding: 0px 5px 0px 5px; margin: 0px 1px 2px 1px; white-space: nowrap; - text-shadow: 1px 2px 4px #BFBFBF; + text-shadow: 1px 2px 4px #FFFFFF; } a.tmenu:link, a.tmenu:visited { color: #; @@ -404,11 +420,11 @@ a.tmenu:hover, a.tmenu:active { border-top: 1px solid #D8D8D8; border-bottom: 2px solid #F4F4F4; background: #F4F4F4; - text-shadow: 1px 2px 4px #BFBFBF; + text-shadow: 1px 2px 4px #FFFFFF; } a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active { - font-weight: normal; + font-weight: normal; color: #233030; padding: 0px 5px 0px 5px; margin: 0px 0px 0px 0px; @@ -418,7 +434,7 @@ a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active { border-: 1px solid #D8D8D8; border-bottom: 2px solid #F4F4F4; white-space: nowrap; - text-shadow: 1px 2px 4px #BFBFBF; + text-shadow: 1px 2px 4px #FFFFFF; } @@ -612,10 +628,44 @@ foreach($mainmenuusedarray as $key => $val) /* Login */ +form#login { + margin-top: 70px; + margin-bottom: 30px; + font-size: 13px; +} +.login_table_title { + width: 540px; + color: #888888; + text-shadow: 1px 1px 1px #FFF; +} +.login_table label { + text-shadow: 1px 1px 1px #FFF; +} .login_table { + padding:12px; + width: 540px; + border: 1px solid #C0C0C0; + background-color: #E0E0E0; + -moz-box-shadow: 4px 4px 4px #CCC; -webkit-box-shadow: 4px 4px 4px #CCC; box-shadow: 4px 4px 4px #CCC; + + border-radius: 12px; + border:solid 1px rgba(168,168,168,.4); + border-top:solid 1px f8f8f8; + background-color: #f8f8f8; + background-image: -o-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); + background-image: -moz-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); + background-image: -webkit-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); + background-image: -ms-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); + background-image: linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); +} +#img_securitycode { + border: 1px solid #DDDDDD; +} +#img_logo { + max-width: 200px; } div.login_block { @@ -634,7 +684,7 @@ div.login_block table { div.login { white-space:nowrap; - padding: browser->phone?'0':'8')?>px 0px 0px 0px; + padding: browser->phone?'0':'8')?>px 0px 0px 0px; margin: 0px 0px 0px 8px; font-weight: bold; } @@ -700,13 +750,17 @@ div.blockvmenupair, div.blockvmenuimpair padding-bottom: 3px; margin: 1px 0px 8px 2px; -/* DYN */ -background-image: linear-gradient(bottom, rgb() 85%, rgb() 100%); -background-image: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background-image: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background-image: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background-image: -ms-linear-gradient(bottom, rgb() 85%, rgb() 100%); - + + background-image: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background-image: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background-image: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background-image: -ms-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background-image: linear-gradient(bottom, rgb() 85%, rgb() 100%); + + background-image: url(); + background-position:top; + background-repeat:repeat-x; + border-left: 1px solid #CCCCCC; border-right: 1px solid #BBBBBB; border-bottom: 1px solid #BBBBBB; @@ -729,15 +783,16 @@ div.blockvmenusearch padding-right: 1px; padding-top: 3px; padding-bottom: 3px; - margin: 6px 0px 8px 2px; + margin: 12px 0px 8px 2px; background: #E3E6E8; -/* DYN */ -background-image: linear-gradient(bottom, rgb() 85%, rgb() 100%); -background-image: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background-image: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background-image: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background-image: -ms-linear-gradient(bottom, rgb() 85%, rgb() 100%); + + background-image: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background-image: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background-image: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background-image: -ms-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background-image: linear-gradient(bottom, rgb() 85%, rgb() 100%); + border-left: 1px solid #CCCCCC; border-right: 1px solid #BBBBBB; @@ -765,12 +820,13 @@ div.blockvmenubookmarks margin: 6px 0px 8px 2px; background: #E3E6E8; -/* DYN */ -background-image: linear-gradient(bottom, rgb() 85%, rgb() 100%); -background-image: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background-image: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background-image: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background-image: -ms-linear-gradient(bottom, rgb() 85%, rgb() 100%); + + background-image: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background-image: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background-image: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background-image: -ms-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background-image: linear-gradient(bottom, rgb() 85%, rgb() 100%); + border-left: 1px solid #CCCCCC; border-right: 1px solid #BBBBBB; @@ -847,26 +903,40 @@ td.photo { /* ============================================================================== */ .toolbar { + + background-image: -o-linear-gradient(bottom, rgb() 15%, rgb() 100%) !important; + background-image: -moz-linear-gradient(bottom, rgb() 15%, rgb() 100%) !important; + background-image: -webkit-linear-gradient(bottom, rgb() 15%, rgb() 100%) !important; + background-image: -ms-linear-gradient(bottom, rgb() 15%, rgb() 100%) !important; + background-image: linear-gradient(bottom, rgb() 15%, rgb() 100%) !important; + + background-image: url(theme.'/img/tmenu2.jpg' ?>) !important; + background-repeat: repeat-x !important; + + border: 1px solid #CCC !important; -/* DYN */ -background-image: linear-gradient(bottom, rgb() 15%, rgb() 100%) !important; -background-image: -o-linear-gradient(bottom, rgb() 15%, rgb() 100%) !important; -background-image: -moz-linear-gradient(bottom, rgb() 15%, rgb() 100%) !important; -background-image: -webkit-linear-gradient(bottom, rgb() 15%, rgb() 100%) !important; -background-image: -ms-linear-gradient(bottom, rgb() 15%, rgb() 100%) !important; + -moz-border-radius: 5px 5px 5px 5px !important; + -webkit-border-radius: 5px 5px 5px 5px !important; + border-radius: 5px 5px 5px 5px !important; + -moz-box-shadow: 4px 4px 4px #EEE; + -webkit-box-shadow: 4px 4px 4px #EEE; + box-shadow: 4px 4px 4px #EEE; - border: 1px solid #BBB !important; + padding: 0 4px 0 4px !important; + + height: 34px !important; } -.toolbarbutton { - margin-top: 2px; +a.toolbarbutton { + margin-top: 0px; margin-left: 4px; -/* border: solid 1px #AAAAAA; - width: 34px;*/ - height: 34px; -/* background: #FFFFFF;*/ + margin-right: 4px; + height: 30px; +} +img.toolbarbutton { + margin-top: 1px; + height: 30px; } - /* ============================================================================== */ /* Panes for ECM or Filemanager */ @@ -1039,12 +1109,10 @@ background-image: -ms-linear-gradient(bottom, rgb() 15 } .ecm-layout-resizer { /* all 'resizer-bars' */ - background: #EEEEEE; border: 1px solid #BBB; border-width: 0; } .ecm-layout-resizer-closed { - background-color: #EEEEEE; } .ecm-in-layout-center { @@ -1088,13 +1156,15 @@ div.tabBar { border-left: 1px solid #D0D0D0; border-top: 1px solid #D8D8D8; - /* DYN */ - background-image: linear-gradient(bottom, rgb() 25%, rgb() 100%); + background-image: -o-linear-gradient(bottom, rgb() 25%, rgb() 100%); background-image: -moz-linear-gradient(bottom, rgb() 25%, rgb() 100%); background-image: -webkit-linear-gradient(bottom, rgb() 25%, rgb() 100%); background-image: -ms-linear-gradient(bottom, rgb() 25%, rgb() 100%); - + background-image: linear-gradient(bottom, rgb() 25%, rgb() 100%); + + background: #dee7ec url() repeat-x; + -moz-box-shadow: 4px 4px 4px #CCC; -webkit-box-shadow: 4px 4px 4px #CCC; box-shadow: 4px 4px 4px #CCC; @@ -1132,17 +1202,24 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { border-: 1px solid #D8D8D8; border-top: 1px solid #D8D8D8; - /* DYN */ - background-image: linear-gradient(bottom, rgb() 35%, rgb() 100%); + background-image: -o-linear-gradient(bottom, rgb() 35%, rgb() 100%); background-image: -moz-linear-gradient(bottom, rgb() 35%, rgb() 100%); background-image: -webkit-linear-gradient(bottom, rgb() 35%, rgb() 100%); background-image: -ms-linear-gradient(bottom, rgb() 35%, rgb() 100%); + background-image: linear-gradient(bottom, rgb() 35%, rgb() 100%); + + background: #dee7ec; + } a.tab#active { + border-bottom: 1px solid rgb() !important; background-color: rgb() !important; + + background: #ffffff; + background-image: none !important; } a.tab:link, a.tab:visited, a.tab:hover, a.tab#active @@ -1291,7 +1368,7 @@ table.border { } table.border td { - padding: 1px 2px 1px 1px; + padding: 1px 2px 1px 2px; border: 1px solid #9CACBB; border-collapse: collapse; } @@ -1368,24 +1445,24 @@ table.nobordernopadding td { /* For lists */ table.liste { - width: 100%; - border-collapse: collapse; - border-top-color: #FEFEFE; + width: 100%; + border-collapse: collapse; + border-top-color: #FEFEFE; - border-right-width: 1px; - border-right-color: #BBBBBB; - border-right-style: solid; + border-right-width: 1px; + border-right-color: #BBBBBB; + border-right-style: solid; border-left-width: 1px; border-left-color: #CCCCCC; border-left-style: solid; - border-bottom-width: 1px; - border-bottom-color: #BBBBBB; - border-bottom-style: solid; + border-bottom-width: 1px; + border-bottom-color: #BBBBBB; + border-bottom-style: solid; - margin-bottom: 2px; - margin-top: 0px; + margin-bottom: 2px; + margin-top: 0px; -moz-box-shadow: 4px 4px 4px #CCC; -webkit-box-shadow: 4px 4px 4px #CCC; @@ -1400,13 +1477,16 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel height: 20px !important; background-repeat: repeat-x; - /* DYN */ - background-image: linear-gradient(bottom, rgb() 15%, rgb() 100%); + background-image: -o-linear-gradient(bottom, rgb() 15%, rgb() 100%); background-image: -moz-linear-gradient(bottom, rgb() 15%, rgb() 100%); background-image: -webkit-linear-gradient(bottom, rgb() 15%, rgb() 100%); background-image: -ms-linear-gradient(bottom, rgb() 15%, rgb() 100%); - + background-image: linear-gradient(bottom, rgb() 15%, rgb() 100%); + + background: #7699A9; + background-image: url(); + color: #; font-family: ; font-weight: normal; @@ -1449,13 +1529,15 @@ tr.liste_total td { } .impair { - /* DYN */ + background: linear-gradient(bottom, rgb() 85%, rgb() 100%); background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); background: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%); background: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%); background: -ms-linear-gradient(bottom, rgb() 85%, rgb() 100%); - + + background: #eaeaea; + font-family: ; border: 0px; margin-bottom: 1px; @@ -1469,13 +1551,15 @@ tr.liste_total td { */ .pair { - /* DYN */ + background: linear-gradient(bottom, rgb() 85%, rgb() 100%); background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); background: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%); background: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%); background: -ms-linear-gradient(bottom, rgb() 85%, rgb() 100%); - + + background: #ffffff; + font-family: ; border: 0px; margin-bottom: 1px; @@ -1507,68 +1591,68 @@ div.tabBar .noborder { */ .boxtable { --moz-box-shadow: 4px 4px 4px #CCC; --webkit-box-shadow: 4px 4px 4px #CCC; -box-shadow: 4px 4px 4px #CCC; -margin-bottom: 8px !important; + -moz-box-shadow: 4px 4px 4px #CCC; + -webkit-box-shadow: 4px 4px 4px #CCC; + box-shadow: 4px 4px 4px #CCC; + margin-bottom: 8px !important; } .box { -padding-right: 0px; -padding-left: 0px; -padding-bottom: 4px; + padding-right: 0px; + padding-left: 0px; + padding-bottom: 4px; } tr.box_titre { -height: 20px; -background: #7699A9; + height: 20px; + background: #7699A9; -/* DYN */ -background-image: linear-gradient(bottom, rgb() 15%, rgb() 100%); -background-image: -o-linear-gradient(bottom, rgb() 15%, rgb() 100%); -background-image: -moz-linear-gradient(bottom, rgb() 15%, rgb() 100%); -background-image: -webkit-linear-gradient(bottom, rgb() 15%, rgb() 100%); -background-image: -ms-linear-gradient(bottom, rgb() 15%, rgb() 100%); - -background-repeat: repeat-x; -color: #; -font-family: , sans-serif; -font-weight: normal; -border-bottom: 1px solid #FDFFFF; -white-space: nowrap; + + background-image: -o-linear-gradient(bottom, rgb() 15%, rgb() 100%); + background-image: -moz-linear-gradient(bottom, rgb() 15%, rgb() 100%); + background-image: -webkit-linear-gradient(bottom, rgb() 15%, rgb() 100%); + background-image: -ms-linear-gradient(bottom, rgb() 15%, rgb() 100%); + background-image: linear-gradient(bottom, rgb() 15%, rgb() 100%); + + background-image: url(); + + background-repeat: repeat-x; + color: #; + font-family: , sans-serif; + font-weight: normal; + border-bottom: 1px solid #FDFFFF; + white-space: nowrap; } tr.box_impair { -/* background: #e6ebed; */ -/* background: #f6f6f6; */ - -/* DYN */ -background: linear-gradient(bottom, rgb() 85%, rgb() 100%); -background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background: -ms-linear-gradient(bottom, rgb() 85%, rgb() 100%); - -font-family: ; + + background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background: -ms-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background: linear-gradient(bottom, rgb() 85%, rgb() 100%); + + background: #eaeaea; + + font-family: ; } tr.box_pair { -/* background: #d0d4d7; */ -/* background: #ffffff; */ - -/* DYN */ -background: linear-gradient(bottom, rgb() 85%, rgb() 100%); -background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%); -background: -ms-linear-gradient(bottom, rgb() 85%, rgb() 100%); - -font-family: ; + + background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background: -ms-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background: linear-gradient(bottom, rgb() 85%, rgb() 100%); + + background: #ffffff; + + font-family: ; } tr.fiche { -font-family: ; + font-family: ; } @@ -1751,7 +1835,7 @@ border-radius: 6px; /* Calendar */ /* ============================================================================== */ -img.datecallink { padding-left: 2px !important; padding-right: 2px !important;} +img.datecallink { padding-left: 2px !important; padding-right: 2px !important; } .ui-datepicker-trigger { vertical-align: middle; @@ -1855,9 +1939,9 @@ td.hidden { /* Module agenda */ /* ============================================================================== */ -.cal_other_month { opacity: 0.6; background: #DDDDDD; border: solid 1px #ACBCBB; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } -.cal_past_month { opacity: 0.6; background: #EEEEEE; border: solid 1px #ACBCBB; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } -.cal_current_month { background: #FFFFFF; border: solid 1px #ACBCBB; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } +.cal_other_month { opacity: 0.6; background: #DDDDDD; border: solid 1px #C0C0C0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } +.cal_past_month { opacity: 0.6; background: #EEEEEE; border: solid 1px #C0C0C0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } +.cal_current_month { background: #FFFFFF; border: solid 1px #C0C0C0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_today { background: #FFFFFF; border: solid 2px #6C7C7B; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past { } table.cal_event { border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 6px; border-radius: 6px; } @@ -1933,7 +2017,7 @@ table.cal_event td { border: 0px; padding-: 0px; padding- !important; background-image: url() !important; background-position: bottom !important; - border: 1px solid #ACBCBB !important; + border: 1px solid #C0C0C0 !important; padding: 0.1em 0.7em !important; margin: 0em 0.5em !important; -moz-border-radius:0px 5px 0px 5px !important; @@ -2287,109 +2371,78 @@ ui-layout-north { } -ul.jqueryFileTree { - font-family: Verdana, sans-serif; +ul.ecmjqft { font-size: 11px; - line-height: 18px; + line-height: 16px; padding: 0px; margin: 0px; font-weight: normal; } -ul.jqueryFileTree li { +ul.ecmjqft li { list-style: none; padding: 0px; padding-left: 20px; margin: 0px; white-space: nowrap; + display: block; } -ul.jqueryFileTree a { - display: float; +ul.ecmjqft a { + line-height: 16px; + vertical-align: middle; + color: #333; padding: 0px 0px; font-weight:normal; + display: inline-block !important; +/* float: left;*/ } -ul.jqueryFileTree a:active { +ul.ecmjqft a:active { font-weight: bold !important; } - -ul.jqueryFileTree a:hover { +ul.ecmjqft a:hover { text-decoration: underline; } +div.ecmjqft { + vertical-align: middle; + display: inline-block !important; + text-align: right; + position:absolute; + right:4px; +} /* Core Styles */ -.jqueryFileTree LI.directory { font-weight:normal; background: url() left top no-repeat; } -.jqueryFileTree LI.expanded { font-weight:normal; background: url() left top no-repeat; } -.jqueryFileTree LI.file { font-weight:normal; background: url() left top no-repeat; } -.jqueryFileTree LI.wait { font-weight:normal; background: url() left top no-repeat; } -/* File Extensions*/ -.jqueryFileTree LI.ext_3gp { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_afp { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_afpa { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_asp { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_aspx { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_avi { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_bat { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_bmp { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_c { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_cfm { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_cgi { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_com { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_cpp { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_css { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_doc { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_exe { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_gif { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_fla { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_h { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_htm { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_html { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_jar { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_jpg { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_jpeg { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_js { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_lasso { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_log { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_m4p { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_mov { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_mp3 { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_mp4 { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_mpg { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_mpeg { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_ogg { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_ogv { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_pcx { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_pdf { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_php { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_png { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_ppt { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_psd { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_pl { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_py { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_rb { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_rbx { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_rhtml { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_rpm { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_ruby { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_sql { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_swf { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_tif { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_tiff { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_txt { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_vb { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_wav { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_webm { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_wmv { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_xls { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_xml { background: url() left top no-repeat; } -.jqueryFileTree LI.ext_zip { background: url() left top no-repeat; } +.ecmjqft LI.directory { font-weight:normal; background: url() left top no-repeat; } +.ecmjqft LI.expanded { font-weight:normal; background: url() left top no-repeat; } +.ecmjqft LI.wait { font-weight:normal; background: url() left top no-repeat; } -/* Right panel */ -.fmvalue { - color: #001166; +/* ============================================================================== */ +/* jNotify */ +/* ============================================================================== */ + +.jnotify-container { + position: fixed !important; +global->MAIN_JQUERY_JNOTIFY_BOTTOM) { ?> + top: auto !important; + bottom: 4px !important; + + text-align: center; + min-width: 500px; + width: auto; + padding-left: 10px !important; + padding-right: 10px !important; } +/* ============================================================================== */ +/* Maps */ +/* ============================================================================== */ + +.divmap, #google-visualization-geomap-embed-0, #google-visualization-geomap-embed-1, google-visualization-geomap-embed-2 { + -moz-box-shadow: 0px 0px 10px #AAA; + -webkit-box-shadow: 0px 0px 10px #AAA; + box-shadow: 0px 0px 10px #AAA; +} all_permissions_are_loaded = 0; $this->admin=0; + + $this->rights = (object) array(); + $this->rights->user = (object) array(); + $this->rights->user->user = (object) array(); + $this->rights->user->self = (object) array(); } /** @@ -501,7 +506,7 @@ class User extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."user_rights as ur"; $sql.= ", ".MAIN_DB_PREFIX."rights_def as r"; $sql.= " WHERE r.id = ur.fk_id"; - $sql.= " AND r.entity in (0,".(!empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")"; + $sql.= " AND r.entity IN (0,".(!empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")"; $sql.= " AND ur.fk_user= ".$this->id; $sql.= " AND r.perms IS NOT NULL"; if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'"; @@ -522,14 +527,12 @@ class User extends CommonObject if ($perms) { + if (! is_object($this->rights)) $this->rights = (object) array(); // For avoid error + if (! is_object($this->rights->$module)) $this->rights->$module = (object) array(); if ($subperms) { - if (! isset($this->rights->$module) || - (is_object($this->rights->$module) && ! isset($this->rights->$module->$perms)) || - (is_object($this->rights->$module->$perms)) ) - { - $this->rights->$module->$perms->$subperms = 1; - } + if (! is_object($this->rights->$module->$perms)) $this->rights->$module->$perms = (object) array(); + $this->rights->$module->$perms->$subperms = 1; } else { @@ -585,6 +588,12 @@ class User extends CommonObject } $this->db->free($resql); } + + // For backward compatibility + if (isset($this->rights->propale)) + { + $this->rights->propal = $this->rights->propale; + } if (! $moduletag) { @@ -1272,7 +1281,6 @@ class User extends CommonObject $sql.= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::setPassword sql=hidden", LOG_DEBUG); - //dol_syslog("User::Password sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -1423,20 +1431,20 @@ class User extends CommonObject $url = $urlwithouturlroot.DOL_URL_ROOT.'/user/passwordforgotten.php?action=validatenewpassword&username='.$this->login."&passwordmd5=".dol_hash($password); $mesg.= $url."\n\n"; $mesg.= "If you didn't ask anything, just forget this email\n\n"; - dol_syslog("User::send_password url=".$url); + dol_syslog(get_class($this)."::send_password url=".$url); } - $mailfile = new CMailFile( - $subject, - $this->email, - $conf->notification->email_from, - $mesg, - array(), - array(), - array(), - '', - '', - 0, - $msgishtml + $mailfile = new CMailFile( + $subject, + $this->email, + $conf->notification->email_from, + $mesg, + array(), + array(), + array(), + '', + '', + 0, + $msgishtml ); if ($mailfile->sendfile()) diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index bac58616bce..2193bb9c567 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -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 diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 2becad4f564..2ed1576328f 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -70,8 +70,6 @@ if ($action == 'validatenewpassword' && $username && $passwordmd5) { $newpassword=$edituser->setPassword($user,$edituser->pass_temp,0); dol_syslog("passwordforgotten.php new password for user->id=".$edituser->id." validated in database"); - //session_start(); - //$_SESSION["loginmesg"]=$langs->trans("PasswordChanged"); header("Location: ".DOL_URL_ROOT.'/'); exit; } diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 9445299a2d8..148202b4f98 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2012 Laurent Destailleur - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 @@ -48,10 +48,11 @@ require("./main.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'); -$action = GETPOST("action"); -$original_file = GETPOST("file"); -$modulepart = GETPOST("modulepart"); -$urlsource = GETPOST("urlsource"); +$action=GETPOST('action','alpha'); +$original_file=GETPOST("file"); +$modulepart=GETPOST('modulepart','alpha'); +$urlsource=GETPOST("urlsource"); +$entity=GETPOST('entity','int'); // Security check @@ -121,7 +122,7 @@ if ($modulepart) elseif ($modulepart == 'societe') { $accessallowed=1; - $original_file=$conf->societe->dir_output.'/'.$original_file; + $original_file=$conf->societe->multidir_output[$entity].'/'.$original_file; } // Wrapping pour les apercu factures elseif ($modulepart == 'apercufacture') @@ -197,13 +198,13 @@ if ($modulepart) elseif (preg_match('/^productstats_/i',$modulepart)) { if ($user->rights->produit->lire || $user->rights->service->lire) $accessallowed=1; - $original_file=(!empty($conf->product->dir_temp)?$conf->product->dir_temp:$conf->service->dir_temp).'/'.$original_file; + $original_file=(!empty($conf->product->multidir_temp[$entity])?$conf->product->multidir_temp[$entity]:$conf->service->multidir_temp[$entity]).'/'.$original_file; } // Wrapping for products or services elseif ($modulepart == 'product') { if ($user->rights->produit->lire || $user->rights->service->lire) $accessallowed=1; - $original_file=(!empty($conf->product->dir_output)?$conf->product->dir_output:$conf->service->dir_output).'/'.$original_file; + $original_file=(! empty($conf->product->multidir_output[$entity])?$conf->product->multidir_output[$entity]:$conf->service->multidir_output[$entity]).'/'.$original_file; } // Wrapping for products or services elseif ($modulepart == 'tax') @@ -215,7 +216,7 @@ if ($modulepart) elseif ($modulepart == 'category') { if ($user->rights->categorie->lire) $accessallowed=1; - $original_file=$conf->categorie->dir_output.'/'.$original_file; + $original_file=$conf->categorie->multidir_output[$entity].'/'.$original_file; } // Wrapping pour les prelevements elseif ($modulepart == 'prelevement') @@ -239,7 +240,7 @@ if ($modulepart) elseif ($modulepart == 'graph_product') { $accessallowed=1; - $original_file=$conf->product->dir_temp.'/'.$original_file; + $original_file=$conf->product->multidir_temp[$entity].'/'.$original_file; } // Wrapping pour les code barre elseif ($modulepart == 'barcode') diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index e17d4102a3d..6b5c6dee643 100755 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -83,10 +83,10 @@ $server->wsdl->addComplexType( // Define other specific objects $server->wsdl->addComplexType( 'product', - 'complexType', - 'struct', - 'all', - '', + 'complexType', + 'struct', + 'all', + '', array( 'id' => array('name'=>'id','type'=>'xsd:string'), 'ref' => array('name'=>'ref','type'=>'xsd:string'), @@ -120,10 +120,10 @@ $server->wsdl->addComplexType( // Define other specific objects $server->wsdl->addComplexType( 'filterproduct', - 'complexType', - 'struct', - 'all', - '', + 'complexType', + 'struct', + 'all', + '', array( // 'limit' => array('name'=>'limit','type'=>'xsd:string'), 'type' => array('name'=>'type','type'=>'xsd:string'), diff --git a/quickbuild.xml b/quickbuild.xml index 7378a201028..62c9f23dfd4 100644 --- a/quickbuild.xml +++ b/quickbuild.xml @@ -3,7 +3,7 @@ - + @@ -44,7 +44,7 @@ --exclude '${basedir}/htdocs/conf' --exclude '${basedir}/htdocs/core/filemanagerdol' --exclude '${basedir}/htdocs/includes' - --exclude '**/PEAR/*,**/NET/*,**/HTTP/*' + --exclude '**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*' --min-tokens 70 --min-lines 20 htdocs @@ -59,7 +59,7 @@ --exclude '${basedir}/htdocs/conf' --exclude '${basedir}/htdocs/core/filemanagerdol' --exclude '${basedir}/htdocs/includes' - --exclude '**/PEAR/*,**/NET/*,**/HTTP/*' + --exclude '**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*' htdocs " /> diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php index f3923ed0567..98b4439ad5c 100644 --- a/scripts/emailings/mailing-send.php +++ b/scripts/emailings/mailing-send.php @@ -106,8 +106,11 @@ if ($resql) { dol_syslog("nb of targets = ".$num, LOG_DEBUG); + $now=dol_now(); + // Positionne date debut envoi - $sql="UPDATE ".MAIN_DB_PREFIX."mailing SET date_envoi=SYSDATE() WHERE rowid=".$id; + $sql="UPDATE ".MAIN_DB_PREFIX."mailing SET date_envoi='".$db->idate($now)."' WHERE rowid=".$id; + $resql2=$db->query($sql); if (! $resql2) { @@ -119,6 +122,7 @@ if ($resql) while ($i < $num) { $res=1; + $now=dol_now(); $obj = $db->fetch_object($resql); @@ -135,8 +139,9 @@ if ($resql) $substitutionarray=array( '__ID__' => $obj->source_id, '__EMAIL__' => $obj->email, - '__CHECK_READ__' => '', - '__UNSUSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'', + '__CHECK_READ__' => '', + '__UNSUSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'', + '__MAILTOEMAIL__' => ''.$obj->email.'', '__LASTNAME__' => $obj->lastname, '__FIRSTNAME__' => $obj->firstname, '__OTHER1__' => $other1, @@ -192,12 +197,37 @@ if ($resql) dol_syslog("ok for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG); $sql="UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; - $sql.=" SET statut=1, date_envoi=".$db->idate(gmmktime())." WHERE rowid=".$obj->rowid; + $sql.=" SET statut=1, date_envoi=".$db->idate($now)." WHERE rowid=".$obj->rowid; $resql2=$db->query($sql); if (! $resql2) { dol_print_error($db); } + else + { + //if cheack read is use then update prospect contact status + if (strpos($message, '__CHECK_READ__') !== false) + { + //Update status communication of thirdparty prospect + $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE rowid=".$obj->rowid.")"; + dol_syslog("fiche.php: set prospect thirdparty status sql=".$sql, LOG_DEBUG); + $resql2=$db->query($sql); + if (! $resql2) + { + dol_print_error($db); + } + + //Update status communication of contact prospect + $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.rowid=".$obj->rowid." AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)"; + dol_syslog("fiche.php: set prospect contact status sql=".$sql, LOG_DEBUG); + + $resql2=$db->query($sql); + if (! $resql2) + { + dol_print_error($db); + } + } + } } else { @@ -207,7 +237,7 @@ if ($resql) dol_syslog("error for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG); $sql="UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; - $sql.=" SET statut=-1, date_envoi=".$db->idate(gmmktime())." WHERE rowid=".$obj->rowid; + $sql.=" SET statut=-1, date_envoi=".$db->idate($now)." WHERE rowid=".$obj->rowid; $resql2=$db->query($sql); if (! $resql2) { diff --git a/test/phpunit/AllTests.php b/test/phpunit/AllTests.php index 7bb39e25bdc..41073db30cc 100644 --- a/test/phpunit/AllTests.php +++ b/test/phpunit/AllTests.php @@ -68,8 +68,12 @@ class AllTests $suite->addTestSuite('DateLibTest'); require_once dirname(__FILE__).'/FilesLibTest.php'; $suite->addTestSuite('FilesLibTest'); + require_once dirname(__FILE__).'/ImagesLibTest.php'; + $suite->addTestSuite('ImagesLibTest'); require_once dirname(__FILE__).'/FunctionsTest.php'; $suite->addTestSuite('FunctionsTest'); + require_once dirname(__FILE__).'/_NumberingModulesTest.php'; + $suite->addTestSuite('NumberingModulesTest'); require_once dirname(__FILE__).'/PdfDocTest.php'; $suite->addTestSuite('PdfDocTest'); diff --git a/test/phpunit/CommandeFournisseurTest.php b/test/phpunit/CommandeFournisseurTest.php index 1cc9e6f6678..eb5e2028ada 100644 --- a/test/phpunit/CommandeFournisseurTest.php +++ b/test/phpunit/CommandeFournisseurTest.php @@ -117,7 +117,7 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase /** * testCommandeFournisseurCreate - * + * * @return void */ public function testCommandeFournisseurCreate() @@ -139,10 +139,10 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase /** * testCommandeFournisseurFetch - * + * * @param int $id Id of supplier order * @return void - * + * * @depends testCommandeFournisseurCreate * The depends says test is run only if previous is ok */ @@ -161,13 +161,13 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase $this->assertLessThan($result, 0); return $localobject; } - + /** * testCommandeFournisseurValid - * + * * @param Object $localobject Supplier order * @return void - * + * * @depends testCommandeFournisseurFetch * The depends says test is run only if previous is ok */ @@ -186,12 +186,36 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase return $localobject; } + /** + * testCommandeFournisseurApprove + * + * @param Object $localobject Supplier order + * @return void + * + * @depends testCommandeFournisseurValid + * The depends says test is run only if previous is ok + */ + public function testCommandeFournisseurApprove($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $result=$localobject->approve($user); + + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } + /** * testCommandeFournisseurCancel - * + * * @param Object $localobject Supplier order * @return void - * + * * @depends testCommandeFournisseurValid * The depends says test is run only if previous is ok */ @@ -212,10 +236,10 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase /** * testCommandeFournisseurOther - * + * * @param Object $localobject Supplier order * @return void - * + * * @depends testCommandeFournisseurCancel * The depends says test is run only if previous is ok */ @@ -242,10 +266,10 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase /** * testCommandeFournisseurDelete - * + * * @param int $id Id of order * @return void - * + * * @depends testCommandeFournisseurOther * The depends says test is run only if previous is ok */ diff --git a/test/phpunit/CoreTest.php b/test/phpunit/CoreTest.php index 7ca6b78856b..24101beedbe 100755 --- a/test/phpunit/CoreTest.php +++ b/test/phpunit/CoreTest.php @@ -26,6 +26,7 @@ global $conf,$user,$langs,$db; //define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver require_once 'PHPUnit/Autoload.php'; +require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); diff --git a/test/phpunit/FunctionsTest.php b/test/phpunit/FunctionsTest.php index 70711a969b2..2a81b2e6d4e 100755 --- a/test/phpunit/FunctionsTest.php +++ b/test/phpunit/FunctionsTest.php @@ -1,20 +1,20 @@ * -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * or see http://www.gnu.org/ -*/ + */ /** * \file test/phpunit/FunctionsTest.php @@ -28,6 +28,7 @@ global $conf,$user,$langs,$db; require_once 'PHPUnit/Autoload.php'; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php'; +require_once dirname(__FILE__).'/../../htdocs/core/lib/json.lib.php'; if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); @@ -363,5 +364,35 @@ class FunctionsTest extends PHPUnit_Framework_TestCase $this->assertTrue($verifcond); } + /** + * testJsonencode + * + * @return void + */ + public function testJsonEncode() + { + //$this->sharedFixture + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; + + $arraytotest=array(0=>array('key'=>1,'value'=>'PRODREF','label'=>'Product ref with é and special chars \\ \' "')); + + $encoded=json_encode($arraytotest); + //var_dump($encoded); + $this->assertEquals('[{"key":1,"value":"PRODREF","label":"Product ref with \u00e9 and special chars \\\\ \' \""}]',$encoded); + $decoded=json_decode($encoded,true); + //var_dump($decoded); + $this->assertEquals($arraytotest,$decoded); + + $encoded=dol_json_encode($arraytotest); + //var_dump($encoded); + $this->assertEquals('[{"key":1,"value":"PRODREF","label":"Product ref with \u00e9 and special chars \\\\ \' \""}]',$encoded); + $decoded=dol_json_decode($encoded,true); + //var_dump($decoded); + $this->assertEquals($arraytotest,$decoded); + } } ?> \ No newline at end of file diff --git a/test/phpunit/ImagesLibTest.php b/test/phpunit/ImagesLibTest.php new file mode 100644 index 00000000000..d1e25797e0d --- /dev/null +++ b/test/phpunit/ImagesLibTest.php @@ -0,0 +1,146 @@ + + * Copyright (C) 2012 Regis Houssin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * or see http://www.gnu.org/ + */ + +/** + * \file test/phpunit/ImagesLibTest.php + * \ingroup test + * \brief PHPUnit test + * \remarks To run this script as CLI: phpunit filename.php + */ + +global $conf,$user,$langs,$db; +//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver +require_once 'PHPUnit/Autoload.php'; +require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; +require_once dirname(__FILE__).'/../../htdocs/core/lib/images.lib.php'; + +if (empty($user->id)) +{ + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); +} +$conf->global->MAIN_DISABLE_ALL_MAILS=1; + + +/** + * Class for PHPUnit tests + * + * @backupGlobals disabled + * @backupStaticAttributes enabled + * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. + */ +class ImagesLibTest extends PHPUnit_Framework_TestCase +{ + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; + + /** + * Constructor + * We save global variables into local variables + * + * @return ImagesLibTest + */ + function ImagesLibTest() + { + //$this->sharedFixture + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; + + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } + + // Static methods + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + + print __METHOD__."\n"; + } + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); + + print __METHOD__."\n"; + } + + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } + + /** + * testDolCountNbOfLine + * + * @return int + */ + public function testgetImageSize() + { + $file=dirname(__FILE__).'/img250x50.jpg'; + $tmp=dol_getImageSize($file); + print __METHOD__." result=".$tmp['width'].'/'.$tmp['height']."\n"; + $this->assertEquals($tmp['width'],250); + $this->assertEquals($tmp['height'],50); + + $file=dirname(__FILE__).'/img250x20.png'; + $tmp=dol_getImageSize($file); + print __METHOD__." result=".$tmp['width'].'/'.$tmp['height']."\n"; + $this->assertEquals($tmp['width'],250); + $this->assertEquals($tmp['height'],20); + + /*$file=dirname(__FILE__).'/filenotfound.png'; + $tmp=dol_getImageSize($file); + print __METHOD__." result=".$tmp['width'].'/'.$tmp['height']."\n"; + $this->assertEquals($tmp['width'],250); + $this->assertEquals($tmp['height'],20);*/ + + return $result; + } + +} +?> \ No newline at end of file diff --git a/test/phpunit/ImportTest.php b/test/phpunit/ImportTest.php index aa31e015b9d..913b9bd4b33 100755 --- a/test/phpunit/ImportTest.php +++ b/test/phpunit/ImportTest.php @@ -125,6 +125,7 @@ class ImportTest extends PHPUnit_Framework_TestCase { $file=dirname(__FILE__).'/Example_import_company_1.csv'; + //if (! preg_match('/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$/i','2012-03-23')) print 'eeeeeeeeeeee'; return true; } diff --git a/test/phpunit/PdfDocTest.php b/test/phpunit/PdfDocTest.php index 7d5b931c0b1..8f092b1a6ba 100755 --- a/test/phpunit/PdfDocTest.php +++ b/test/phpunit/PdfDocTest.php @@ -145,5 +145,21 @@ class PdfDocTest extends PHPUnit_Framework_TestCase $this->assertEquals($result,"PIDRESS - Label 1\nThis is a description with a é accent\n(Country of origin: France)"); } + /** + * testPdfGetHeightForLogo + * + * @return void + */ + public function testPdfGetHeightForLogo() + { + $file=dirname(__FILE__).'/img250x50.jpg'; + $result=pdf_getHeightForLogo($file); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result,22); + $file=dirname(__FILE__).'/img250x20.png'; + $result=pdf_getHeightForLogo($file); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result,10.4); + } } ?> \ No newline at end of file diff --git a/test/phpunit/_NumberingModulesTest.php b/test/phpunit/_NumberingModulesTest.php new file mode 100644 index 00000000000..430986a9ef6 --- /dev/null +++ b/test/phpunit/_NumberingModulesTest.php @@ -0,0 +1,156 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * or see http://www.gnu.org/ + */ + +/** + * \file test/phpunit/_NumberingModulesTest.php + * \ingroup test + * \brief PHPUnit test + * \remarks To run this script as CLI: phpunit filename.php + */ + +global $conf,$user,$langs,$db; +//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver +require_once 'PHPUnit/Autoload.php'; +require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; + +if (empty($user->id)) +{ + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); +} +$conf->global->MAIN_DISABLE_ALL_MAILS=1; + + +/** + * Class for PHPUnit tests + * + * @backupGlobals disabled + * @backupStaticAttributes enabled + * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. + */ +class NumberingModulesTest extends PHPUnit_Framework_TestCase +{ + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; + + /** + * Constructor + * We save global variables into local variables + * + * @return NumberingModulesTest + */ + function NumberingModulesTest() + { + //$this->sharedFixture + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; + + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } + + // Static methods + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + + print __METHOD__."\n"; + } + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); + + print __METHOD__."\n"; + } + + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + print __METHOD__."\n"; + } + + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } + + /** + * testFactureCreate + * + * @return int + */ + public function testFactureMercure() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php'; + require_once dirname(__FILE__).'/../../htdocs/core/modules/facture/mod_facture_mercure.php'; + + //$conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@3}'; + //$conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000@3}'; + $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}-{0000@1}'; + $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}-{0000@1}'; + + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(0, 0, 0, 1, 1, 2012); + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + print __METHOD__." result=".$result."\n"; + + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(0, 0, 0, 1, 1, 2011); + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + print __METHOD__." result=".$result."\n"; + + $this->assertLessThan($result, 0); + return $result; + } + +} +?> \ No newline at end of file diff --git a/test/phpunit/img250x20.png b/test/phpunit/img250x20.png new file mode 100644 index 00000000000..fb8226bd8c2 Binary files /dev/null and b/test/phpunit/img250x20.png differ diff --git a/test/phpunit/img250x50.jpg b/test/phpunit/img250x50.jpg new file mode 100644 index 00000000000..c69ab2634d8 Binary files /dev/null and b/test/phpunit/img250x50.jpg differ diff --git a/test/soapui/Dolibarr-soapui-project.xml b/test/soapui/Dolibarr-soapui-project.xml index b8cff16c05a..85404fdeed8 100755 --- a/test/soapui/Dolibarr-soapui-project.xml +++ b/test/soapui/Dolibarr-soapui-project.xml @@ -1,5 +1,5 @@ -http://localhost/dolibarrnew/webservices/server_other.php?wsdl +http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl @@ -52,7 +52,7 @@ - + ]]>http://schemas.xmlsoap.org/wsdl/http://localhostdolibarr/dolibarrnew/webservices/server_other.php<xml-fragment/>UTF-8http://localhostdolibarr/dolibarrnew/webservices/server_other.php @@ -69,7 +69,7 @@ -]]>http://localhost/dolibarrnew/webservices/server_invoice.php?wsdl +]]>http://localhostdolibarr/dolibarrnew/webservices/server_invoice.php?wsdl @@ -83,6 +83,12 @@ + + + + + + @@ -151,12 +157,6 @@ - - - - - - @@ -235,7 +235,7 @@ - + ]]>http://schemas.xmlsoap.org/wsdl/http://localhostdolibarr/dolibarrnew/webservices/server_invoice.php<xml-fragment/>UTF-8http://localhostdolibarr/dolibarrnew/webservices/server_invoice.php @@ -395,6 +395,12 @@ + + + + + + @@ -460,12 +466,6 @@ - - - - - - @@ -533,7 +533,7 @@ dolibarrkey aaa admin - admin + changeme 1 @@ -587,15 +587,14 @@ - - + + - @@ -605,16 +604,27 @@ + + + + + + + + + + + + + + + + + + + - - - - - - - - @@ -625,20 +635,50 @@ + + + + + + + + + + + + + + + + - - WS to create a product or service - - - WS to get product or service + + WS to create a product or service + + + + + WS to get list of all products or services id and ref + + + + + + + + + + + + @@ -648,8 +688,8 @@ - - + + @@ -708,7 +748,27 @@ -]]>http://localhostdolibarr/webservices/server_user.php?wsdl +]]>UTF-8http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php + + + + + + ? + ? + ? + ? + ? + + + + ? + ? + ? + + + +]]>http://localhostdolibarr/webservices/server_user.php?wsdl