Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
10885f0cf2
@ -1,6 +1,6 @@
|
|||||||
Alias /dolibarr "WAMPROOT/www/dolibarr/htdocs/"
|
Alias /dolibarr "WAMPROOT/www/dolibarr/htdocs/"
|
||||||
|
|
||||||
# NOTE:
|
# NOTE FOR APACHE 2.2:
|
||||||
# To restrict access to dolibarr from outside set lines
|
# To restrict access to dolibarr from outside set lines
|
||||||
#
|
#
|
||||||
# Order Deny,Allow
|
# Order Deny,Allow
|
||||||
@ -12,10 +12,21 @@ Alias /dolibarr "WAMPROOT/www/dolibarr/htdocs/"
|
|||||||
# Order Allow,Deny
|
# Order Allow,Deny
|
||||||
# Allow from all
|
# Allow from all
|
||||||
#
|
#
|
||||||
|
# NOTE FOR APACHE 2.3:
|
||||||
|
# To restrict access to dolibarr from outside set lines
|
||||||
|
#
|
||||||
|
# <RequireAny>
|
||||||
|
# Require ip 127.0.0.1
|
||||||
|
# Require host localhost
|
||||||
|
# <RequireAny>
|
||||||
|
#
|
||||||
|
# instead of
|
||||||
|
#
|
||||||
|
# Require all granted
|
||||||
|
#
|
||||||
|
|
||||||
<Directory "WAMPROOT/www/dolibarr/htdocs/">
|
<Directory "WAMPROOT/www/dolibarr/htdocs/">
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
AllowOverride all
|
AllowOverride all
|
||||||
Order Allow,Deny
|
Require all granted
|
||||||
Allow from all
|
|
||||||
</Directory>
|
</Directory>
|
||||||
@ -101,7 +101,7 @@ Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversi
|
|||||||
; Put here path of Wampserver applications
|
; Put here path of Wampserver applications
|
||||||
; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45 or 5.1.36
|
; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45 or 5.1.36
|
||||||
; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45 or 5.1.36
|
; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45 or 5.1.36
|
||||||
; Value ???: apache 2.4.19, php 5.5.12, mysql 5.6.17
|
; Value ???: apache 2.4.19, php 5.5.12, mysql 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe)
|
||||||
Source: "C:\Program Files\Wamp\apps\phpmyadmin4.1.14\*.*"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange"
|
Source: "C:\Program Files\Wamp\apps\phpmyadmin4.1.14\*.*"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange"
|
||||||
Source: "C:\Program Files\Wamp\bin\apache\apache2.4.9\*.*"; DestDir: "{app}\bin\apache\apache2.4.9"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
|
Source: "C:\Program Files\Wamp\bin\apache\apache2.4.9\*.*"; DestDir: "{app}\bin\apache\apache2.4.9"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
|
||||||
Source: "C:\Program Files\Wamp\bin\php\php5.5.12\*.*"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
|
Source: "C:\Program Files\Wamp\bin\php\php5.5.12\*.*"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
|
||||||
@ -119,8 +119,8 @@ Source: "build\exe\doliwamp\phpmyadmin.conf.install"; DestDir: "{app}\alias"; Fl
|
|||||||
Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\config.inc.php.install"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\config.inc.php.install"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.9\conf"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.9\conf"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.5.12"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.6.17"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php5.6.17"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\openssl.conf"; DestDir: "{app}"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\openssl.conf"; DestDir: "{app}"; Flags: ignoreversion;
|
||||||
@ -338,11 +338,11 @@ begin
|
|||||||
// Test if VC11Redist has been installed
|
// Test if VC11Redist has been installed
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
|
|
||||||
if not FileExists ('c:/windows/system32/msvcr70.dll') and not FileExists ('c:/windows/sysWOW64/msvcr70.dll') and not FileExists ('c:/winnt/system32/msvcr70.dll') and not FileExists ('c:/winnt/sysWOW64/msvcr70.dll') then
|
if not FileExists ('c:/windows/system32/msvcr110.dll') and not FileExists ('c:/windows/sysWOW64/msvcr110.dll') and not FileExists ('c:/winnt/system32/msvcr110.dll') and not FileExists ('c:/winnt/sysWOW64/msvcr110.dll') then
|
||||||
begin
|
begin
|
||||||
// TODO Copy file or ask to install package ?
|
// TODO Copy file or ask to install package ?
|
||||||
//CustomMessage('YouWillInstallDoliWamp')+#13#13
|
//CustomMessage('YouWillInstallDoliWamp')+#13#13
|
||||||
MsgBox('The package vcredist_x64.exe or vcredist_86.exe must have been installed first. It seems it is not. Please install it first from <a href="http://ccc">http://www.microsoft.com/en-us/download/details.aspx?id=30679</a> then restart DoliWamp installation/upgrade.',mbInformation,MB_OK);
|
MsgBox('The package vcredist_x86.exe must have been installed first. It seems it is not. Please install it first from <a href="http://ccc">http://www.microsoft.com/en-us/download/details.aspx?id=30679</a> then restart DoliWamp installation/upgrade.',mbInformation,MB_OK);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -675,7 +675,7 @@ begin
|
|||||||
//installDir et version de php
|
//installDir et version de php
|
||||||
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
|
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', myport, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end
|
||||||
@ -749,6 +749,7 @@ begin
|
|||||||
LoadStringFromFile (srcFile, srcContents);
|
LoadStringFromFile (srcFile, srcContents);
|
||||||
|
|
||||||
//version de apache et mysql
|
//version de apache et mysql
|
||||||
|
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
||||||
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
||||||
|
|
||||||
@ -757,27 +758,6 @@ begin
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------
|
|
||||||
// Create file install_services_auto.bat (always)
|
|
||||||
//----------------------------------------------
|
|
||||||
|
|
||||||
destFile := pathWithSlashes+'/install_services_auto.bat';
|
|
||||||
srcFile := pathWithSlashes+'/install_services_auto.bat.install';
|
|
||||||
|
|
||||||
if FileExists (srcFile) then
|
|
||||||
begin
|
|
||||||
LoadStringFromFile (srcFile, srcContents);
|
|
||||||
|
|
||||||
//version de apache et mysql
|
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
|
||||||
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
// Create file uninstall_services.bat (always)
|
// Create file uninstall_services.bat (always)
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
@ -790,6 +770,7 @@ begin
|
|||||||
LoadStringFromFile (srcFile, srcContents);
|
LoadStringFromFile (srcFile, srcContents);
|
||||||
|
|
||||||
//version de apache et mysql
|
//version de apache et mysql
|
||||||
|
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
||||||
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
||||||
|
|
||||||
@ -978,7 +959,6 @@ end;
|
|||||||
procedure DeinitializeSetup();
|
procedure DeinitializeSetup();
|
||||||
begin
|
begin
|
||||||
// DeleteFile(path+'\install_services.bat');
|
// DeleteFile(path+'\install_services.bat');
|
||||||
// DeleteFile(path+'\install_services_auto.bat');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -66,19 +66,23 @@ Listen WAMPAPACHEPORT
|
|||||||
#
|
#
|
||||||
LoadModule actions_module modules/mod_actions.so
|
LoadModule actions_module modules/mod_actions.so
|
||||||
LoadModule alias_module modules/mod_alias.so
|
LoadModule alias_module modules/mod_alias.so
|
||||||
|
LoadModule allowmethods_module modules/mod_allowmethods.so
|
||||||
LoadModule asis_module modules/mod_asis.so
|
LoadModule asis_module modules/mod_asis.so
|
||||||
LoadModule auth_basic_module modules/mod_auth_basic.so
|
LoadModule auth_basic_module modules/mod_auth_basic.so
|
||||||
#LoadModule auth_digest_module modules/mod_auth_digest.so
|
#LoadModule auth_digest_module modules/mod_auth_digest.so
|
||||||
#LoadModule authn_anon_module modules/mod_authn_anon.so
|
#LoadModule authn_anon_module modules/mod_authn_anon.so
|
||||||
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
|
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
|
||||||
LoadModule authn_default_module modules/mod_authn_default.so
|
|
||||||
LoadModule authn_file_module modules/mod_authn_file.so
|
LoadModule authn_file_module modules/mod_authn_file.so
|
||||||
|
LoadModule authz_core_module modules/mod_authz_core.so
|
||||||
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
|
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
|
||||||
LoadModule authz_default_module modules/mod_authz_default.so
|
#LoadModule authz_default_module modules/mod_authz_default.so
|
||||||
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
|
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
|
||||||
LoadModule authz_host_module modules/mod_authz_host.so
|
LoadModule authz_host_module modules/mod_authz_host.so
|
||||||
LoadModule authz_user_module modules/mod_authz_user.so
|
LoadModule authz_user_module modules/mod_authz_user.so
|
||||||
LoadModule autoindex_module modules/mod_autoindex.so
|
LoadModule autoindex_module modules/mod_autoindex.so
|
||||||
|
LoadModule buffer_module modules/mod_buffer.so
|
||||||
|
LoadModule cache_module modules/mod_cache.so
|
||||||
|
LoadModule cache_disk_module modules/mod_cache_disk.so
|
||||||
#LoadModule cern_meta_module modules/mod_cern_meta.so
|
#LoadModule cern_meta_module modules/mod_cern_meta.so
|
||||||
LoadModule cgi_module modules/mod_cgi.so
|
LoadModule cgi_module modules/mod_cgi.so
|
||||||
#LoadModule dav_module modules/mod_dav.so
|
#LoadModule dav_module modules/mod_dav.so
|
||||||
@ -96,23 +100,23 @@ LoadModule isapi_module modules/mod_isapi.so
|
|||||||
LoadModule log_config_module modules/mod_log_config.so
|
LoadModule log_config_module modules/mod_log_config.so
|
||||||
LoadModule mime_module modules/mod_mime.so
|
LoadModule mime_module modules/mod_mime.so
|
||||||
#LoadModule mime_magic_module modules/mod_mime_magic.so
|
#LoadModule mime_magic_module modules/mod_mime_magic.so
|
||||||
|
LoadModule negotiation_module modules/mod_negotiation.so
|
||||||
#LoadModule proxy_module modules/mod_proxy.so
|
#LoadModule proxy_module modules/mod_proxy.so
|
||||||
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
|
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
|
||||||
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
|
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
|
||||||
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
|
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
|
||||||
#LoadModule proxy_http_module modules/mod_proxy_http.so
|
#LoadModule proxy_http_module modules/mod_proxy_http.so
|
||||||
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
|
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
|
||||||
LoadModule negotiation_module modules/mod_negotiation.so
|
|
||||||
LoadModule rewrite_module modules/mod_rewrite.so
|
LoadModule rewrite_module modules/mod_rewrite.so
|
||||||
LoadModule setenvif_module modules/mod_setenvif.so
|
LoadModule setenvif_module modules/mod_setenvif.so
|
||||||
#LoadModule speling_module modules/mod_speling.so
|
#LoadModule speling_module modules/mod_speling.so
|
||||||
|
#LoadModule ssl_module modules/mod_ssl.so
|
||||||
LoadModule status_module modules/mod_status.so
|
LoadModule status_module modules/mod_status.so
|
||||||
#LoadModule unique_id_module modules/mod_unique_id.so
|
#LoadModule unique_id_module modules/mod_unique_id.so
|
||||||
LoadModule userdir_module modules/mod_userdir.so
|
LoadModule userdir_module modules/mod_userdir.so
|
||||||
#LoadModule usertrack_module modules/mod_usertrack.so
|
#LoadModule usertrack_module modules/mod_usertrack.so
|
||||||
LoadModule vhost_alias_module modules/mod_vhost_alias.so
|
LoadModule vhost_alias_module modules/mod_vhost_alias.so
|
||||||
#LoadModule ssl_module modules/mod_ssl.so
|
LoadModule php5_module "WAMPROOT/bin/php/phpWAMPPHPVERSION/php5apache2_4.dll"
|
||||||
LoadModule php5_module "WAMPROOT/bin/php/phpWAMPPHPVERSION/php5apache2_2.dll"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# ExtendedStatus controls whether Apache will generate "full" status
|
# ExtendedStatus controls whether Apache will generate "full" status
|
||||||
@ -123,9 +127,9 @@ ExtendedStatus On
|
|||||||
|
|
||||||
<Location /server-status>
|
<Location /server-status>
|
||||||
SetHandler server-status
|
SetHandler server-status
|
||||||
Order Deny,Allow
|
Require local
|
||||||
Deny from all
|
#Require ip 1.2.3.4
|
||||||
Allow from localhost, 127.0.0.1
|
#Require host 1.2.3.4
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
|
|
||||||
@ -211,9 +215,7 @@ KeepAliveTimeout 30
|
|||||||
<Directory />
|
<Directory />
|
||||||
Options FollowSymLinks
|
Options FollowSymLinks
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Order deny,allow
|
Require all denied
|
||||||
Deny from all
|
|
||||||
Satisfy all
|
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -253,9 +255,10 @@ KeepAliveTimeout 30
|
|||||||
# Controls who can get stuff from this server.
|
# Controls who can get stuff from this server.
|
||||||
#
|
#
|
||||||
# onlineoffline tag - don't remove
|
# onlineoffline tag - don't remove
|
||||||
Order Deny,Allow
|
<RequireAny>
|
||||||
Deny from all
|
Require ip 127.0.0.1
|
||||||
Allow from 127.0.0.1
|
Require host localhost
|
||||||
|
</RequireAny>
|
||||||
|
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
@ -272,8 +275,7 @@ KeepAliveTimeout 30
|
|||||||
# viewed by Web clients.
|
# viewed by Web clients.
|
||||||
#
|
#
|
||||||
<FilesMatch "^\.ht">
|
<FilesMatch "^\.ht">
|
||||||
Order allow,deny
|
Require all denied
|
||||||
Deny from all
|
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -359,8 +361,7 @@ LogLevel warn
|
|||||||
<Directory "cgi-bin">
|
<Directory "cgi-bin">
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Options None
|
Options None
|
||||||
Order allow,deny
|
Require all granted
|
||||||
Allow from all
|
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -410,7 +411,7 @@ LogLevel warn
|
|||||||
# keep browsers from trying to display binary files as though they are
|
# keep browsers from trying to display binary files as though they are
|
||||||
# text.
|
# text.
|
||||||
#
|
#
|
||||||
DefaultType text/plain
|
#DefaultType text/plain
|
||||||
|
|
||||||
<IfModule mime_module>
|
<IfModule mime_module>
|
||||||
#
|
#
|
||||||
|
|||||||
@ -8,14 +8,18 @@ echo ---- Execute install_services.bat >> doliwamp.log 2>>&1
|
|||||||
REM NET STOP doliwampapache
|
REM NET STOP doliwampapache
|
||||||
REM NET STOP doliwampmysqld
|
REM NET STOP doliwampmysqld
|
||||||
|
|
||||||
|
cd "WAMPROOT"
|
||||||
|
|
||||||
REM Apache x.x
|
REM Apache x.x
|
||||||
.\bin\apache\apacheWAMPAPACHEVERSION\bin\httpd.exe -k install -n doliwampapache
|
.\bin\apache\apacheWAMPAPACHEVERSION\bin\httpd.exe -k install -n doliwampapache
|
||||||
REM reg add HKLM\SYSTEM\CurrentControlSet\Services\doliwampapache /V Start /t REG_DWORD /d 3 /f
|
REM reg add HKLM\SYSTEM\CurrentControlSet\Services\doliwampapache /V Start /t REG_DWORD /d 3 /f
|
||||||
|
|
||||||
REM Mysql 5.0-
|
REM Mysql 5.0-
|
||||||
REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --install-manual doliwampmysqld
|
REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --install-manual doliwampmysqld
|
||||||
.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --install doliwampmysqld
|
REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --install doliwampmysqld
|
||||||
REM Mysql 5.1+
|
REM Mysql 5.1+
|
||||||
REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --install doliwampmysqld
|
.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --install doliwampmysqld
|
||||||
|
|
||||||
echo ---- End script >> doliwamp.log 2>>&1
|
echo ---- End script >> doliwamp.log 2>>&1
|
||||||
|
|
||||||
|
REM pause
|
||||||
|
|||||||
@ -77,10 +77,6 @@ log-error=WAMPROOT/logs/mysql.log
|
|||||||
#Path to the database root
|
#Path to the database root
|
||||||
datadir=WAMPROOT/bin/mysql/data
|
datadir=WAMPROOT/bin/mysql/data
|
||||||
|
|
||||||
# The default character set that will be used when a new schema or table is
|
|
||||||
# created and no character set is defined
|
|
||||||
default-character-set=latin1
|
|
||||||
|
|
||||||
# The default storage engine that will be used when create new tables when
|
# The default storage engine that will be used when create new tables when
|
||||||
default-storage-engine=INNODB
|
default-storage-engine=INNODB
|
||||||
|
|
||||||
@ -101,13 +97,6 @@ max_connections=255
|
|||||||
# slowdown instead of a performance improvement.
|
# slowdown instead of a performance improvement.
|
||||||
query_cache_size=8M
|
query_cache_size=8M
|
||||||
|
|
||||||
# The number of open tables for all threads. Increasing this value
|
|
||||||
# increases the number of file descriptors that mysqld requires.
|
|
||||||
# Therefore you have to make sure to set the amount of open files
|
|
||||||
# allowed to at least 4096 in the variable "open-files-limit" in
|
|
||||||
# section [mysqld_safe]
|
|
||||||
table_cache=510
|
|
||||||
|
|
||||||
# Maximum size for internal (in-memory) temporary tables. If a table
|
# Maximum size for internal (in-memory) temporary tables. If a table
|
||||||
# grows larger than this value, it is automatically converted to disk
|
# grows larger than this value, it is automatically converted to disk
|
||||||
# based table This limitation is for a single table. There can be many
|
# based table This limitation is for a single table. There can be many
|
||||||
@ -125,18 +114,6 @@ thread_cache_size=12
|
|||||||
|
|
||||||
#*** MyISAM Specific options
|
#*** MyISAM Specific options
|
||||||
|
|
||||||
# The maximum size of the temporary file MySQL is allowed to use while
|
|
||||||
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
|
|
||||||
# If the file-size would be bigger than this, the index will be created
|
|
||||||
# through the key cache (which is slower).
|
|
||||||
myisam_max_sort_file_size=100G
|
|
||||||
|
|
||||||
# If the temporary file used for fast index creation would be bigger
|
|
||||||
# than using the key cache by the amount specified here, then prefer the
|
|
||||||
# key cache method. This is mainly used to force long character keys in
|
|
||||||
# large tables to use the slower key cache method to create the index.
|
|
||||||
myisam_max_extra_sort_file_size=100G
|
|
||||||
|
|
||||||
# If the temporary file used for fast index creation would be bigger
|
# If the temporary file used for fast index creation would be bigger
|
||||||
# than using the key cache by the amount specified here, then prefer the
|
# than using the key cache by the amount specified here, then prefer the
|
||||||
# key cache method. This is mainly used to force long character keys in
|
# key cache method. This is mainly used to force long character keys in
|
||||||
@ -170,13 +147,6 @@ sort_buffer_size=203K
|
|||||||
# and speed up some things.
|
# and speed up some things.
|
||||||
#skip-innodb
|
#skip-innodb
|
||||||
|
|
||||||
# Additional memory pool that is used by InnoDB to store metadata
|
|
||||||
# information. If InnoDB requires more memory for this purpose it will
|
|
||||||
# start to allocate it from the OS. As this is fast enough on most
|
|
||||||
# recent operating systems, you normally do not need to change this
|
|
||||||
# value. SHOW INNODB STATUS will display the current amount used.
|
|
||||||
innodb_additional_mem_pool_size=2M
|
|
||||||
|
|
||||||
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
|
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
|
||||||
# disk at each commit, which offers full ACID behavior. If you are
|
# disk at each commit, which offers full ACID behavior. If you are
|
||||||
# willing to compromise this safety, and you are running small
|
# willing to compromise this safety, and you are running small
|
||||||
@ -234,10 +204,6 @@ log-error=WAMPROOT/logs/mysql.log
|
|||||||
#Path to the database root
|
#Path to the database root
|
||||||
datadir=WAMPROOT/bin/mysql/data
|
datadir=WAMPROOT/bin/mysql/data
|
||||||
|
|
||||||
# The default character set that will be used when a new schema or table is
|
|
||||||
# created and no character set is defined
|
|
||||||
default-character-set=latin1
|
|
||||||
|
|
||||||
# The default storage engine that will be used when create new tables when
|
# The default storage engine that will be used when create new tables when
|
||||||
default-storage-engine=INNODB
|
default-storage-engine=INNODB
|
||||||
|
|
||||||
@ -258,13 +224,6 @@ max_connections=255
|
|||||||
# slowdown instead of a performance improvement.
|
# slowdown instead of a performance improvement.
|
||||||
query_cache_size=8M
|
query_cache_size=8M
|
||||||
|
|
||||||
# The number of open tables for all threads. Increasing this value
|
|
||||||
# increases the number of file descriptors that mysqld requires.
|
|
||||||
# Therefore you have to make sure to set the amount of open files
|
|
||||||
# allowed to at least 4096 in the variable "open-files-limit" in
|
|
||||||
# section [mysqld_safe]
|
|
||||||
table_cache=510
|
|
||||||
|
|
||||||
# Maximum size for internal (in-memory) temporary tables. If a table
|
# Maximum size for internal (in-memory) temporary tables. If a table
|
||||||
# grows larger than this value, it is automatically converted to disk
|
# grows larger than this value, it is automatically converted to disk
|
||||||
# based table This limitation is for a single table. There can be many
|
# based table This limitation is for a single table. There can be many
|
||||||
@ -282,18 +241,6 @@ thread_cache_size=12
|
|||||||
|
|
||||||
#*** MyISAM Specific options
|
#*** MyISAM Specific options
|
||||||
|
|
||||||
# The maximum size of the temporary file MySQL is allowed to use while
|
|
||||||
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
|
|
||||||
# If the file-size would be bigger than this, the index will be created
|
|
||||||
# through the key cache (which is slower).
|
|
||||||
myisam_max_sort_file_size=100G
|
|
||||||
|
|
||||||
# If the temporary file used for fast index creation would be bigger
|
|
||||||
# than using the key cache by the amount specified here, then prefer the
|
|
||||||
# key cache method. This is mainly used to force long character keys in
|
|
||||||
# large tables to use the slower key cache method to create the index.
|
|
||||||
myisam_max_extra_sort_file_size=100G
|
|
||||||
|
|
||||||
# If the temporary file used for fast index creation would be bigger
|
# If the temporary file used for fast index creation would be bigger
|
||||||
# than using the key cache by the amount specified here, then prefer the
|
# than using the key cache by the amount specified here, then prefer the
|
||||||
# key cache method. This is mainly used to force long character keys in
|
# key cache method. This is mainly used to force long character keys in
|
||||||
@ -327,13 +274,6 @@ sort_buffer_size=203K
|
|||||||
# and speed up some things.
|
# and speed up some things.
|
||||||
#skip-innodb
|
#skip-innodb
|
||||||
|
|
||||||
# Additional memory pool that is used by InnoDB to store metadata
|
|
||||||
# information. If InnoDB requires more memory for this purpose it will
|
|
||||||
# start to allocate it from the OS. As this is fast enough on most
|
|
||||||
# recent operating systems, you normally do not need to change this
|
|
||||||
# value. SHOW INNODB STATUS will display the current amount used.
|
|
||||||
innodb_additional_mem_pool_size=2M
|
|
||||||
|
|
||||||
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
|
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
|
||||||
# disk at each commit, which offers full ACID behavior. If you are
|
# disk at each commit, which offers full ACID behavior. If you are
|
||||||
# willing to compromise this safety, and you are running small
|
# willing to compromise this safety, and you are running small
|
||||||
|
|||||||
@ -1,22 +1,35 @@
|
|||||||
Alias /phpmyadmin "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/"
|
Alias /phpmyadmin "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/"
|
||||||
|
|
||||||
# to give access to phpmyadmin from outside
|
# NOTE FOR APACHE 2.2:
|
||||||
# replace the lines
|
# To grant access to dolibarr from outside set lines
|
||||||
#
|
#
|
||||||
# Order Deny,Allow
|
# Order Allow,Deny
|
||||||
|
# Allow from all
|
||||||
|
#
|
||||||
|
# instead of
|
||||||
|
#
|
||||||
|
# Order Deny,Allow
|
||||||
# Deny from all
|
# Deny from all
|
||||||
# Allow from 127.0.0.1
|
# Allow from 127.0.0.1
|
||||||
#
|
#
|
||||||
# by
|
# NOTE FOR APACHE 2.3:
|
||||||
|
# To grant access to dolibarr from outside set lines
|
||||||
#
|
#
|
||||||
# Order Allow,Deny
|
# Require all granted
|
||||||
# Allow from all
|
#
|
||||||
|
# instead of
|
||||||
|
#
|
||||||
|
# <RequireAny>
|
||||||
|
# Require ip 127.0.0.1
|
||||||
|
# Require host localhost
|
||||||
|
# <RequireAny>
|
||||||
#
|
#
|
||||||
|
|
||||||
<Directory "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/">
|
<Directory "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/">
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
AllowOverride all
|
AllowOverride all
|
||||||
Order Deny,Allow
|
<RequireAny>
|
||||||
Deny from all
|
Require ip 127.0.0.1
|
||||||
Allow from 127.0.0.1
|
Require host localhost
|
||||||
|
</RequireAny>
|
||||||
</Directory>
|
</Directory>
|
||||||
@ -10,9 +10,11 @@ NET START doliwampapache >> doliwamp.log 2>>&1
|
|||||||
echo NET START doliwampmysqld >> doliwamp.log 2>>&1
|
echo NET START doliwampmysqld >> doliwamp.log 2>>&1
|
||||||
NET START doliwampmysqld >> doliwamp.log 2>>&1
|
NET START doliwampmysqld >> doliwamp.log 2>>&1
|
||||||
|
|
||||||
|
REM You can also check logs into c:/dolibarr/logs if start fails
|
||||||
|
|
||||||
echo Please wait...
|
echo Please wait...
|
||||||
echo ---- End script >> doliwamp.log 2>>&1
|
echo ---- End script >> doliwamp.log 2>>&1
|
||||||
|
|
||||||
REM sleep is not a Windows commande
|
REM sleep is not a Windows commande
|
||||||
REM sleep 1
|
REM sleep 2
|
||||||
ping 1.1.1.1 -n 1 -w 1000 > nul
|
ping 127.0.0.1 -n 2 -w 1000 > nul
|
||||||
|
|||||||
@ -12,6 +12,7 @@ start WAMPROOT\bin\apache\apacheWAMPAPACHEVERSION\bin\httpd.exe -f conf\httpd.co
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
echo Running Mysql as user process (this process does not return so we use "start")
|
echo Running Mysql as user process (this process does not return so we use "start")
|
||||||
start WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --defaults-file=WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\my.ini --console
|
REM start WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --defaults-file=WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\my.ini --console
|
||||||
|
start WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --defaults-file=WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\my.ini --console
|
||||||
|
|
||||||
pause
|
pause
|
||||||
@ -15,4 +15,6 @@ echo ---- End script >> doliwamp.log 2>>&1
|
|||||||
|
|
||||||
REM sleep is not a Windows command
|
REM sleep is not a Windows command
|
||||||
REM sleep 1
|
REM sleep 1
|
||||||
ping 1.1.1.1 -n 1 -w 1000 > nul
|
ping 1.1.1.1 -n 1 -w 1000 > nul
|
||||||
|
|
||||||
|
REM pause
|
||||||
|
|||||||
@ -3,10 +3,19 @@ REM --------------------------------------------------------
|
|||||||
REM This script install Apache and Mysql DoliWamp services
|
REM This script install Apache and Mysql DoliWamp services
|
||||||
REM --------------------------------------------------------
|
REM --------------------------------------------------------
|
||||||
|
|
||||||
|
cd "WAMPROOT"
|
||||||
|
|
||||||
echo ---- Execute uninstall_services.bat >> doliwamp.log 2>>&1
|
echo ---- Execute uninstall_services.bat >> doliwamp.log 2>>&1
|
||||||
NET STOP doliwampapache
|
NET STOP doliwampapache
|
||||||
.\bin\apache\apacheWAMPAPACHEVERSION\bin\httpd.exe -k uninstall -n doliwampapache
|
.\bin\apache\apacheWAMPAPACHEVERSION\bin\httpd.exe -k uninstall -n doliwampapache
|
||||||
|
|
||||||
NET STOP doliwampmysqld
|
NET STOP doliwampmysqld
|
||||||
.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --remove doliwampmysqld
|
REM Mysql 5.0-
|
||||||
|
REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --remove doliwampmysqld
|
||||||
|
REM Mysql 5.1+
|
||||||
|
.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --remove doliwampmysqld
|
||||||
|
|
||||||
REM wampmanager.exe -quit -id={doliwampserver}
|
REM wampmanager.exe -quit -id={doliwampserver}
|
||||||
echo ---- End script >> doliwamp.log 2>>&1
|
echo ---- End script >> doliwamp.log 2>>&1
|
||||||
|
|
||||||
|
REM pause
|
||||||
|
|||||||
@ -1,2 +1 @@
|
|||||||
Order allow,deny
|
Require all granted
|
||||||
Deny from all
|
|
||||||
|
|||||||
@ -297,7 +297,7 @@ class AccountancyCategory
|
|||||||
* @param string $year Specific year
|
* @param string $year Specific year
|
||||||
* @param int $sens Sens of the account 0: credit - debit 1: debit - credit
|
* @param int $sens Sens of the account 0: credit - debit 1: debit - credit
|
||||||
*
|
*
|
||||||
* @return array Result in table
|
* @return integer Result in table
|
||||||
*/
|
*/
|
||||||
public function getResult($cpt, $month, $year, $sens) {
|
public function getResult($cpt, $month, $year, $sens) {
|
||||||
$sql = "SELECT SUM(t.debit) as debit, SUM(t.credit) as credit";
|
$sql = "SELECT SUM(t.debit) as debit, SUM(t.credit) as credit";
|
||||||
|
|||||||
@ -823,7 +823,8 @@ else
|
|||||||
if (! empty($conf->global->MAIN_INFO_SIREN))
|
if (! empty($conf->global->MAIN_INFO_SIREN))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_SIREN;
|
print $conf->global->MAIN_INFO_SIREN;
|
||||||
if ($mysoc->country_code == 'FR') print ' <a href="http://avis-situation-sirene.insee.fr/avisitu/jsp/avis.jsp" target="_blank">'.$langs->trans("Check").'</a>';
|
$s = $mysoc->id_prof_url(1,$mysoc);
|
||||||
|
if ($s) print ' - '.$s;
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
@ -838,6 +839,8 @@ else
|
|||||||
if (! empty($conf->global->MAIN_INFO_SIRET))
|
if (! empty($conf->global->MAIN_INFO_SIRET))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_SIRET;
|
print $conf->global->MAIN_INFO_SIRET;
|
||||||
|
$s = $mysoc->id_prof_url(2,$mysoc);
|
||||||
|
if ($s) print ' - '.$s;
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
@ -852,6 +855,8 @@ else
|
|||||||
if (! empty($conf->global->MAIN_INFO_APE))
|
if (! empty($conf->global->MAIN_INFO_APE))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_APE;
|
print $conf->global->MAIN_INFO_APE;
|
||||||
|
$s = $mysoc->id_prof_url(3,$mysoc);
|
||||||
|
if ($s) print ' - '.$s;
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
@ -866,6 +871,8 @@ else
|
|||||||
if (! empty($conf->global->MAIN_INFO_RCS))
|
if (! empty($conf->global->MAIN_INFO_RCS))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_RCS;
|
print $conf->global->MAIN_INFO_RCS;
|
||||||
|
$s = $mysoc->id_prof_url(4,$mysoc);
|
||||||
|
if ($s) print ' - '.$s;
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
@ -880,6 +887,8 @@ else
|
|||||||
if (! empty($conf->global->MAIN_INFO_PROFID5))
|
if (! empty($conf->global->MAIN_INFO_PROFID5))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_PROFID5;
|
print $conf->global->MAIN_INFO_PROFID5;
|
||||||
|
$s = $mysoc->id_prof_url(5,$mysoc);
|
||||||
|
if ($s) print ' - '.$s;
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
@ -894,6 +903,8 @@ else
|
|||||||
if (! empty($conf->global->MAIN_INFO_PROFID6))
|
if (! empty($conf->global->MAIN_INFO_PROFID6))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_PROFID6;
|
print $conf->global->MAIN_INFO_PROFID6;
|
||||||
|
$s = $mysoc->id_prof_url(6,$mysoc);
|
||||||
|
if ($s) print ' - '.$s;
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
@ -909,9 +920,9 @@ else
|
|||||||
$s='';
|
$s='';
|
||||||
$s.=$conf->global->MAIN_INFO_TVAINTRA;
|
$s.=$conf->global->MAIN_INFO_TVAINTRA;
|
||||||
$s.='<input type="hidden" name="tva_intra" size="12" maxlength="20" value="'.$conf->global->MAIN_INFO_TVAINTRA.'">';
|
$s.='<input type="hidden" name="tva_intra" size="12" maxlength="20" value="'.$conf->global->MAIN_INFO_TVAINTRA.'">';
|
||||||
if (empty($conf->global->MAIN_DISABLEVATCHECK))
|
if (empty($conf->global->MAIN_DISABLEVATCHECK) && $mysoc->isInEEC())
|
||||||
{
|
{
|
||||||
$s.=' ';
|
$s.=' - ';
|
||||||
if (! empty($conf->use_javascript_ajax))
|
if (! empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|||||||
@ -45,14 +45,6 @@ $action = GETPOST('action','alpha');
|
|||||||
if ($action == "set")
|
if ($action == "set")
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
for ($i = 0 ; $i < 2 ; $i++)
|
|
||||||
{
|
|
||||||
$res = dolibarr_set_const($db, GETPOST("nom$i",'alpha'), GETPOST("value$i",'alpha'),'chaine',0,'',$conf->entity);
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"),'chaine',0,'',$conf->entity);
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
|
|
||||||
$id=GETPOST('PRELEVEMENT_ID_BANKACCOUNT','int');
|
$id=GETPOST('PRELEVEMENT_ID_BANKACCOUNT','int');
|
||||||
$account = new Account($db);
|
$account = new Account($db);
|
||||||
@ -78,6 +70,15 @@ if ($action == "set")
|
|||||||
}
|
}
|
||||||
else $error++;
|
else $error++;
|
||||||
|
|
||||||
|
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"),'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
|
if (GETPOST("PRELEVEMENT_USER") > 0)
|
||||||
|
{
|
||||||
|
$res = dolibarr_set_const($db, "PRELEVEMENT_USER", GETPOST("PRELEVEMENT_USER"),'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
@ -131,33 +132,25 @@ print '<td width="30%">'.$langs->trans("Parameter").'</td>';
|
|||||||
print '<td width="40%">'.$langs->trans("Value").'</td>';
|
print '<td width="40%">'.$langs->trans("Value").'</td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
//User
|
|
||||||
print '<tr class="impair"><td>'.$langs->trans("ResponsibleUser").'</td>';
|
|
||||||
print '<td align="left">';
|
|
||||||
print '<input type="hidden" name="nom0" value="PRELEVEMENT_USER">';
|
|
||||||
print $form->select_dolusers($conf->global->PRELEVEMENT_USER, 'value0', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
//Profid1 of Transmitter
|
|
||||||
print '<tr class="pair"><td>'.$langs->trans("NumeroNationalEmetter").' - '.$langs->transcountry('ProfId1',$mysoc->country_code).'</td>';
|
|
||||||
print '<td align="left">';
|
|
||||||
print '<input type="hidden" name="nom1" value="PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR">';
|
|
||||||
print '<input type="text" name="value1" value="'.$conf->global->PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR.'" size="9" ></td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Bank account (from Banks module)
|
// Bank account (from Banks module)
|
||||||
print '<tr class="impair"><td>'.$langs->trans("BankToReceiveWithdraw").'</td>';
|
print '<tr class="impair"><td class="fieldrequired">'.$langs->trans("BankToReceiveWithdraw").'</td>';
|
||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
$form->select_comptes($conf->global->PRELEVEMENT_ID_BANKACCOUNT,'PRELEVEMENT_ID_BANKACCOUNT',0,"courant=1",1);
|
$form->select_comptes($conf->global->PRELEVEMENT_ID_BANKACCOUNT,'PRELEVEMENT_ID_BANKACCOUNT',0,"courant=1",1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// ICS
|
// ICS
|
||||||
print '<tr class="pair"><td>'.$langs->trans("ICS").'</td>';
|
print '<tr class="pair"><td class="fieldrequired">'.$langs->trans("ICS").'</td>';
|
||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
print '<input type="text" name="PRELEVEMENT_ICS" value="'.$conf->global->PRELEVEMENT_ICS.'" size="9" ></td>';
|
print '<input type="text" name="PRELEVEMENT_ICS" value="'.$conf->global->PRELEVEMENT_ICS.'" size="9" ></td>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
//User
|
||||||
|
print '<tr class="impair"><td class="fieldrequired">'.$langs->trans("ResponsibleUser").'</td>';
|
||||||
|
print '<td align="left">';
|
||||||
|
print $form->select_dolusers($conf->global->PRELEVEMENT_USER, 'PRELEVEMENT_USER', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|||||||
@ -163,7 +163,7 @@ if (empty($reshook))
|
|||||||
// Change status of invoice
|
// Change status of invoice
|
||||||
else if ($action == 'reopen' && $user->rights->facture->creer) {
|
else if ($action == 'reopen' && $user->rights->facture->creer) {
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
if ($object->statut == 2 || ($object->statut == 3 && $object->close_code != 'replaced')) {
|
if ($object->statut == 2 || ($object->statut == 3 && $object->close_code != 'replaced') || ($object->statut == 1 && $object->paye == 1)) { // ($object->statut == 1 && $object->paye == 1) should not happened but can be found when data are corrupted
|
||||||
$result = $object->set_unpaid($user);
|
$result = $object->set_unpaid($user);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id);
|
header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id);
|
||||||
@ -2930,16 +2930,16 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="20%">' . $langs->trans('Ref') . '</td>';
|
print '<tr><td width="20%">' . $langs->trans('Ref') . '</td>';
|
||||||
print '<td colspan="5">';
|
print '<td colspan="5">';
|
||||||
$morehtmlref = '';
|
$morehtmlright = '';
|
||||||
$discount = new DiscountAbsolute($db);
|
$discount = new DiscountAbsolute($db);
|
||||||
$result = $discount->fetch(0, $object->id);
|
$result = $discount->fetch(0, $object->id);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
$morehtmlref = ' (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')';
|
$morehtmlright = ' (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')';
|
||||||
}
|
}
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
dol_print_error('', $discount->error);
|
dol_print_error('', $discount->error);
|
||||||
}
|
}
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', '', '', 0, '', '', $morehtmlright);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Ref customer
|
// Ref customer
|
||||||
@ -3905,8 +3905,8 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)
|
if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)
|
||||||
|| ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id))
|
|| ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id))
|
||||||
|| ($object->type == Facture::TYPE_DEPOSIT && empty($discount->id)))
|
|| ($object->type == Facture::TYPE_DEPOSIT && empty($discount->id)))
|
||||||
&& ($object->statut == 2 || $object->statut == 3)
|
&& ($object->statut == 2 || $object->statut == 3 || ($object->statut == 1 && $object->paye == 1)) // Condition ($object->statut == 1 && $object->paye == 1) should not happened but can be found due to corrupted data
|
||||||
&& $user->rights->facture->creer) // A paid invoice (partially or completely)
|
&& $user->rights->facture->creer) // A paid invoice (partially or completely)
|
||||||
{
|
{
|
||||||
if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice
|
if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice
|
||||||
{
|
{
|
||||||
|
|||||||
@ -699,7 +699,13 @@ if ($search_company) $sql .= natural_search('s.nom', $search_company);
|
|||||||
if ($search_montant_ht != '') $sql.= natural_search('f.total', $search_montant_ht, 1);
|
if ($search_montant_ht != '') $sql.= natural_search('f.total', $search_montant_ht, 1);
|
||||||
if ($search_montant_vat != '') $sql.= natural_search('f.total_vat', $search_montant_vat, 1);
|
if ($search_montant_vat != '') $sql.= natural_search('f.total_vat', $search_montant_vat, 1);
|
||||||
if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1);
|
if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1);
|
||||||
if ($search_status != '' && $search_status >= 0) $sql.= " AND f.fk_statut = ".$db->escape($search_status);
|
if ($search_status != '' && $search_status >= 0)
|
||||||
|
{
|
||||||
|
if ($search_status == '0') $sql.=" AND f.fk_statut = 0"; // draft
|
||||||
|
if ($search_status == '1') $sql.=" AND f.fk_statut = 1"; // unpayed
|
||||||
|
if ($search_status == '2') $sql.=" AND f.fk_statut = 2"; // payed Not that some correupted data may contains f.fk_statut = 1 AND f.paye = 1 (it means payed too but should not happend. If yes, reopen and reclassify billed)
|
||||||
|
if ($search_status == '3') $sql.=" AND f.fk_statut = 3"; // abandonned
|
||||||
|
}
|
||||||
if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmode."";
|
if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmode."";
|
||||||
if ($month > 0)
|
if ($month > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -87,8 +87,6 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
$this->factures = array();
|
$this->factures = array();
|
||||||
|
|
||||||
$this->numero_national_emetteur = "";
|
|
||||||
|
|
||||||
$this->methodes_trans = array();
|
$this->methodes_trans = array();
|
||||||
|
|
||||||
$this->methodes_trans[0] = "Internet";
|
$this->methodes_trans[0] = "Internet";
|
||||||
@ -1017,7 +1015,6 @@ class BonPrelevement extends CommonObject
|
|||||||
$this->date_echeance = $datetimeprev;
|
$this->date_echeance = $datetimeprev;
|
||||||
$this->reference_remise = $ref;
|
$this->reference_remise = $ref;
|
||||||
|
|
||||||
$this->numero_national_emetteur = $conf->global->PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR;
|
|
||||||
$this->raison_sociale = $conf->global->PRELEVEMENT_RAISON_SOCIALE;
|
$this->raison_sociale = $conf->global->PRELEVEMENT_RAISON_SOCIALE;
|
||||||
|
|
||||||
$this->emetteur_code_banque = $conf->global->PRELEVEMENT_CODE_BANQUE;
|
$this->emetteur_code_banque = $conf->global->PRELEVEMENT_CODE_BANQUE;
|
||||||
@ -1026,7 +1023,7 @@ class BonPrelevement extends CommonObject
|
|||||||
$this->emetteur_number_key = $conf->global->PRELEVEMENT_NUMBER_KEY;
|
$this->emetteur_number_key = $conf->global->PRELEVEMENT_NUMBER_KEY;
|
||||||
$this->emetteur_iban = $conf->global->PRELEVEMENT_IBAN;
|
$this->emetteur_iban = $conf->global->PRELEVEMENT_IBAN;
|
||||||
$this->emetteur_bic = $conf->global->PRELEVEMENT_BIC;
|
$this->emetteur_bic = $conf->global->PRELEVEMENT_BIC;
|
||||||
$this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // TODO Add this into setup of admin/prelevement.php. Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
|
$this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
|
||||||
|
|
||||||
$this->factures = $factures_prev_id;
|
$this->factures = $factures_prev_id;
|
||||||
|
|
||||||
@ -1461,7 +1458,7 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
fputs($this->file, " "); // Zone Reservee B2
|
fputs($this->file, " "); // Zone Reservee B2
|
||||||
|
|
||||||
fputs($this->file, $this->numero_national_emetteur); // Numero National d'emmetteur B3
|
fputs($this->file, $this->emetteur_ics); // ICS
|
||||||
|
|
||||||
// Date d'echeance C1
|
// Date d'echeance C1
|
||||||
|
|
||||||
@ -1610,7 +1607,7 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
fputs($this->file, " "); // Zone Reservee B2
|
fputs($this->file, " "); // Zone Reservee B2
|
||||||
|
|
||||||
fputs($this->file, $this->numero_national_emetteur); // Numero National d'emmetteur B3
|
fputs($this->file, $this->emetteur_ics); // ICS
|
||||||
|
|
||||||
// Date d'echeance C1
|
// Date d'echeance C1
|
||||||
|
|
||||||
@ -1777,7 +1774,7 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
fputs($this->file, " "); // Zone Reservee B2
|
fputs($this->file, " "); // Zone Reservee B2
|
||||||
|
|
||||||
fputs($this->file, $this->numero_national_emetteur); // Numero National d'emmetteur B3
|
fputs($this->file, $this->emetteur_ics); // ICS
|
||||||
|
|
||||||
// Reserve C1
|
// Reserve C1
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2015-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -62,13 +62,17 @@ if (! empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_PROJ
|
|||||||
{
|
{
|
||||||
$arrayresult['searchintoprojects']=array('text'=>img_picto('','object_projectpub').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php?search_all='.urlencode($search_boxvalue));
|
$arrayresult['searchintoprojects']=array('text'=>img_picto('','object_projectpub').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php?search_all='.urlencode($search_boxvalue));
|
||||||
}
|
}
|
||||||
|
if (! empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && $user->rights->projet->lire)
|
||||||
|
{
|
||||||
|
$arrayresult['searchintotasks']=array('text'=>img_picto('','object_task').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php?search_all='.urlencode($search_boxvalue));
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($conf->adherent->enabled) && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->rights->adherent->lire)
|
if (! empty($conf->adherent->enabled) && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->rights->adherent->lire)
|
||||||
{
|
{
|
||||||
$arrayresult['searchintomember']=array('text'=>img_picto('','object_user').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php?sall='.urlencode($search_boxvalue));
|
$arrayresult['searchintomember']=array('text'=>img_picto('','object_user').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php?sall='.urlencode($search_boxvalue));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_PROJECT_DISABLED) && $user->rights->user->user->lire)
|
if (! empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->rights->user->user->lire)
|
||||||
{
|
{
|
||||||
$arrayresult['searchintouser']=array('text'=>img_picto('','object_user').' '.$langs->trans("SearchIntoUsers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/user/index.php?sall='.urlencode($search_boxvalue));
|
$arrayresult['searchintouser']=array('text'=>img_picto('','object_user').' '.$langs->trans("SearchIntoUsers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/user/index.php?sall='.urlencode($search_boxvalue));
|
||||||
}
|
}
|
||||||
@ -114,11 +118,11 @@ if (! empty($conf->ficheinter->enabled) && empty($conf->global->MAIN_SEARCHFORM_
|
|||||||
// HR
|
// HR
|
||||||
if (! empty($conf->expensereport->enabled) && empty($conf->global->MAIN_SEARCHFORM_EXPENSEREPORT_DISABLED) && $user->rights->expensereport->lire)
|
if (! empty($conf->expensereport->enabled) && empty($conf->global->MAIN_SEARCHFORM_EXPENSEREPORT_DISABLED) && $user->rights->expensereport->lire)
|
||||||
{
|
{
|
||||||
$arrayresult['searchintoexpensereport']=array('text'=>img_picto('','object_trip').' '.$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expensereport/list.php?sall='.urlencode($search_boxvalue));
|
$arrayresult['searchintoexpensereport']=array('text'=>img_picto('','object_trip').' '.$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&sall='.urlencode($search_boxvalue));
|
||||||
}
|
}
|
||||||
if (! empty($conf->holiday->enabled) && empty($conf->global->MAIN_SEARCHFORM_HOLIDAY_DISABLED) && $user->rights->holiday->read)
|
if (! empty($conf->holiday->enabled) && empty($conf->global->MAIN_SEARCHFORM_HOLIDAY_DISABLED) && $user->rights->holiday->read)
|
||||||
{
|
{
|
||||||
$arrayresult['searchintoleaves']=array('text'=>img_picto('','object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?sall='.urlencode($search_boxvalue));
|
$arrayresult['searchintoleaves']=array('text'=>img_picto('','object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&sall='.urlencode($search_boxvalue));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -168,7 +168,7 @@ class box_actions extends ModeleBoxes
|
|||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
* @param int $nooutput No print, only return string
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return string
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null, $nooutput=0)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -5582,10 +5582,11 @@ class Form
|
|||||||
* @param string $moreparam More param to add in nav link url.
|
* @param string $moreparam More param to add in nav link url.
|
||||||
* @param int $nodbprefix Do not include DB prefix to forge table name
|
* @param int $nodbprefix Do not include DB prefix to forge table name
|
||||||
* @param string $morehtmlleft More html code to show before ref
|
* @param string $morehtmlleft More html code to show before ref
|
||||||
* @param string $morehtmlright More html code to show before navigation arrows
|
* @param string $morehtmlstatus More html code to show under navigation arrows (status place)
|
||||||
|
* @param string $morehtmlright More html code to show after ref
|
||||||
* @return string Portion HTML avec ref + boutons nav
|
* @return string Portion HTML avec ref + boutons nav
|
||||||
*/
|
*/
|
||||||
function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlright='')
|
function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlstatus='',$morehtmlright='')
|
||||||
{
|
{
|
||||||
global $langs,$conf;
|
global $langs,$conf;
|
||||||
|
|
||||||
@ -5604,7 +5605,7 @@ class Form
|
|||||||
//print "xx".$previous_ref."x".$next_ref;
|
//print "xx".$previous_ref."x".$next_ref;
|
||||||
$ret.='<div style="vertical-align: middle">';
|
$ret.='<div style="vertical-align: middle">';
|
||||||
|
|
||||||
$ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>';
|
if ($morehtmlleft) $ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>';
|
||||||
|
|
||||||
$ret.='<div class="inline-block floatleft valignmiddle refid'.(($shownav && ($previous_ref || $next_ref))?' refidpadding':'').'">';
|
$ret.='<div class="inline-block floatleft valignmiddle refid'.(($shownav && ($previous_ref || $next_ref))?' refidpadding':'').'">';
|
||||||
|
|
||||||
@ -5624,6 +5625,8 @@ class Form
|
|||||||
}
|
}
|
||||||
$ret.='</div>';
|
$ret.='</div>';
|
||||||
|
|
||||||
|
if ($morehtmlright) $ret.='<div class="inline-block floatleft">'.$morehtmlright.'</div>';
|
||||||
|
|
||||||
if ($previous_ref || $next_ref || $morehtml)
|
if ($previous_ref || $next_ref || $morehtml)
|
||||||
{
|
{
|
||||||
$ret.='<div class="pagination"><ul>';
|
$ret.='<div class="pagination"><ul>';
|
||||||
@ -5641,7 +5644,7 @@ class Form
|
|||||||
{
|
{
|
||||||
$ret.='</ul></div>';
|
$ret.='</ul></div>';
|
||||||
}
|
}
|
||||||
if ($morehtmlright) $ret.='<div class="statusref">'.$morehtmlright.'</div>';
|
if ($morehtmlstatus) $ret.='<div class="statusref">'.$morehtmlstatus.'</div>';
|
||||||
$ret.='</div>';
|
$ret.='</div>';
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class FormContract
|
|||||||
* @param string $htmlname Nom de la zone html
|
* @param string $htmlname Nom de la zone html
|
||||||
* @param int $maxlength Maximum length of label
|
* @param int $maxlength Maximum length of label
|
||||||
* @param int $showempty Show empty line
|
* @param int $showempty Show empty line
|
||||||
* @return int Nbre of project if OK, <0 if KO
|
* @return int Nbr of project if OK, <0 if KO
|
||||||
*/
|
*/
|
||||||
function select_contract($socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1)
|
function select_contract($socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1)
|
||||||
{
|
{
|
||||||
@ -137,4 +137,32 @@ class FormContract
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show a form to select a contract
|
||||||
|
*
|
||||||
|
* @param int $page Page
|
||||||
|
* @param int $socid Id third party (-1=all, 0=only contracts not linked to a third party, id=contracts not linked or linked to third party id)
|
||||||
|
* @param int $selected Id contract preselected
|
||||||
|
* @param string $htmlname Nom de la zone html
|
||||||
|
* @param int $maxlength Maximum length of label
|
||||||
|
* @param int $showempty Show empty line
|
||||||
|
* @return int Nbr of project if OK, <0 if KO
|
||||||
|
*/
|
||||||
|
function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1)
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
|
||||||
|
print "\n";
|
||||||
|
print '<form method="post" action="'.$page.'">';
|
||||||
|
print '<input type="hidden" name="action" value="setcontract">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||||
|
print '<tr><td>';
|
||||||
|
$this->select_contract($socid, $selected, $htmlname, $maxlength, $showempty);
|
||||||
|
print '</td>';
|
||||||
|
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
|
print '</tr></table></form>';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,9 +78,9 @@ function prelevement_prepare_head(BonPrelevement $object)
|
|||||||
function prelevement_check_config()
|
function prelevement_check_config()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
if(empty($conf->global->PRELEVEMENT_USER)) return -1;
|
|
||||||
if(empty($conf->global->PRELEVEMENT_ID_BANKACCOUNT)) return -1;
|
if(empty($conf->global->PRELEVEMENT_ID_BANKACCOUNT)) return -1;
|
||||||
if(empty($conf->global->PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR)) return -1;
|
if(empty($conf->global->PRELEVEMENT_ICS)) return -1;
|
||||||
|
if(empty($conf->global->PRELEVEMENT_USER)) return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -239,7 +239,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$pdf->SetSubject($outputlangs->transnoentities("Order"));
|
$pdf->SetSubject($outputlangs->transnoentities("Order"));
|
||||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order"));
|
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
|
||||||
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
||||||
|
|
||||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||||
|
|||||||
@ -198,7 +198,7 @@ class pdf_strato extends ModelePDFContract
|
|||||||
$pdf->SetSubject($outputlangs->transnoentities("ContractCard"));
|
$pdf->SetSubject($outputlangs->transnoentities("ContractCard"));
|
||||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("ContractCard"));
|
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("ContractCard")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
|
||||||
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
||||||
|
|
||||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||||
|
|||||||
@ -282,7 +282,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetSubject($outputlangs->transnoentities("Invoice"));
|
$pdf->SetSubject($outputlangs->transnoentities("Invoice"));
|
||||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Invoice"));
|
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Invoice")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
|
||||||
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
||||||
|
|
||||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||||
|
|||||||
@ -200,9 +200,10 @@ class mailing_advthirdparties extends MailingTargets
|
|||||||
* For example if this selector is used to extract 500 different
|
* For example if this selector is used to extract 500 different
|
||||||
* emails from a text file, this function must return 500.
|
* emails from a text file, this function must return 500.
|
||||||
*
|
*
|
||||||
* @return int Nb of recipients
|
* @param string $sql Sql request to use
|
||||||
|
* @return int Nb of recipients
|
||||||
*/
|
*/
|
||||||
function getNbOfRecipients($sql)
|
function getNbOfRecipients($sql='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -141,7 +141,7 @@ class modSupplierProposal extends DolibarrModules
|
|||||||
$this->menu[$r]=array(
|
$this->menu[$r]=array(
|
||||||
'fk_menu'=>'fk_mainmenu=commercial', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
'fk_menu'=>'fk_mainmenu=commercial', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||||
'type'=>'left', // This is a Left menu entry
|
'type'=>'left', // This is a Left menu entry
|
||||||
'titre'=>'SupplierProposalShort',
|
'titre'=>'SupplierProposalsShort',
|
||||||
'leftmenu'=>'supplier_proposalsubmenu',
|
'leftmenu'=>'supplier_proposalsubmenu',
|
||||||
'url'=>'/supplier_proposal/index.php',
|
'url'=>'/supplier_proposal/index.php',
|
||||||
'langs'=>'supplier_proposal', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
'langs'=>'supplier_proposal', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||||
@ -156,7 +156,7 @@ class modSupplierProposal extends DolibarrModules
|
|||||||
'fk_menu'=>'fk_mainmenu=commercial,fk_leftmenu=supplier_proposalsubmenu',
|
'fk_menu'=>'fk_mainmenu=commercial,fk_leftmenu=supplier_proposalsubmenu',
|
||||||
'type'=>'left',
|
'type'=>'left',
|
||||||
'titre'=>'SupplierProposalNew',
|
'titre'=>'SupplierProposalNew',
|
||||||
'url'=>'/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals',
|
'url'=>'/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals',
|
||||||
'langs'=>'supplier_proposal',
|
'langs'=>'supplier_proposal',
|
||||||
'enabled'=>'$conf->supplier_proposal->enabled',
|
'enabled'=>'$conf->supplier_proposal->enabled',
|
||||||
'perms'=>'$user->rights->supplier_proposal->creer',
|
'perms'=>'$user->rights->supplier_proposal->creer',
|
||||||
@ -182,7 +182,7 @@ class modSupplierProposal extends DolibarrModules
|
|||||||
'fk_menu'=>'fk_mainmenu=commercial,fk_leftmenu=supplier_proposalsubmenu',
|
'fk_menu'=>'fk_mainmenu=commercial,fk_leftmenu=supplier_proposalsubmenu',
|
||||||
'type'=>'left',
|
'type'=>'left',
|
||||||
'titre'=>'Statistics',
|
'titre'=>'Statistics',
|
||||||
'url'=>'/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier',
|
'url'=>'/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier',
|
||||||
'langs'=>'supplier_proposal',
|
'langs'=>'supplier_proposal',
|
||||||
'enabled'=>'$conf->supplier_proposal->enabled',
|
'enabled'=>'$conf->supplier_proposal->enabled',
|
||||||
'perms'=>'$user->rights->supplier_proposal->lire',
|
'perms'=>'$user->rights->supplier_proposal->lire',
|
||||||
|
|||||||
@ -296,7 +296,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$pdf->SetSubject($outputlangs->transnoentities("CommercialProposal"));
|
$pdf->SetSubject($outputlangs->transnoentities("CommercialProposal"));
|
||||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("CommercialProposal"));
|
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("CommercialProposal")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
|
||||||
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
||||||
|
|
||||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||||
|
|||||||
@ -232,7 +232,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->SetSubject($outputlangs->transnoentities("Invoice"));
|
$pdf->SetSubject($outputlangs->transnoentities("Invoice"));
|
||||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order"));
|
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
|
||||||
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
||||||
|
|
||||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||||
|
|||||||
@ -243,7 +243,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->SetSubject($outputlangs->transnoentities("Order"));
|
$pdf->SetSubject($outputlangs->transnoentities("Order"));
|
||||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order"));
|
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
|
||||||
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
||||||
|
|
||||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||||
|
|||||||
@ -252,7 +252,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
$pdf->SetSubject($outputlangs->transnoentities("CommercialAsk"));
|
$pdf->SetSubject($outputlangs->transnoentities("CommercialAsk"));
|
||||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("CommercialAsk"));
|
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("CommercialAsk")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
|
||||||
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
||||||
|
|
||||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
@ -51,22 +51,21 @@ $month_end = GETPOST("month_end","int");
|
|||||||
$year_end = GETPOST("year_end","int");
|
$year_end = GETPOST("year_end","int");
|
||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
|
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test must be present to be compatible with all browsers
|
|
||||||
{
|
|
||||||
$search_ref="";
|
|
||||||
$search_user="";
|
|
||||||
$search_amount_ht="";
|
|
||||||
$search_amount_ttc="";
|
|
||||||
$search_status="";
|
|
||||||
$month_start="";
|
|
||||||
$year_start="";
|
|
||||||
$month_end="";
|
|
||||||
$year_end="";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($search_status == '') $search_status=-1;
|
if ($search_status == '') $search_status=-1;
|
||||||
if ($search_user == '') $search_user=-1;
|
if ($search_user == '') $search_user=-1;
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
|
$contextpage='expensereportlist';
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
|
$hookmanager->initHooks(array('expensereportlist'));
|
||||||
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
|
// fetch optionals attributes and labels
|
||||||
|
$extralabels = $extrafields->fetch_name_optionals_label('expensereport');
|
||||||
|
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
|
||||||
|
|
||||||
|
|
||||||
// List of fields to search into when doing a "search in all"
|
// List of fields to search into when doing a "search in all"
|
||||||
$fieldstosearchall = array(
|
$fieldstosearchall = array(
|
||||||
'd.ref'=>'Ref',
|
'd.ref'=>'Ref',
|
||||||
@ -75,6 +74,33 @@ $fieldstosearchall = array(
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
|
$parameters=array('socid'=>$socid);
|
||||||
|
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||||
|
|
||||||
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test must be present to be compatible with all browsers
|
||||||
|
{
|
||||||
|
$search_ref="";
|
||||||
|
$search_user="";
|
||||||
|
$search_amount_ht="";
|
||||||
|
$search_amount_ttc="";
|
||||||
|
$search_status="";
|
||||||
|
$month_start="";
|
||||||
|
$year_start="";
|
||||||
|
$month_end="";
|
||||||
|
$year_end="";
|
||||||
|
$search_array_options=array();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -108,7 +134,6 @@ $sql.= " u.rowid as id_user, u.firstname, u.lastname";
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d";
|
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d";
|
||||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON d.fk_user_author = u.rowid";
|
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON d.fk_user_author = u.rowid";
|
||||||
$sql.= " WHERE d.entity = ".$conf->entity;
|
$sql.= " WHERE d.entity = ".$conf->entity;
|
||||||
|
|
||||||
// Search all
|
// Search all
|
||||||
if (!empty($sall))
|
if (!empty($sall))
|
||||||
{
|
{
|
||||||
@ -192,13 +217,22 @@ if ($resql)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$param="";
|
$param="";
|
||||||
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
if ($search_ref) $param.="&search_ref=".$search_ref;
|
if ($search_ref) $param.="&search_ref=".$search_ref;
|
||||||
if ($search_user) $param.="&search_user=".$search_user;
|
if ($search_user) $param.="&search_user=".$search_user;
|
||||||
if ($search_amount_ht) $param.="&search_amount_ht=".$search_amount_ht;
|
if ($search_amount_ht) $param.="&search_amount_ht=".$search_amount_ht;
|
||||||
if ($search_amount_ttc) $param.="&search_amount_ttc=".$search_amount_ttc;
|
if ($search_amount_ttc) $param.="&search_amount_ttc=".$search_amount_ttc;
|
||||||
if ($search_status >= 0) $param.="&search_status=".$search_status;
|
if ($search_status >= 0) $param.="&search_status=".$search_status;
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||||
|
// Add $param from extra fields
|
||||||
|
foreach ($search_array_options as $key => $val)
|
||||||
|
{
|
||||||
|
$crit=$val;
|
||||||
|
$tmpkey=preg_replace('/search_options_/','',$key);
|
||||||
|
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
|
||||||
|
}
|
||||||
|
|
||||||
print_barre_liste($langs->trans("ListTripsAndExpenses"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
print_barre_liste($langs->trans("ListTripsAndExpenses"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
@ -210,8 +244,9 @@ if ($resql)
|
|||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||||
|
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid","",$param,'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid","",$param,'',$sortfield,$sortorder);
|
||||||
|
|||||||
@ -477,7 +477,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set into a contract
|
// Set into a contract
|
||||||
else if ($action == 'setcontrat' && $user->rights->contrat->creer)
|
else if ($action == 'setcontract' && $user->rights->contrat->creer)
|
||||||
{
|
{
|
||||||
$result=$object->set_contrat($user,GETPOST('contratid','int'));
|
$result=$object->set_contrat($user,GETPOST('contratid','int'));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
@ -1251,15 +1251,8 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
if ($action == 'contrat')
|
if ($action == 'contrat')
|
||||||
{
|
{
|
||||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
$formcontract= new Formcontract($db);
|
||||||
print '<tr><td>';
|
$formcontract->formSelectContract($_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid, $object->fk_contrat, 'contratid', 0, 1);
|
||||||
$htmlcontract= new Formcontract($db);
|
|
||||||
//print "$socid,$selected,$htmlname";
|
|
||||||
$htmlcontract->select_contract($object->socid,$object->fk_contrat,'contratid');
|
|
||||||
|
|
||||||
print '</td>';
|
|
||||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1649,7 +1642,6 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
if ($action != 'presend')
|
if ($action != 'presend')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -744,6 +744,7 @@ SearchIntoMembers=Members
|
|||||||
SearchIntoUsers=Users
|
SearchIntoUsers=Users
|
||||||
SearchIntoProductsOrServices=Products or services
|
SearchIntoProductsOrServices=Products or services
|
||||||
SearchIntoProjects=Projects
|
SearchIntoProjects=Projects
|
||||||
|
SearchIntoTasks=Tasks
|
||||||
SearchIntoCustomerInvoices=Customer invoices
|
SearchIntoCustomerInvoices=Customer invoices
|
||||||
SearchIntoSupplierInvoices=Supplier invoices
|
SearchIntoSupplierInvoices=Supplier invoices
|
||||||
SearchIntoCustomerOrders=Customer orders
|
SearchIntoCustomerOrders=Customer orders
|
||||||
|
|||||||
@ -12,6 +12,7 @@ RequestsOpened=Open price requests
|
|||||||
SupplierProposalArea=Supplier proposals area
|
SupplierProposalArea=Supplier proposals area
|
||||||
SupplierProposalShort=Supplier proposal
|
SupplierProposalShort=Supplier proposal
|
||||||
SupplierProposals=Supplier proposals
|
SupplierProposals=Supplier proposals
|
||||||
|
SupplierProposalsShort=Supplier proposals
|
||||||
NewAskPrice=New price request
|
NewAskPrice=New price request
|
||||||
ShowSupplierProposal=Show price request
|
ShowSupplierProposal=Show price request
|
||||||
AddSupplierProposal=Create a price request
|
AddSupplierProposal=Create a price request
|
||||||
|
|||||||
@ -38,7 +38,11 @@ $id=GETPOST('id','int');
|
|||||||
|
|
||||||
$search_all=GETPOST('search_all');
|
$search_all=GETPOST('search_all');
|
||||||
$search_project=GETPOST('search_project');
|
$search_project=GETPOST('search_project');
|
||||||
if (! isset($_GET['search_projectstatus']) && ! isset($_POST['search_projectstatus'])) $search_projectstatus=1;
|
if (! isset($_GET['search_projectstatus']) && ! isset($_POST['search_projectstatus']))
|
||||||
|
{
|
||||||
|
if ($search_all != '') $search_projectstatus=-1;
|
||||||
|
else $search_projectstatus=1;
|
||||||
|
}
|
||||||
else $search_projectstatus=GETPOST('search_projectstatus');
|
else $search_projectstatus=GETPOST('search_projectstatus');
|
||||||
$search_project_ref=GETPOST('search_project_ref');
|
$search_project_ref=GETPOST('search_project_ref');
|
||||||
$search_project_title=GETPOST('search_project_title');
|
$search_project_title=GETPOST('search_project_title');
|
||||||
|
|||||||
@ -2608,7 +2608,7 @@ class Societe extends CommonObject
|
|||||||
* @param int $idprof 1,2,3,4 (Exemple: 1=siren,2=siret,3=naf,4=rcs/rm)
|
* @param int $idprof 1,2,3,4 (Exemple: 1=siren,2=siret,3=naf,4=rcs/rm)
|
||||||
* @param Societe $soc Objet societe
|
* @param Societe $soc Objet societe
|
||||||
* @return int <=0 if KO, >0 if OK
|
* @return int <=0 if KO, >0 if OK
|
||||||
* TODO not in business class
|
* TODO better to have this in a lib than into a business class
|
||||||
*/
|
*/
|
||||||
function id_prof_check($idprof,$soc)
|
function id_prof_check($idprof,$soc)
|
||||||
{
|
{
|
||||||
@ -2720,27 +2720,38 @@ class Societe extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoi url de verification d'un identifiant professionnal
|
* Return an url to check online a professional id or empty string
|
||||||
*
|
*
|
||||||
* @param int $idprof 1,2,3,4 (Exemple: 1=siren,2=siret,3=naf,4=rcs/rm)
|
* @param int $idprof 1,2,3,4 (Example: 1=siren,2=siret,3=naf,4=rcs/rm)
|
||||||
* @param Societe $soc Objet societe
|
* @param Societe $thirdparty Object thirdparty
|
||||||
* @return string url ou chaine vide si aucune url connue
|
* @return string Url or empty string if no URL known
|
||||||
* TODO not in business class
|
* TODO better in a lib than into business class
|
||||||
*/
|
*/
|
||||||
function id_prof_url($idprof,$soc)
|
function id_prof_url($idprof,$thirdparty)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs,$hookmanager;
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLEPROFIDRULES)) return '';
|
|
||||||
|
|
||||||
$url='';
|
$url='';
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('idprofurl'));
|
||||||
|
$parameters=array('idprof'=>$idprof, 'company'=>$thirdparty);
|
||||||
|
$reshook=$hookmanager->executeHooks('getIdProfUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if (empty($reshook))
|
||||||
|
{
|
||||||
|
if (! empty($conf->global->MAIN_DISABLEPROFIDRULES)) return '';
|
||||||
|
|
||||||
if ($idprof == 1 && $soc->country_code == 'FR') $url='http://www.societe.com/cgi-bin/recherche?rncs='.$soc->idprof1;
|
if ($idprof == 1 && $thirdparty->country_code == 'FR') $url='http://www.societe.com/cgi-bin/search?champs='.$thirdparty->idprof1; // See also http://avis-situation-sirene.insee.fr/
|
||||||
if ($idprof == 1 && ($soc->country_code == 'GB' || $soc->country_code == 'UK')) $url='http://www.companieshouse.gov.uk/WebCHeck/findinfolink/';
|
if ($idprof == 1 && ($thirdparty->country_code == 'GB' || $thirdparty->country_code == 'UK')) $url='http://www.companieshouse.gov.uk/WebCHeck/findinfolink/';
|
||||||
if ($idprof == 1 && $soc->country_code == 'ES') $url='http://www.e-informa.es/servlet/app/portal/ENTP/screen/SProducto/prod/ETIQUETA_EMPRESA/nif/'.$soc->idprof1;
|
if ($idprof == 1 && $thirdparty->country_code == 'ES') $url='http://www.e-informa.es/servlet/app/portal/ENTP/screen/SProducto/prod/ETIQUETA_EMPRESA/nif/'.$thirdparty->idprof1;
|
||||||
if ($idprof == 1 && $soc->country_code == 'IN') $url='http://www.tinxsys.com/TinxsysInternetWeb/dealerControllerServlet?tinNumber='.$soc->idprof1.';&searchBy=TIN&backPage=searchByTin_Inter.jsp';
|
if ($idprof == 1 && $thirdparty->country_code == 'IN') $url='http://www.tinxsys.com/TinxsysInternetWeb/dealerControllerServlet?tinNumber='.$thirdparty->idprof1.';&searchBy=TIN&backPage=searchByTin_Inter.jsp';
|
||||||
|
|
||||||
if ($url) return '<a target="_blank" href="'.$url.'">['.$langs->trans("Check").']</a>';
|
if ($url) return '<a target="_blank" href="'.$url.'">'.$langs->trans("Check").'</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $hookmanager->resPrint;
|
||||||
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 369 B |
@ -34,8 +34,9 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
|||||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||||
if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); // Disable "main.inc.php" hooks
|
if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); // Disable "main.inc.php" hooks
|
||||||
// Pour autre que companylogo, on charge environnement + info issus de logon comme le user
|
// Some value of modulepart can be used to get resources that are public so no login are required.
|
||||||
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
|
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
|
||||||
|
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Header empty
|
* Header empty
|
||||||
|
|||||||
@ -137,6 +137,8 @@ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (GETPOST('refreshsite')) $pageid=0; // If we change the site, we reset the pageid.
|
||||||
|
|
||||||
// Add page
|
// Add page
|
||||||
if ($action == 'add')
|
if ($action == 'add')
|
||||||
{
|
{
|
||||||
@ -321,7 +323,7 @@ if ($action == 'updatemeta')
|
|||||||
$res = $objectpage->fetch($pageid, $object->fk_website);
|
$res = $objectpage->fetch($pageid, $object->fk_website);
|
||||||
if ($res > 0)
|
if ($res > 0)
|
||||||
{
|
{
|
||||||
$objectpage->pageurl = GETPOST('WEBSITE_PAGENAME');
|
$objectpage->pageurl = GETPOST('WEBSITE_PAGENAME');
|
||||||
$objectpage->title = GETPOST('WEBSITE_TITLE');
|
$objectpage->title = GETPOST('WEBSITE_TITLE');
|
||||||
$objectpage->description = GETPOST('WEBSITE_DESCRIPTION');
|
$objectpage->description = GETPOST('WEBSITE_DESCRIPTION');
|
||||||
$objectpage->keywords = GETPOST('WEBSITE_KEYWORDS');
|
$objectpage->keywords = GETPOST('WEBSITE_KEYWORDS');
|
||||||
@ -476,7 +478,7 @@ if (count($object->records) > 0)
|
|||||||
}
|
}
|
||||||
$out.='</select>';
|
$out.='</select>';
|
||||||
print $out;
|
print $out;
|
||||||
print '<input type="submit" class="button" name="refresh" value="'.$langs->trans("Refresh").'">';
|
print '<input type="submit" class="button" name="refreshsite" value="'.$langs->trans("Refresh").'">';
|
||||||
|
|
||||||
if ($website)
|
if ($website)
|
||||||
{
|
{
|
||||||
@ -529,22 +531,31 @@ if (count($object->records) > 0)
|
|||||||
$out.='<select name="pageid">';
|
$out.='<select name="pageid">';
|
||||||
if ($atleastonepage)
|
if ($atleastonepage)
|
||||||
{
|
{
|
||||||
|
if (empty($pageid) && $action != 'create') // Page id is not defined, we try to take one
|
||||||
|
{
|
||||||
|
$firstpageid=0;$homepageid=0;
|
||||||
|
foreach($array as $key => $valpage)
|
||||||
|
{
|
||||||
|
if (empty($firstpageid)) $firstpageid=$valpage->id;
|
||||||
|
if ($object->fk_default_home && $key == $object->fk_default_home) $homepageid=$valpage->id;
|
||||||
|
}
|
||||||
|
$pageid=$homepageid?$homepageid:$firstpageid; // We choose home page and if not defined yet, we take first page
|
||||||
|
}
|
||||||
|
|
||||||
foreach($array as $key => $valpage)
|
foreach($array as $key => $valpage)
|
||||||
{
|
{
|
||||||
if (empty($pageid) && $action != 'create') $pageid=$valpage->id;
|
|
||||||
|
|
||||||
$out.='<option value="'.$key.'"';
|
$out.='<option value="'.$key.'"';
|
||||||
if ($pageid > 0 && $pageid == $key) $out.=' selected'; // To preselect a value
|
if ($pageid > 0 && $pageid == $key) $out.=' selected'; // To preselect a value
|
||||||
$out.='>';
|
$out.='>';
|
||||||
$out.=$valpage->title;
|
$out.=$valpage->title;
|
||||||
if ($object->fk_default_home && $key == $object->fk_default_home) $out.=' ('.$langs->trans("HomePage").')';
|
if ($object->fk_default_home && $key == $object->fk_default_home) $out.=' ('.$langs->trans("HomePage").')';
|
||||||
$out.='</option>';
|
$out.='</option>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else $out.='<option value="-1"> </option>';
|
else $out.='<option value="-1"> </option>';
|
||||||
$out.='</select>';
|
$out.='</select>';
|
||||||
print $out;
|
print $out;
|
||||||
print '<input type="submit" class="button" name="refresh" value="'.$langs->trans("Refresh").'"'.($atleastonepage?'':' disabled="disabled"').'>';
|
print '<input type="submit" class="button" name="refreshpage" value="'.$langs->trans("Refresh").'"'.($atleastonepage?'':' disabled="disabled"').'>';
|
||||||
print '<input type="submit" class="buttonDelete" name="delete" value="'.$langs->trans("Delete").'"'.($atleastonepage?'':' disabled="disabled"').'>';
|
print '<input type="submit" class="buttonDelete" name="delete" value="'.$langs->trans("Delete").'"'.($atleastonepage?'':' disabled="disabled"').'>';
|
||||||
//print $form->selectarray('page', $array);
|
//print $form->selectarray('page', $array);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user