diff --git a/.tx/config b/.tx/config index c4ec45cd3b2..010227f6e61 100644 --- a/.tx/config +++ b/.tx/config @@ -170,7 +170,7 @@ source_file = htdocs/langs/en_US/interventions.lang source_lang = en_US type = MOZILLAPROPERTIES -[dolibarr.languages] +[dolibarr.languages-not-res] file_filter = htdocs/langs//languages.lang source_file = htdocs/langs/en_US/languages.lang source_lang = en_US diff --git a/build/exe/doliwamp/Languages/MyFrench.isl b/build/exe/doliwamp/Languages/MyFrench.isl index 0fd71f96bfb..6c1b859a318 100644 --- a/build/exe/doliwamp/Languages/MyFrench.isl +++ b/build/exe/doliwamp/Languages/MyFrench.isl @@ -21,10 +21,10 @@ TechnicalParameters=Param IfFirstInstall=S'il s'agit de la première installation, merci de spécifier ces quelques paramètres techniques. Si vous ne les comprennez pas, êtes non sûr, ou procédez à une mise à jour, laissez les champs avec les valeurs proposées par défaut. -; WARNING !!! STRINGS FOR THIS 4 STRINGS MUST BE LOWER THAN 60 CHARACTERS -SMTPServer=Serveur SMTP (le votre ou celui de votre FAI, première installation uniquement) : -ApachePort=Port Apache (première installation uniquement, le choix standard est 80) : -MySqlPort=Port Mysql (première installation uniquement, le choix standard est 3306) : +; WARNING !!! STRINGS FOR THIS 4 STRINGS MUST BE LOWER THAN 70 CHARACTERS +SMTPServer=Serveur SMTP (le votre ou de votre FAI, première installation uniquement): +ApachePort=Port Apache (première installation uniquement, le choix standard est 80): +MySqlPort=Port Mysql (première installation uniquement, le choix standard est 3306): MySqlPassword=Mot de passe serveur+base MySql de root (première installation uniquement): FailedToDeleteLock=Echec de la suppression du fichier %1/www/dolibarr/install.lock. Vous pouvez ignorer l'avertissement mais il est possible que vous deviez le supprimer manuellement plus tard. Dans ce cas, cela vous sera signalé. Cliquez sur OK pour continuer... diff --git a/build/exe/doliwamp/doliwamp.bmp b/build/exe/doliwamp/doliwamp.bmp index 52b1320d111..3414e100306 100644 Binary files a/build/exe/doliwamp/doliwamp.bmp and b/build/exe/doliwamp/doliwamp.bmp differ diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index cc5235b58c2..dfe7febf2db 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -99,13 +99,13 @@ Source: "build\exe\doliwamp\builddemosslfiles.bat.install"; DestDir: "{app}\"; F Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversion; ; PhpMyAdmin, Apache, Php, Mysql ; Put here path of Wampserver applications -; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45 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 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe) +; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45 +; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45 +; Value ???: apache 2.4.19, php 5.5.12, mysql 5.0.45 instead of 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe) Source: "C:\Program Files\Wamp\apps\phpmyadmin4.1.14\*.*"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange" Source: "C:\Program Files\Wamp\bin\apache\apache2.4.9\*.*"; DestDir: "{app}\bin\apache\apache2.4.9"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log" Source: "C:\Program Files\Wamp\bin\php\php5.5.12\*.*"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log" -Source: "C:\Program Files\Wamp\bin\mysql\mysql5.6.17\*.*"; DestDir: "{app}\bin\mysql\mysql5.6.17"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe" +Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe" ; Mysql data files (does not overwrite if exists) Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db" ; Dolibarr @@ -119,7 +119,7 @@ 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\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\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.6.17"; Flags: ignoreversion; +Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.45"; 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\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion; @@ -146,6 +146,12 @@ Name: "{userdesktop}\Dolibarr Help center"; Filename: "{app}\rundolihelp.bat"; W ;Name: "{userstartup}\DoliWamp server"; Filename: "{app}\startdoliwamp.bat"; WorkingDir: "{app}"; Flags: runminimized; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico +[Registry] +; Add "run as admin" flag. Same than command line: reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "" /t REG_SZ /d RUNASADMIN +Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; +Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; + + [Code] //variables globales @@ -198,7 +204,7 @@ begin //version des applis, a modifier pour chaque version de WampServer 2 apacheVersion := '2.4.9'; phpVersion := '5.5.12' ; - mysqlVersion := '5.6.17'; + mysqlVersion := '5.0.45'; phpmyadminVersion := '4.1.14'; smtpServer := 'localhost'; @@ -262,6 +268,7 @@ begin if firstinstall then begin + // False means it's not a password edit Page.Add(CustomMessage('SMTPServer'), False); Page.Add(CustomMessage('ApachePort'), False); Page.Add(CustomMessage('MySqlPort'), False); @@ -269,6 +276,7 @@ begin end else begin + // False means it's not a password edit Page.Add(CustomMessage('SMTPServer'), False); Page.Add(CustomMessage('ApachePort'), False); Page.Add(CustomMessage('MySqlPort'), False); @@ -308,8 +316,7 @@ function NextButtonClick(CurPageID: Integer): Boolean; var myResult: Integer; var res: Boolean; var paramok: Boolean; -var datadirold: String; -var datadirnew: String; +var datadir: String; var exedirold: String; var exedirnew: String; var themessage: String; @@ -328,14 +335,13 @@ begin winPath := ExpandConstant('{win}'); pathWithSlashes := path; StringChange (pathWithSlashes, '\','/'); - datadirold := pathWithSlashes+'/bin/mysql/mysql5.6.17/data'; - datadirnew := pathWithSlashes+'/bin/mysql/data'; - exedirold := pathWithSlashes+'/bin/mysql/mysql5.6.17'; - exedirnew := pathWithSlashes+'/bin/mysql/mysql5.6.17'; + datadir := pathWithSlashes+'/bin/mysql/data'; + exedirold := pathWithSlashes+'/bin/mysql/mysql5.0.45'; + exedirnew := pathWithSlashes+'/bin/mysql/mysql5.0.45'; //---------------------------------------------- - // Test if VC11Redist has been installed + // Test if msvcr110 DLL has been installed //---------------------------------------------- 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 @@ -995,7 +1001,7 @@ Filename: "{app}\rundoliwamp.bat"; Description: {cm:LaunchNow}; Flags: shellexec [UninstallDelete] Type: files; Name: "{app}\*.*" -Type: files; Name: "{app}\bin\mysql\mysql5.6.17\*.*" +Type: files; Name: "{app}\bin\mysql\mysql5.0.45\*.*" Type: filesandordirs; Name: "{app}\alias" Type: filesandordirs; Name: "{app}\apps" Type: filesandordirs; Name: "{app}\bin\apache" diff --git a/build/exe/doliwamp/doliwampsmall.bmp b/build/exe/doliwamp/doliwampsmall.bmp index f19e98fd19a..f4d51aa0229 100644 Binary files a/build/exe/doliwamp/doliwampsmall.bmp and b/build/exe/doliwamp/doliwampsmall.bmp differ diff --git a/build/exe/doliwamp/install_services.bat.install b/build/exe/doliwamp/install_services.bat.install index 536a984e26d..5ad43827f86 100644 --- a/build/exe/doliwamp/install_services.bat.install +++ b/build/exe/doliwamp/install_services.bat.install @@ -16,9 +16,9 @@ REM reg add HKLM\SYSTEM\CurrentControlSet\Services\doliwampapache /V Start /t RE REM Mysql 5.0- REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --install-manual doliwampmysqld -REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --install doliwampmysqld +.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --install doliwampmysqld REM Mysql 5.1+ -.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --install doliwampmysqld +REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --install doliwampmysqld echo ---- End script >> doliwamp.log 2>>&1 diff --git a/build/exe/doliwamp/my.ini.install b/build/exe/doliwamp/my.ini.install index 885660f648b..e1a9495e20b 100644 --- a/build/exe/doliwamp/my.ini.install +++ b/build/exe/doliwamp/my.ini.install @@ -196,7 +196,7 @@ port=WAMPMYSQLPORT #Path to installation directory. All paths are usually resolved relative to this. -basedir=WAMPROOT/bin/mysql/mysql5.6.17 +basedir=WAMPROOT/bin/mysql/mysqlWAMPMYSQLVERSION #log file log-error=WAMPROOT/logs/mysql.log diff --git a/build/exe/doliwamp/startdoliwamp_manual_donotuse.bat.install b/build/exe/doliwamp/startdoliwamp_manual_donotuse.bat.install index 540f8bc9fbc..c8e33e4620b 100644 --- a/build/exe/doliwamp/startdoliwamp_manual_donotuse.bat.install +++ b/build/exe/doliwamp/startdoliwamp_manual_donotuse.bat.install @@ -12,7 +12,7 @@ start WAMPROOT\bin\apache\apacheWAMPAPACHEVERSION\bin\httpd.exe -f conf\httpd.co echo echo Running Mysql as user process (this process does not return so we use "start") -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 +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.exe --defaults-file=WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\my.ini --console pause \ No newline at end of file diff --git a/build/exe/doliwamp/uninstall_services.bat.install b/build/exe/doliwamp/uninstall_services.bat.install index b8aa5027b01..0f12a29b6e2 100644 --- a/build/exe/doliwamp/uninstall_services.bat.install +++ b/build/exe/doliwamp/uninstall_services.bat.install @@ -11,9 +11,9 @@ NET STOP doliwampapache NET STOP doliwampmysqld REM Mysql 5.0- -REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --remove doliwampmysqld +.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --remove doliwampmysqld REM Mysql 5.1+ -.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --remove doliwampmysqld +REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --remove doliwampmysqld REM wampmanager.exe -quit -id={doliwampserver} echo ---- End script >> doliwamp.log 2>>&1 diff --git a/dev/codesniffer/ruleset.xml b/dev/codesniffer/ruleset.xml index 7b887113d90..2a58094717f 100644 --- a/dev/codesniffer/ruleset.xml +++ b/dev/codesniffer/ruleset.xml @@ -187,7 +187,9 @@ 0 - + + 0 + 0 diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index 09c416a7fd2..22432433334 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -90,7 +90,7 @@ class modMyModule extends DolibarrModules // 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx) // 'css' => array('/mymodule/css/mymodule.css.php'), // Set this to relative path of css file if module has its own css file // 'js' => array('/mymodule/js/mymodule.js'), // Set this to relative path of js file if module must load a js on all pages - // 'hooks' => array('hookcontext1','hookcontext2') // Set here all hooks context managed by module + // 'hooks' => array('hookcontext1','hookcontext2',...) // Set here all hooks context managed by module. You can also set hook context 'all' // 'dir' => array('output' => 'othermodulename'), // To force the default directories names // 'workflow' => array('WORKFLOW_MODULE1_YOURACTIONTYPE_MODULE2'=>array('enabled'=>'! empty($conf->module1->enabled) && ! empty($conf->module2->enabled)', 'picto'=>'yourpicto@mymodule')) // Set here all workflow context managed by module // ); diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php index 2858e791ce8..77544eedc30 100644 --- a/dev/skeletons/skeleton_class.class.php +++ b/dev/skeletons/skeleton_class.class.php @@ -35,6 +35,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php'; * Class Skeleton_Class * * Put here description of your class + * * @see CommonObject */ class Skeleton_Class extends CommonObject @@ -228,7 +229,7 @@ class Skeleton_Class extends CommonObject if (count($sqlwhere) > 0) { $sql .= ' WHERE ' . implode(' '.$filtermode.' ', $sqlwhere); } - + if (!empty($sortfield)) { $sql .= $this->db->order($sortfield,$sortorder); } @@ -463,7 +464,7 @@ class Skeleton_Class extends CommonObject $result.= $link . $this->ref . $linkend; return $result; } - + /** * Retourne le libelle du status d'un user (actif, inactif) * @@ -518,8 +519,8 @@ class Skeleton_Class extends CommonObject if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5'); } } - - + + /** * Initialise object with example values * Id must be 0 if object instance is a specimen diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 04f66a47026..ddc80e00571 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -142,7 +142,7 @@ class AccountancyExport case self::$EXPORT_TYPE_COGILOG : $this->exportCogilog($TData); break; - default : + default: $this->errors[] = $langs->trans('accountancy_error_modelnotfound'); break; } @@ -156,6 +156,8 @@ class AccountancyExport * @return void */ public function exportNormal($objectLines) { + global $conf; + foreach ( $objectLines as $line ) { // Std export $date = dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE); diff --git a/htdocs/adherents/class/cotisation.class.php b/htdocs/adherents/class/cotisation.class.php index 786ba79c7f3..9fe26727c25 100644 --- a/htdocs/adherents/class/cotisation.class.php +++ b/htdocs/adherents/class/cotisation.class.php @@ -190,11 +190,12 @@ class Cotisation extends CommonObject */ function delete($user) { + $accountline=new AccountLine($this->db); + // It subscription is linked to a bank transaction, we get it - if ($this->fk_bank) + if ($this->fk_bank > 0) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; - $accountline=new AccountLine($this->db); $result=$accountline->fetch($this->fk_bank); } diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 8636232b405..60e132f3051 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1008,13 +1008,13 @@ class Categorie extends CommonObject } /** - * Affiche contenu de $this->cats + * Display content of $this->cats * * @return void */ function debug_cats() { - // Affiche $this->cats + // Display $this->cats foreach($this->cats as $key => $val) { print 'id: '.$this->cats[$key]['id']; @@ -1029,11 +1029,11 @@ class Categorie extends CommonObject /** - * Retourne toutes les categories + * Returns all categories * * @param int $type Type of category * @param boolean $parent Just parent categories if true - * @return array Tableau d'objet Categorie + * @return array Table of Object Category */ function get_all_categories($type=null, $parent=false) { @@ -1064,9 +1064,9 @@ class Categorie extends CommonObject } /** - * Retourne le nombre total de categories + * Returns total number of categories * - * @return int Nombre de categories + * @return int Number of categories * @deprecated function not used ? */ function get_nb_categories() @@ -1133,7 +1133,7 @@ class Categorie extends CommonObject } /** - * Retourne les categories de premier niveau (qui ne sont pas filles) + * Returns the top level categories (which are not girls) * * @param int $type Type of category * @return array @@ -1144,8 +1144,8 @@ class Categorie extends CommonObject } /** - * Retourne les chemin de la categorie, avec les noms des categories - * separes par $sep (" >> " par defaut) + * Returns the path of the category, with the names of the categories + * separated by $sep (" >> " by default) * * @param string $sep Separator * @param string $url Url @@ -1205,7 +1205,7 @@ class Categorie extends CommonObject /** - * Retourne un tableau contenant la liste des categories meres + * Returns an array containing the list of parent categories * * @return int|array <0 KO, array OK */ @@ -1239,8 +1239,8 @@ class Categorie extends CommonObject } /** - * Retourne dans un tableau tous les chemins possibles pour arriver a la categorie - * en partant des categories principales, representes par des tableaux de categories + * Returns in a table all possible paths to get to the category + * starting with the major categories represented by Tables of categories * * @return array */ @@ -1324,8 +1324,8 @@ class Categorie extends CommonObject /** - * Retourne les categories dont l'id ou le nom correspond - * ajoute des wildcards au nom sauf si $exact = true + * Returns categories whose id or name match + * add wildcards in the name unless $exact = true * * @param int $id Id * @param string $nom Name diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 443b6144e5a..73717696dc7 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -673,9 +673,9 @@ if ($action == 'create') dol_fiche_head(); print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; // Other attributes $parameters=array(); @@ -689,11 +689,11 @@ if ($action == 'create') print '

'; print '
'.$langs->trans("MailTitle").'
'.$langs->trans("MailFrom").'
'.$langs->trans("MailErrorsTo").'
'.$langs->trans("MailTitle").'
'.$langs->trans("MailFrom").'
'.$langs->trans("MailErrorsTo").'
'; - print ''; - print ''; + print ''; - print ''; + print ''; print ''; @@ -995,7 +995,7 @@ else print '
'.$langs->trans("MailTopic").'
'.$langs->trans("BackgroundColorByDefault").''; + print '
'.$langs->trans("MailTopic").'
'.$langs->trans("BackgroundColorByDefault").''; print $htmlother->selectColor($_POST['bgcolor'],'bgcolor','new_mailing',0); print '
'.$langs->trans("MailMessage").'
'; + print '
'.$langs->trans("MailMessage").'
'; print '
'.$langs->trans("CommonSubstitutions").':
'; foreach($object->substitutionarray as $key => $val) { @@ -792,7 +792,7 @@ else $linkback = ''.$langs->trans("BackToList").''; - print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").''; print $form->showrefnav($object,'id', $linkback); print '
'; // Subject - print ''; + print ''; // Joined files print '';*/ // Message - print ''; + print ''; print ''; @@ -1114,9 +1114,9 @@ else print '
'.$langs->trans("MailTopic").''.$object->sujet.'
'.$langs->trans("MailTopic").''.$object->sujet.'
'.$langs->trans("MailFile").''; @@ -1021,7 +1021,7 @@ else print '
'.$langs->trans("MailMessage").'
'; + print '
'.$langs->trans("MailMessage").'
'; print '
'.$langs->trans("CommonSubstitutions").':
'; foreach($object->substitutionarray as $key => $val) { @@ -1055,7 +1055,7 @@ else $linkback = ''.$langs->trans("BackToList").''; - print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").''; print $form->showrefnav($object,'id', $linkback); print '
'; // Subject - print ''; + print ''; - $trackid=''; // TODO To avoid conflicts with 2 mass emailing, we shoul set a trackid here, even if we use another one into email header. + $trackid=''; // TODO To avoid conflicts with 2 mass emailing, we should set a trackid here, even if we use another one into email header. dol_init_file_process($upload_dir, $trackid); // Joined files @@ -1156,12 +1156,12 @@ else print ''; // Background color - print ''; // Message - print ''; + print ''; print ''; - print ''; + print ''; - print ''; + print ''; // Errors to - print ''; // Status - print ''; // Nb of distinct emails - print ''; } print ''; - } $db->free($resql); diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 64c52764599..4bbb3def843 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -70,6 +70,11 @@ $date_end = dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endda $date_starty = dol_mktime(0,0,0,$_REQUEST["date_start_delymonth"],$_REQUEST["date_start_delyday"],$_REQUEST["date_start_delyyear"]); // Date for local PHP server $date_endy = dol_mktime(23,59,59,$_REQUEST["date_end_delymonth"],$_REQUEST["date_end_delyday"],$_REQUEST["date_end_delyyear"]); +$extrafields = new ExtraFields($db); + +// fetch optionals attributes and labels +$extralabels=$extrafields->fetch_name_optionals_label('facture'); + if ($action == 'create') { if (! is_array($selected)) @@ -174,6 +179,9 @@ if (($action == 'create' || $action == 'add') && !$error) $object->remise_absolue = $_POST['remise_absolue']; $object->remise_percent = $_POST['remise_percent']; + $ret = $extrafields->setOptionalsFromPost($extralabels,$object); + if ($ret < 0) $error++; + if ($_POST['origin'] && $_POST['originid']) { $object->origin = $_POST['origin']; @@ -464,6 +472,12 @@ if ($action == 'create' && !$error) $parameters=array('objectsrc' => $objectsrc, 'idsrc' => $listoforders, 'colspan' => ' colspan="3"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + $object=new Facture($db); + print $object->showOptionals($extrafields,'edit'); + } + // Modele PDF print ''; print ''; print ''; // Ref customer @@ -3905,8 +3905,8 @@ else if ($id > 0 || ! empty($ref)) if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) || ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id)) || ($object->type == Facture::TYPE_DEPOSIT && empty($discount->id))) - && ($object->statut == 2 || $object->statut == 3) - && $user->rights->facture->creer) // A paid invoice (partially or completely) + && ($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) { if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice { diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 989aa6a6692..0e9c6874103 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -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_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_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 ($month > 0) { diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 32f0790fd89..1a362d143dc 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -794,11 +794,7 @@ class ExtraFields // 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value $keyList=(empty($InfoFieldList[2])?'rowid':$InfoFieldList[2].' as rowid'); - if (count($InfoFieldList) > 3 && ! empty($InfoFieldList[3])) - { - list($parentName, $parentField) = explode('|', $InfoFieldList[3]); - $keyList.= ', '.$parentField; - } + if (count($InfoFieldList) > 4 && ! empty($InfoFieldList[4])) { if (strpos($InfoFieldList[4], 'extra.') !== false) @@ -808,6 +804,11 @@ class ExtraFields $keyList=$InfoFieldList[2].' as rowid'; } } + if (count($InfoFieldList) > 3 && ! empty($InfoFieldList[3])) + { + list($parentName, $parentField) = explode('|', $InfoFieldList[3]); + $keyList.= ', '.$parentField; + } $fields_label = explode('|',$InfoFieldList[1]); if (is_array($fields_label)) diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index 484b6518f77..1a7425b0a55 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2016 Laurent Destailleur * Copyright (C) 2010-2014 Regis Houssin * Copyright (C) 2010-2011 Juanjo Menent * @@ -87,8 +87,7 @@ class HookManager { if (is_array($hooks)) $arrayhooks=$hooks; // New system else $arrayhooks=explode(':',$hooks); // Old system (for backward compatibility) - - if (in_array($context,$arrayhooks)) // We instantiate action class only if hook is required + if (in_array($context,$arrayhooks) || in_array('all',$arrayhooks)) // We instantiate action class only if hook is required { $path = '/'.$module.'/class/'; $actionfile = 'actions_'.$module.'.class.php'; @@ -143,6 +142,7 @@ class HookManager 'formObjectOptions', 'formattachOptions', 'formBuilddocLineOptions', + 'getIdProfUrl', 'moveUploadedFile', 'pdf_build_address', 'pdf_writelinedesc', @@ -247,11 +247,7 @@ class HookManager } } - // TODO remove this. When there is something to print for an output hook, ->resPrint is filled. - //if ($hooktype == 'output') return $this->resPrint; - //if ($hooktype == 'returnvalue') return $result; return ($error?-1:$resaction); } } - diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d4267eccfb1..507f45a12f8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5582,10 +5582,11 @@ class Form * @param string $moreparam More param to add in nav link url. * @param int $nodbprefix Do not include DB prefix to forge table name * @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 */ - 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; @@ -5604,7 +5605,7 @@ class Form //print "xx".$previous_ref."x".$next_ref; $ret.='
'; - $ret.='
'.$morehtmlleft.'
'; + if ($morehtmlleft) $ret.='
'.$morehtmlleft.'
'; $ret.='
'; @@ -5624,6 +5625,8 @@ class Form } $ret.='
'; + if ($morehtmlright) $ret.='
'.$morehtmlright.'
'; + if ($previous_ref || $next_ref || $morehtml) { $ret.=''; } - if ($morehtmlright) $ret.='
'.$morehtmlright.'
'; + if ($morehtmlstatus) $ret.='
'.$morehtmlstatus.'
'; $ret.='
'; return $ret; diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 06bd6dc0c40..9ca6196b018 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -161,6 +161,7 @@ class Translate { global $conf,$db; + // Load $this->tab_translate[] from database if (count($this->tab_translate) == 0) $this->loadFromDatabase($db); // Nothing was loaded yet, so we load database. // Check parameters @@ -241,7 +242,7 @@ class Translate $tmparray=dol_getcache($usecachekey); if (is_array($tmparray) && count($tmparray)) { - $this->tab_translate+=$tmparray; // Faster than array_merge($tmparray,$this->tab_translate). Note: If a valuer already exists into tab_translate, value into tmparaay is not added. + $this->tab_translate+=$tmparray; // Faster than array_merge($tmparray,$this->tab_translate). Note: If a value already exists into tab_translate, value into tmparaay is not added. //print $newdomain."\n"; //var_dump($this->tab_translate); if ($alt == 2) $fileread=1; @@ -261,7 +262,8 @@ class Translate { $tab=explode('=',$line,2); $key=trim($tab[0]); - //print "Domain=$domain, found a string for $tab[0] with value $tab[1]
"; + //if ($domain == 'orders') print "Domain=$domain, found a string for $tab[0] with value $tab[1]. Currently in cache ".$this->tab_translate[$key]."
"; + //if ($key == 'Order') print "Domain=$domain, found a string for key=$key=$tab[0] with value $tab[1]. Currently in cache ".$this->tab_translate[$key]."
"; if (empty($this->tab_translate[$key]) && isset($tab[1])) // If translation was already found, we must not continue, even if MAIN_FORCELANGDIR is set (MAIN_FORCELANGDIR is to replace lang dir, not to overwrite entries) { $value=trim(preg_replace('/\\n/',"\n",$tab[1])); @@ -278,6 +280,7 @@ class Translate else { $this->tab_translate[$key]=$value; + //if ($domain == 'orders') print "$tab[0] value $value
"; if ($usecachekey) $tabtranslatedomain[$key]=$value; // To save lang content in cache } } diff --git a/htdocs/core/filemanagerdol/browser/default/browser.php b/htdocs/core/filemanagerdol/browser/default/browser.php index 15e44621bcf..f8262998049 100644 --- a/htdocs/core/filemanagerdol/browser/default/browser.php +++ b/htdocs/core/filemanagerdol/browser/default/browser.php @@ -133,26 +133,26 @@ oConnector.CheckError = function( responseXml ) switch ( iErrorNumber ) { - case 0 : - break ; - case 1 : // Custom error. Message placed in the "text" attribute. + case 0: + break; + case 1: // Custom error. Message placed in the "text" attribute. alert( oErrorNode.attributes.getNamedItem('text').value ); - break ; - case 101 : + break; + case 101: alert( 'Folder already exists' ); - break ; - case 102 : + break; + case 102: alert( 'Invalid folder name' ); - break ; - case 103 : + break; + case 103: alert( 'You have no permissions to create the folder' ); - break ; - case 110 : + break; + case 110: alert( 'Unknown error creating folder' ); - break ; - default : + break; + default: alert( 'Error on your request. Error number: ' + iErrorNumber ); - break ; + break; } } return iErrorNumber ; diff --git a/htdocs/core/filemanagerdol/browser/default/frmcreatefolder.php b/htdocs/core/filemanagerdol/browser/default/frmcreatefolder.php index 44b00b2154c..6f90c0c36ad 100644 --- a/htdocs/core/filemanagerdol/browser/default/frmcreatefolder.php +++ b/htdocs/core/filemanagerdol/browser/default/frmcreatefolder.php @@ -91,24 +91,24 @@ function CreateFolderCallBack( fckXml ) switch ( iErrorNumber ) { - case 0 : + case 0: window.parent.frames['frmResourcesList'].Refresh(); - break ; - case 101 : + break; + case 101: alert( 'Folder already exists' ); - break ; - case 102 : + break; + case 102: alert( 'Invalid folder name' ); - break ; - case 103 : + break; + case 103: alert( 'You have no permissions to create the folder' ); - break ; - case 110 : + break; + case 110: alert( 'Unknown error creating folder' ); - break ; - default : + break; + default: alert( 'Error creating folder. Error number: ' + iErrorNumber ); - break ; + break; } */ } diff --git a/htdocs/core/filemanagerdol/browser/default/frmupload.php b/htdocs/core/filemanagerdol/browser/default/frmupload.php index dd58eded713..10575586cec 100644 --- a/htdocs/core/filemanagerdol/browser/default/frmupload.php +++ b/htdocs/core/filemanagerdol/browser/default/frmupload.php @@ -95,22 +95,22 @@ function OnUploadCompleted( errorNumber, data ) switch ( errorNumber ) { - case 0 : + case 0: window.parent.frames['frmResourcesList'].Refresh(); - break ; - case 1 : // Custom error. + break; + case 1: // Custom error. alert( data ); - break ; - case 201 : + break; + case 201: window.parent.frames['frmResourcesList'].Refresh(); alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + data + '"' ); - break ; - case 202 : + break; + case 202: alert( 'Invalid file' ); - break ; - default : + break; + default: alert( 'Error on file upload. Error number: ' + errorNumber ); - break ; + break; } } diff --git a/htdocs/core/filemanagerdol/connectors/php/commands.php b/htdocs/core/filemanagerdol/connectors/php/commands.php index 3f02b9f39fb..5c8e76a9522 100644 --- a/htdocs/core/filemanagerdol/connectors/php/commands.php +++ b/htdocs/core/filemanagerdol/connectors/php/commands.php @@ -160,14 +160,14 @@ function CreateFolder( $resourceType, $currentFolder ) switch ( $sErrorMsg ) { - case '' : + case '': $sErrorNumber = '0' ; - break ; + break; case 'Invalid argument' : case 'No such file or directory' : $sErrorNumber = '102' ; // Path too long. break ; - default : + default: $sErrorNumber = '110' ; break ; } diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 31289eaca3b..7ab1a53d230 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -606,8 +606,8 @@ function clean_url($url,$http=1) * Returns an email value with obfuscated parts. * * @param string $mail Email - * @param string $replace Replacement character (defaul : *) - * @param int $nbreplace Number of replacement character (default : 8) + * @param string $replace Replacement character (defaul: *) + * @param int $nbreplace Number of replacement character (default: 8) * @param int $nbdisplaymail Number of character unchanged (default: 4) * @param int $nbdisplaydomain Number of character unchanged of domain (default: 3) * @param bool $displaytld Display tld (default: true) diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index a00658a9837..fb0d229f6b6 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -434,6 +434,7 @@ class doc_generic_task_odt extends ModelePDFTask } $project= new Project($this->db); $project->fetch($object->fk_project); + $project->fetch_thirdparty(); $dir = $conf->projet->dir_output. "/" . $project->ref. "/"; $objectref = dol_sanitizeFileName($object->ref); @@ -468,7 +469,7 @@ class doc_generic_task_odt extends ModelePDFTask dol_mkdir($conf->projet->dir_temp); - $socobject=$object->thirdparty; + $socobject=$project->thirdparty; // Make substitution $substitutionarray=array( diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index 64c78c43c2e..9f894095807 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -85,7 +85,9 @@ $alwayseditable=$extrafields->attribute_alwayseditable[$attrname]; $param=$extrafields->attribute_param[$attrname]; $perms=$extrafields->attribute_perms[$attrname]; $list=$extrafields->attribute_list[$attrname]; -//$ishidden=$extrafields->attribute_hidden[$attrname]; +if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) { + $ishidden=$extrafields->attribute_hidden[$attrname]; +} if((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_array($param)) { diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 4f86be24205..54d5dc05c33 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -958,8 +958,8 @@ class Fichinter extends CommonObject if ($objsoc->fetch($socid)>0) { $this->socid = $objsoc->id; - $this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); - $this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); + //$this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); + //$this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); $this->fk_project = ''; $this->fk_delivery_address = ''; } @@ -987,8 +987,7 @@ class Fichinter extends CommonObject // Add lines because it is not included into create function foreach ($this->lines as $line) { - // TODO - + $this->addline($user, $this->id, $line->desc, $line->datei, $line->duration); } // Hook of thirdparty module @@ -1132,9 +1131,11 @@ class Fichinter extends CommonObject $line = new FichinterLigne($this->db); $line->id = $objp->rowid; $line->desc = $objp->description; + $line->duration = $objp->duree; //For invoicing we calculing hours $line->qty = round($objp->duree/3600,2); $line->date = $this->db->jdate($objp->date); + $line->datei = $this->db->jdate($objp->date); $line->rang = $objp->rang; $line->product_type = 1; diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 81121f3b4bf..5d88dd78977 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Jean-François Ferry * * 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,13 +64,13 @@ $search_status=GETPOST('search_status'); $sall=GETPOST('sall'); $optioncss = GETPOST('optioncss','alpha'); -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers -{ - $search_ref=""; - $search_company=""; - $search_desc=""; - $search_status=""; -} +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('interventionlist')); +$extrafields = new ExtraFields($db); + +// fetch optionals attributes and labels +$extralabels = $extrafields->fetch_name_optionals_label('fichinter'); +$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_'); // List of fields to search into when doing a "search in all" $fieldstosearchall = array( @@ -82,6 +82,52 @@ $fieldstosearchall = array( if (empty($user->socid)) $fieldstosearchall["f.note_private"]="NotePrivate"; if (! empty($conf->global->FICHINTER_DISABLE_DETAILS)) unset($fieldstosearchall['f.description']); +// Definition of fields for list +$arrayfields=array( + 'f.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), + 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1), + 'f.fk_project'=>array('label'=>$langs->trans("Project"), 'checked'=>1), + 'f.fk_contrat'=>array('label'=>$langs->trans("Contract"), 'checked'=>1), + 'f.description'=>array('label'=>$langs->trans("Description"), 'checked'=>1), + 'fd.description'=>array('label'=>"xx", 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS)?1:0), + 'fd.date'=>array('label'=>$langs->trans("Date"), 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS)?1:0), + 'fd.duree'=>array('label'=>$langs->trans("Duration"), 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS)?1:0), + 'f.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), + 'f.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), + 'f.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), +); +// Extra fields +if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +{ + foreach($extrafields->attribute_label as $key => $val) + { + $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]); + } +} + + +/* + * Acions + */ + +$parameters=array(); +$reshook=$hookmanager->executeHooks('doActions',$parameters); // 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 are required to be compatible with all browsers +{ + $search_ref=""; + $search_company=""; + $search_project=""; + $search_contract=""; + $search_desc=""; + $search_status=""; + $search_array_options=array(); +} + + /* * View @@ -94,13 +140,20 @@ llxHeader('', $langs->trans("Intervention")); $sql = "SELECT"; -$sql.= " f.ref, f.rowid as fichid, f.fk_statut, f.description,"; +$sql.= " f.ref, f.rowid as fichid, f.fk_statut, f.description, f.datec as date_creation, f.tms as date_update,"; if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) $sql.= " fd.description as descriptiondetail, fd.date as dp, fd.duree,"; $sql.= " s.nom as name, s.rowid as socid, s.client"; -$sql.= " FROM (".MAIN_DB_PREFIX."societe as s"; -if (! $user->rights->societe->client->voir && empty($socid)) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; -$sql.= ", ".MAIN_DB_PREFIX."fichinter as f)"; +// Add fields from extrafields +foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +// Add fields from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; +$sql.= " FROM ".MAIN_DB_PREFIX."fichinter as f"; +if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."fichinter_extrafields as ef on (f.rowid = ef.fk_object)"; if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."fichinterdet as fd ON fd.fk_fichinter = f.rowid"; +if (! $user->rights->societe->client->voir && empty($socid)) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +$sql.= ", ".MAIN_DB_PREFIX."societe as s"; $sql.= " WHERE f.fk_soc = s.rowid "; $sql.= " AND f.entity = ".$conf->entity; if ($search_ref) { @@ -123,6 +176,23 @@ if ($socid) if ($sall) { $sql .= natural_search(array_keys($fieldstosearchall), $sall); } +// Add where from extra fields +foreach ($search_array_options as $key => $val) +{ + $crit=$val; + $tmpkey=preg_replace('/search_options_/','',$key); + $typ=$extrafields->attribute_type[$tmpkey]; + $mode=0; + if (in_array($typ, array('int','double'))) $mode=1; // Search on a numeric + if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit))) + { + $sql .= natural_search('ef.'.$tmpkey, $crit, $mode); + } +} +// Add where from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; $sql.= $db->order($sortfield,$sortorder); $totalnboflines=0; @@ -149,7 +219,14 @@ if ($result) if ($search_desc) $param.="&search_desc=".urlencode($search_desc); if ($search_status != '' && $search_status > -1) $param.="&search_status=".urlencode($search_status); 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 '
'."\n"; if ($optioncss != '') print ''; print ''; @@ -165,42 +242,120 @@ if ($result) foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall); } - - print '
'.$langs->trans("MailTopic").'
'.$langs->trans("MailTopic").'
'.$langs->trans("BackgroundColorByDefault").''; + print '
'.$langs->trans("BackgroundColorByDefault").''; print $htmlother->selectColor($object->bgcolor,'bgcolor','edit_mailing',0); print '
'.$langs->trans("MailMessage").'
'; + print '
'.$langs->trans("MailMessage").'
'; print '
'.$langs->trans("CommonSubstitutions").':
'; foreach($object->substitutionarray as $key => $val) { diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index d09be0897c3..cc5b16f1935 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -183,30 +183,30 @@ if ($object->fetch($id) >= 0) $linkback = ''.$langs->trans("BackToList").''; - print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").''; print $form->showrefnav($object,'id', $linkback); print '
'.$langs->trans("MailTitle").''.$object->titre.'
'.$langs->trans("MailTitle").''.$object->titre.'
'.$langs->trans("MailFrom").''.dol_print_email($object->email_from,0,0,0,0,1).'
'.$langs->trans("MailFrom").''.dol_print_email($object->email_from,0,0,0,0,1).'
'.$langs->trans("MailErrorsTo").''.dol_print_email($object->email_errorsto,0,0,0,0,1); + print '
'.$langs->trans("MailErrorsTo").''.dol_print_email($object->email_errorsto,0,0,0,0,1); print '
'.$langs->trans("Status").''.$object->getLibStatut(4); + print '
'.$langs->trans("Status").''.$object->getLibStatut(4); if ($object->statut == 2) print ' ('.$object->countNbOfTargets('alreadysent').'/'.$object->nbemail.')'; print '
'; + print '
'; print $langs->trans("TotalNbOfDistinctRecipients"); print ''; $nbemail = ($object->nbemail?$object->nbemail:'0'); - if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) + if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && ($conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) && ($object->statut == 1 || $object->statut == 2)) { $text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); print $form->textwithpicto($nbemail,$text,1,'warning'); diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index d9cc6f31d23..298ceb886b9 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -41,6 +41,8 @@ class Mailing extends CommonObject var $bgcolor; var $bgimage; + var $statut; // Status 0=Draft, 1=Validated, 2=Sent partially, 3=Sent completely + var $email_from; var $email_replyto; var $email_errorsto; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index f19a431ec10..47cee9903ef 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1030,7 +1030,6 @@ if ($resql) else print '
'.$langs->trans('Model').''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 14f3ea7075f..6535cee7c98 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -163,7 +163,7 @@ if (empty($reshook)) // Change status of invoice else if ($action == 'reopen' && $user->rights->facture->creer) { $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); if ($result > 0) { header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id); @@ -2930,16 +2930,16 @@ else if ($id > 0 || ! empty($ref)) // Ref print '
' . $langs->trans('Ref') . ''; - $morehtmlref = ''; + $morehtmlright = ''; $discount = new DiscountAbsolute($db); $result = $discount->fetch(0, $object->id); if ($result > 0) { - $morehtmlref = ' (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')'; + $morehtmlright = '  (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')'; } if ($result < 0) { 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 '
'; + $moreforfilter=''; + + $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; + $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + + print '
'; print ''; - print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.ref","",$param,'width="15%"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Description"),$_SERVER["PHP_SELF"],"f.description","",$param,'',$sortfield,$sortorder); - if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) + if (! empty($arrayfields['f.ref']['checked'])) print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.ref","",$param,'width="15%"',$sortfield,$sortorder); + if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['f.description']['checked'])) print_liste_field_titre($langs->trans("Description"),$_SERVER["PHP_SELF"],"f.description","",$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['fd.description']['checked'])) print_liste_field_titre('',$_SERVER["PHP_SELF"],''); + if (! empty($arrayfields['fd.date']['checked'])) print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"fd.date","",$param,'align="center"',$sortfield,$sortorder); + if (! empty($arrayfields['fd.duree']['checked'])) print_liste_field_titre($langs->trans("Duration"),$_SERVER["PHP_SELF"],"fd.duree","",$param,'align="right"',$sortfield,$sortorder); + // Extra fields + if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { - print_liste_field_titre('',$_SERVER["PHP_SELF"],''); - print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"fd.date","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Duration"),$_SERVER["PHP_SELF"],"fd.duree","",$param,'align="right"',$sortfield,$sortorder); + foreach($extrafields->attribute_label as $key => $val) + { + if (! empty($arrayfields["ef.".$key]['checked'])) + { + $align=$extrafields->getAlignFlag($key); + print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder); + } + } } - print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.fk_statut","",$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); + // Hook fields + $parameters=array('arrayfields'=>$arrayfields); + $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($langs->trans("DateCreationShort"),$_SERVER["PHP_SELF"],"f.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"f.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.fk_statut","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; print ''; - print ''; - if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) - { - // Desc of line - print ''; - print ''; + if (! empty($arrayfields['f.ref']['checked'])) + { + print ''; + } + if (! empty($arrayfields['s.nom']['checked'])) + { + print ''; + } + if (! empty($arrayfields['f.description']['checked'])) + { + print ''; + } + if (! empty($arrayfields['fd.description']['checked'])) + { + // Desc of line print ''; + } + if (! empty($arrayfields['fd.date']['checked'])) + { + print ''; + } + if (! empty($arrayfields['fd.duree']['checked'])) + { + print ''; } - print ''; + // Extra fields + if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) + { + foreach($extrafields->attribute_label as $key => $val) + { + if (! empty($arrayfields["ef.".$key]['checked'])) + { + $align=$extrafields->getAlignFlag($key); + $typeofextrafield=$extrafields->attribute_type[$key]; + print ''; + } + } + } + // Fields from hook + $parameters=array('arrayfields'=>$arrayfields); + $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + if (! empty($arrayfields['f.datec']['checked'])) + { + // Date creation + print ''; + } + if (! empty($arrayfields['f.tms']['checked'])) + { + // Date modification + print ''; + } + if (! empty($arrayfields['f.fk_statut']['checked'])) + { + print ''; + } print '"; - print "\n"; - print ''; - print ''; - if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) + if (! empty($arrayfields['f.ref']['checked'])) { - //print ''; - print ''; - print '\n"; - print ''; + print "\n"; + if (! $i) $totalarray['nbfield']++; + } + if (! empty($arrayfields['s.nom']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + if (! empty($arrayfields['f.description']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + if (! empty($arrayfields['fd.description']['checked'])) + { + //print ''; + print ''; + if (! $i) $totalarray['nbfield']++; + } + if (! empty($arrayfields['fd.date']['checked'])) + { + print '\n"; + if (! $i) $totalarray['nbfield']++; + } + if (! empty($arrayfields['fd.duree']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['totaldurationfield']=$totalarray['nbfield']; + $totalarray['totalduration']+=$obj->duree; } - print ''; - print ''; + // Extra fields + if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) + { + foreach($extrafields->attribute_label as $key => $val) + { + if (! empty($arrayfields["ef.".$key]['checked'])) + { + print 'getAlignFlag($key); + if ($align) print ' align="'.$align.'"'; + print '>'; + $tmpkey='options_'.$key; + print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1); + print ''; + if (! $i) $totalarray['nbfield']++; + } + } + } + // Fields from hook + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Date creation + if (! empty($arrayfields['f.datec']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + // Date modification + if (! empty($arrayfields['f.tms']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + // Status + if (! empty($arrayfields['f.fk_statut']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + // Action column + print ''; + if (! $i) $totalarray['nbfield']++; + print "\n"; - $total += $objp->duree; + $total += $obj->duree; $i++; } - $rowspan=3; - if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) + + // Show total line + if (isset($totalarray['totalduration'])) { - print ''; - print ''; - print ''; + print ''; + $i=0; + while ($i < $totalarray['nbfield']) + { + $i++; + if ($i == 1) + { + if ($num < $limit) print ''; + else print ''; + } + elseif ($totalarray['totaldurationfield'] == $i) print ''; + else print ''; + } + print ''; } print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print '  '; + print ''; + print ''; + print ''; + print ''; + print ''; + print '   '; - $liststatus=$interventionstatic->statuts_short; - print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1); - print ''; + if (in_array($typeofextrafield, array('varchar', 'int', 'double', 'select'))) + { + $crit=$val; + $tmpkey=preg_replace('/search_options_/','',$key); + $searchclass=''; + if (in_array($typeofextrafield, array('varchar', 'select'))) $searchclass='searchstring'; + if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum'; + print ''; + } + print ''; + print ''; + print ''; + $liststatus=$interventionstatic->statuts_short; + print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1); + print ''; $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; @@ -212,44 +367,129 @@ if ($result) $var=True; $total = 0; $i = 0; + $totalarray=array(); while ($i < min($num, $limit)) { - $objp = $db->fetch_object($result); + $obj = $db->fetch_object($result); + + $interventionstatic->id=$obj->fichid; + $interventionstatic->ref=$obj->ref; + $interventionstatic->statut=$obj->fk_statut; + $var=!$var; print "
"; - $interventionstatic->id=$objp->fichid; - $interventionstatic->ref=$objp->ref; - print $interventionstatic->getNomUrl(1); - print "'; - $companystatic->name=$objp->name; - $companystatic->id=$objp->socid; - $companystatic->client=$objp->client; - print $companystatic->getNomUrl(1,'',44); - print ''.dol_trunc(dolGetFirstLineOfText($objp->description),48).''.dol_trunc(dol_escape_htmltag(dolGetFirstLineOfText($objp->descriptiondetail)),48).''.dolGetFirstLineOfText($objp->descriptiondetail).''.dol_print_date($db->jdate($objp->dp),'dayhour')."'.convertSecondToTime($objp->duree).'"; + print $interventionstatic->getNomUrl(1); + print "'; + $companystatic->name=$obj->name; + $companystatic->id=$obj->socid; + $companystatic->client=$obj->client; + print $companystatic->getNomUrl(1,'',44); + print ''.dol_trunc(dolGetFirstLineOfText($obj->description),48).''.dol_trunc(dol_escape_htmltag(dolGetFirstLineOfText($obj->descriptiondetail)),48).''.dolGetFirstLineOfText($obj->descriptiondetail).''.dol_print_date($db->jdate($obj->dp),'dayhour')."'.convertSecondToTime($obj->duree, 'allhourmin').''.$interventionstatic->LibStatut($objp->fk_statut,5).' '; + print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print ''; + print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print ''.$interventionstatic->LibStatut($obj->fk_statut,5).'
'.$langs->trans("Total").''.convertSecondToTime($total).'  
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'
'; @@ -264,4 +504,4 @@ else llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 92a41209ba4..54053c26606 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,7 +31,7 @@ */ if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr'); -if (! defined('DOL_VERSION')) define('DOL_VERSION','4.0.0-beta'); +if (! defined('DOL_VERSION')) define('DOL_VERSION','4.0.0-rc'); if (! defined('EURO')) define('EURO',chr(128)); diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index 33c3e268565..89f0a942172 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -71,6 +71,11 @@ $date_end = dol_mktime(23, 59, 59, $_REQUEST["date_endmonth"], $_REQUEST["date_e $date_starty = dol_mktime(0, 0, 0, $_REQUEST["date_start_delymonth"], $_REQUEST["date_start_delyday"], $_REQUEST["date_start_delyyear"]); // Date for local PHP server $date_endy = dol_mktime(23, 59, 59, $_REQUEST["date_end_delymonth"], $_REQUEST["date_end_delyday"], $_REQUEST["date_end_delyyear"]); +$extrafields = new ExtraFields($db); + +// fetch optionals attributes and labels +$extralabels=$extrafields->fetch_name_optionals_label('facture_fourn'); + if ($action == 'create') { if (! is_array($selected)) @@ -162,6 +167,9 @@ if (($action == 'create' || $action == 'add') && ! $error) { if (empty($object->date_echeance)) $object->date_echeance = $object->calculate_date_lim_reglement(); + $ret = $extrafields->setOptionalsFromPost($extralabels,$object); + if ($ret < 0) $error++; + if ($_POST['origin'] && $_POST['originid']) { $object->linked_objects = $orders_id; $id = $object->create($user); @@ -362,6 +370,12 @@ if ($action == 'create' && !$error) { ); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + $object=new FactureFournisseur($db); + print $object->showOptionals($extrafields,'edit'); + } + // Modele PDF print '' . $langs->trans('Model') . ''; print ''; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index d0edbd1f458..a8c2ff747ad 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -311,14 +311,17 @@ if (empty($reshook)) } // Delete payment - elseif ($action == 'deletepaiement' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'confirm_delete_paiement' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) { - $object->fetch($id); + $object->fetch($id); if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0) { $paiementfourn = new PaiementFourn($db); $result=$paiementfourn->fetch(GETPOST('paiement_id')); - if ($result > 0) $result=$paiementfourn->delete(); // If fetch ok and found + if ($result > 0) { + $result=$paiementfourn->delete(); // If fetch ok and found + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + } if ($result < 0) { setEventMessages($paiementfourn->error, $paiementfourn->errors, 'errors'); } @@ -1620,6 +1623,12 @@ else { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1); + } + if ($action == 'deletepaiement') + { + $payment_id = GETPOST('paiement_id'); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&paiement_id='.$payment_id, $langs->trans('DeletePayment'), $langs->trans('ConfirmDeletePayment'), 'confirm_delete_paiement', '', 0, 1); + } // Confirmation to delete line diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config index 500460e8ab5..8992916acaf 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config index b959379b133..cef47e9502d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -37,7 +37,7 @@ currencySymbol = kr ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NUL! DIV0 = #DIVISION/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config index 7e2ba9d2891..ff7e29899cc 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULL! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config index 00acff8bc34..f008e61cc90 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config index 8f7d9e084ec..fa16f5639df 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = $ ## I'm surprised that the Excel Documentation suggests $ rath ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #¡NULO! DIV0 = #¡DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config index 36bc3fc70b8..a481864a6fa 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = $ # Symbol not known, should it be a € (Euro)? ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #TYHJÄ! DIV0 = #JAKO/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config index 80f7d5411a6..2240d6b9f8b 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NUL! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config index c6c315814c4..dec7cbde15d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config index 97af8b9a570..f862a02d72d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULLO! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config index a14b476c945..7377a181df0 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #LEEG! DIV0 = #DEEL/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config index e3e3cc4f786..15fcc128640 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = kr ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULL! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config index ea111797270..fb1e7b13d9d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = zł ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #ZERO! DIV0 = #DZIEL/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config index d39c5c63438..e99aad6bea4 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = R$ ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULO! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config index 5e486bb29ff..36df63cc012 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULO! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config index 098c8075d29..205c342ada4 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = р ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #ПУСТО! DIV0 = #ДЕЛ/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config index c2094c06249..454e52ef52f 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = kr ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #Skärning! DIV0 = #Division/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config index cca084b2ba5..8a103d3c196 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = YTL ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #BOŞ! DIV0 = #SAYI/0! diff --git a/htdocs/install/pgsql/functions/functions.sql b/htdocs/install/pgsql/functions/functions.sql index df0c64855b1..cbacf7454c7 100644 --- a/htdocs/install/pgsql/functions/functions.sql +++ b/htdocs/install/pgsql/functions/functions.sql @@ -148,6 +148,9 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_societe_rib FOR EACH CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_socpeople FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_socpeople_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_stock_mouvement FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); +CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_supplier_proposal FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); +CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_supplier_proposal_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); +CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_supplier_proposaldet_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_tva FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_user FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_user_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); diff --git a/htdocs/langs/en_US/languages.lang b/htdocs/langs/en_US/languages.lang index bda34ce2299..884f9048666 100644 --- a/htdocs/langs/en_US/languages.lang +++ b/htdocs/langs/en_US/languages.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - languages - Language_ar_AR=Arabic Language_ar_SA=Arabic Language_bn_BD=Bengali diff --git a/htdocs/langs/en_US/link.lang b/htdocs/langs/en_US/link.lang index 6880d4d86a0..77a1814f1ca 100644 --- a/htdocs/langs/en_US/link.lang +++ b/htdocs/langs/en_US/link.lang @@ -1,3 +1,4 @@ +# Dolibarr language file - Source file is en_US - languages LinkANewFile=Link a new file/document LinkedFiles=Linked files and documents NoLinkFound=No registered links diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 205c1e0eccb..767b138eb54 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -383,7 +383,7 @@ ShowDetailsInPDFPageFoot=Ajout de plus d'informations dans le pied de page de vo NoDetails=Pas plus de détails dans le pied-de-page DisplayCompanyInfo=Afficher l'adresse de la société DisplayCompanyInfoAndManagers=Afficher les noms des sociétés et des supérieurs hiérarchiques -EnableAndSetupModuleCron=If you want to have this recurring invoice beeing generated automatically, module *%s* must be enabled and correctly setup. Otherwise, generation of invoices must be done manually from this template with button *Create*. Note that even if you enabled automatic generation, you can still safely launch manual generation. Duplicates generation for same period are not possible. +EnableAndSetupModuleCron=Si vous voulez avoir cette facture récurrente générée automatiquement, le module *%s* doit être activé et correctement configuré. Dans le cas contraire, la génération des factures doit être effectuée manuellement à partir de ce modèle avec le bouton *Créer*. Notez que même si vous avez activé la génération automatique, vous pouvez toujours lancer en toute sécurité la génération manuelle. La génération en double sur une même période n'est pas possibles. # Modules Module0Name=Utilisateurs & groupes @@ -550,7 +550,7 @@ Permission32=Créer/modifier les produits Permission34=Supprimer les produits Permission36=Voir/gérer les produits cachés Permission38=Exporter les produits -Permission41=Lire les projets et les tâches (projets publiques et projets dont je suis contact). Peut également entrer le temps consommé sur les tâches assignées (feuille de temps) +Permission41=Consulter les projets et les tâches (projets publiques et projets dont je suis contact). Peut également entrer le temps consommé sur les tâches assignées (feuille de temps) Permission42=Créer/modifier les projets et tâches (partagés ou dont je suis contact) Permission44=Supprimer les projets et tâches (partagés ou dont je suis contact) Permission45=Exporter les projets @@ -593,7 +593,7 @@ Permission121=Consulter les tiers (sociétés) liés à l'utilisateur Permission122=Créer/modifier les tiers (sociétés) liés à l'utilisateur Permission125=Supprimer les tiers (sociétés) liés à l'utilisateur Permission126=Exporter les tiers (sociétés) -Permission141=Consulter les projets et tâches (y compris privés dont je ne suis pas contact) +Permission141=Consulter tous les projets et tâches (y compris privés dont je ne suis pas contact) Permission142=Créer/modifier tous les projets et tâches (y compris privés dont je ne suis pas contact) Permission144=Supprimer les projets et tâches (y compris privés dont je ne suis pas contact) Permission146=Consulter les fournisseurs @@ -1585,6 +1585,6 @@ AddOtherPagesOrServices=Ajout d'autres pages ou services AddModels=Ajout de modèles de document ou de numérotation AddSubstitutions=Ajout de valeurs de substitution DetectionNotPossible=Détection impossible -UrlToGetKeyToUseAPIs=Url to get token to use API (once token has been received it is saved on database user table and will be checked on each future access) +UrlToGetKeyToUseAPIs=Url pour obtenir le jeton pour utiliser l'API (une fois le jeton reçu, il est enregistré dans la table des utilisateurs de la base de données et sera vérifié à chaque accès) ListOfAvailableAPIs=Liste des APIs disponibles -activateModuleDependNotSatisfied=Module "%s" depends on module "%s" that is missing, so module "%1$s" may not work correclty. Please install module "%2$s" or disable module "%1$s" if you want to be safe from any surprise +activateModuleDependNotSatisfied=Le module "%s" dépend du module "%s" qui est manquant, aussi le module "%1$s" peut ne pas fonctionner correctement. Merci d'installer le module "%2$s" ou désactiver le module "%1$s" si vous ne souhaitez pas avoir de mauvaise surprise diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index 4aa648459d1..6ca57901e9e 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -467,7 +467,7 @@ InvoiceSituationLast=Dernière facture PDFCrevetteSituationNumber=Situation N°%s PDFCrevetteSituationInvoiceLineDecompte=Facture de situation - Déompte PDFCrevetteSituationInvoiceTitle=Facture de situation -PDFCrevetteSituationInvoiceLine=Situation N°%s : Inv. N°%s on %s +PDFCrevetteSituationInvoiceLine=Situation N°%s : Fact. N°%s sur %s TotalSituationInvoice=Total situation invoiceLineProgressError=L'avancement d'une ligne de facture ne peut pas être supérieure ou égale à la ligne de facture suivante. updatePriceNextInvoiceErrorUpdateline=Erreur: mise à jour du prix sur la ligne de facture : %s diff --git a/htdocs/langs/fr_FR/interventions.lang b/htdocs/langs/fr_FR/interventions.lang index a2803463899..d9c51beab73 100644 --- a/htdocs/langs/fr_FR/interventions.lang +++ b/htdocs/langs/fr_FR/interventions.lang @@ -14,10 +14,12 @@ DeleteIntervention=Supprimer intervention ValidateIntervention=Valider intervention ModifyIntervention=Modifier intervention DeleteInterventionLine=Supprimer ligne d'intervention +CloneIntervention=Clone intervention ConfirmDeleteIntervention=Êtes-vous sûr de vouloir effacer cette intervention ? ConfirmValidateIntervention=Êtes-vous sûr de vouloir valider cette intervention sous la référence %s ? ConfirmModifyIntervention=Êtes-vous sûr de vouloir modifier cette intervention ? ConfirmDeleteInterventionLine=Êtes-vous sûr de vouloir effacer cette ligne ? +ConfirmCloneIntervention=Are you sure you want to clone this intervention ? NameAndSignatureOfInternalContact=Nom et signature de l'intervenant : NameAndSignatureOfExternalContact=Nom et signature du client : DocumentModelStandard=Modèle de fiche d'intervention standard diff --git a/htdocs/langs/fr_FR/languages.lang b/htdocs/langs/fr_FR/languages.lang index dd730bd73a2..6c3f24877c7 100644 --- a/htdocs/langs/fr_FR/languages.lang +++ b/htdocs/langs/fr_FR/languages.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - languages - Language_ar_AR=Arabe Language_ar_SA=Arabe Language_bn_BD=Bengalais diff --git a/htdocs/langs/fr_FR/loan.lang b/htdocs/langs/fr_FR/loan.lang index 481c9ba7b18..6fb63229485 100644 --- a/htdocs/langs/fr_FR/loan.lang +++ b/htdocs/langs/fr_FR/loan.lang @@ -31,9 +31,9 @@ DownPaymentDesc=L'acompte = Le prix de la maison multiplié par le pource InterestRateDesc=Le taux d'intérêt = Le pourcentage annuel d'intérêt divisé par 100. MonthlyFactorDesc=The monthly factor = The result of the following formula MonthlyInterestRateDesc=Le taux d'intérêt mensuel = Le taux annuel d'intérêt divisé par 12 (pour les 12 mois de l'année) -MonthTermDesc=The month term of the loan in months = The number of years you've taken the loan out for times 12 +MonthTermDesc=Le terme en mois du prêt en mois = Le nombre d'années que vous avez pris pour le prêt multiplié par 12 MonthlyPaymentDesc=Le paiement mensuel est déterminé en utilisant la formule suivante -AmortizationPaymentDesc=The amortization breaks down how much of your monthly payment goes towards the bank's interest, and how much goes into paying off the principal of your loan. +AmortizationPaymentDesc=L' amortissement décompose votre paiement mensuel entre l'intérêt de la banque et le remboursement du principal de votre prêt. AmountFinanced=Montant financé AmortizationMonthlyPaymentOverYears=Amortissement pour paiement mensuel : %s sur %s ans Totalsforyear=Total pour l'année diff --git a/htdocs/langs/fr_FR/oauth.lang b/htdocs/langs/fr_FR/oauth.lang index c0cbb9a370c..24a654f21ac 100644 --- a/htdocs/langs/fr_FR/oauth.lang +++ b/htdocs/langs/fr_FR/oauth.lang @@ -12,3 +12,4 @@ ListOfSupportedOauthProviders=Saisissez ici le crédit fourni par votre fourniss OAUTH_GOOGLE_NAME=API Google OAUTH_GOOGLE_ID=ID API Google OAUTH_GOOGLE_SECRET=API Google Secrète +OAUTH_GOOGLE_DESC=Allez sur cette page puis Identitifaction pour créer des informations d'identification OAuth diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 5e919498a9b..3f790907fc1 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1480,7 +1480,12 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && empty($conf->browser->phone)) { $qs=$_SERVER["QUERY_STRING"]; - $qs.=(($qs && $morequerystring)?'&':'').$morequerystring; + + foreach($_POST as $key=>$value) { + if($key!=='action')$qs.='&'.$key.'='.urlencode($value); + } + + $qs.=(($qs && $morequerystring)?'&':'').$morequerystring; $text =''; $text.= img_picto(":".$langs->trans("PrintContentArea"), 'printer_top.png', 'class="printer"'); $text.=''; diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index 138cfe45a2b..f9f2fe51b5f 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -208,28 +208,39 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all') } } - $graphfiles=array( - 'propal' =>array('modulepart'=>'productstats_proposals', - 'file' => $object->id.'/propal12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', - 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsProposals"):$langs->transnoentitiesnoconv("NumberOfProposals"))), - 'proposalssuppliers'=>array('modulepart'=>'productstats_proposalssuppliers', - 'file' => $object->id.'/proposalssuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', - 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsSupplierProposals"):$langs->transnoentitiesnoconv("NumberOfSupplierProposals"))), - - 'orders' =>array('modulepart'=>'productstats_orders', - 'file' => $object->id.'/orders12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', - 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsCustomerOrders"):$langs->transnoentitiesnoconv("NumberOfCustomerOrders"))), - 'orderssuppliers'=>array('modulepart'=>'productstats_orderssuppliers', - 'file' => $object->id.'/orderssuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', - 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsSupplierOrders"):$langs->transnoentitiesnoconv("NumberOfSupplierOrders"))), - - 'invoices' =>array('modulepart'=>'productstats_invoices', - 'file' => $object->id.'/invoices12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', - 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsCustomerInvoices"):$langs->transnoentitiesnoconv("NumberOfCustomerInvoices"))), - 'invoicessuppliers'=>array('modulepart'=>'productstats_invoicessuppliers', - 'file' => $object->id.'/invoicessuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', - 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsSupplierInvoices"):$langs->transnoentitiesnoconv("NumberOfSupplierInvoices"))), - ); + if($conf->propal->enabled) { + $graphfiles['propal']=array('modulepart'=>'productstats_proposals', + 'file' => $object->id.'/propal12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', + 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsProposals"):$langs->transnoentitiesnoconv("NumberOfProposals"))); + } + + if($conf->supplier_proposal->enabled) { + $graphfiles['proposalssuppliers']=array('modulepart'=>'productstats_proposalssuppliers', + 'file' => $object->id.'/proposalssuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', + 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsSupplierProposals"):$langs->transnoentitiesnoconv("NumberOfSupplierProposals"))); + } + + if($conf->order->enabled) { + $graphfiles['orders']=array('modulepart'=>'productstats_orders', + 'file' => $object->id.'/orders12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', + 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsCustomerOrders"):$langs->transnoentitiesnoconv("NumberOfCustomerOrders"))); + } + + if($conf->fournisseur->enabled) { + $graphfiles['orderssuppliers']=array('modulepart'=>'productstats_orderssuppliers', + 'file' => $object->id.'/orderssuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', + 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsSupplierOrders"):$langs->transnoentitiesnoconv("NumberOfSupplierOrders"))); + } + + if($conf->facture->enabled) { + $graphfiles['invoices']=array('modulepart'=>'productstats_invoices', + 'file' => $object->id.'/invoices12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', + 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsCustomerInvoices"):$langs->transnoentitiesnoconv("NumberOfCustomerInvoices"))); + + $graphfiles['invoicessuppliers']=array('modulepart'=>'productstats_invoicessuppliers', + 'file' => $object->id.'/invoicessuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', + 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsSupplierInvoices"):$langs->transnoentitiesnoconv("NumberOfSupplierInvoices"))); + } $px = new DolGraph(); diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 02f87a89395..4abf2754f77 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -361,7 +361,7 @@ foreach ($demoprofiles as $profilearray) print ''."\n"; // Title print ''; - print ''; + print ''; print ''; print ''."\n"; // Modules @@ -478,7 +478,7 @@ function llxHeaderVierge($title, $head = "") top_htmlhead($head,$title); - print ''."\n"; + print ''."\n"; } /** diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index e0a23064b14..40e96df58db 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2734,6 +2734,7 @@ class Societe extends CommonObject global $conf,$langs,$hookmanager; $url=''; + $action = ''; $hookmanager->initHooks(array('idprofurl')); $parameters=array('idprof'=>$idprof, 'company'=>$thirdparty); diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 9e9cf97706c..ef75f3032cb 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1058,6 +1058,8 @@ div.tmenucenter div.menu_titre { padding-top: 4px; padding-bottom: 4px; + overflow: hidden; + text-overflow: ellipsis; } .mainmenuaspan { @@ -1421,7 +1423,7 @@ div.vmenu, td.vmenu { .companylogo { } .searchform { padding-top: 4px; } -a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active { font-size:px; font-family: ; text-align: ; font-weight: bold; } +a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active { white-space: nowrap; font-size:px; font-family: ; text-align: ; font-weight: bold; } font.vmenudisabled { font-size:px; font-family: ; text-align: ; font-weight: bold; color: #aaa; margin-left: 4px; } a.vmenu:link, a.vmenu:visited { color: #; } @@ -4292,7 +4294,9 @@ border-top-right-radius: 6px; /* For demo pages */ img.demothumb { - box-shadow: 2px 2px 8px #888; + box-shadow: 2px 2px 8px #BBB; + margin-right: 20px; + margin-left: 10px; } @@ -4329,6 +4333,12 @@ img.demothumb { width: px; } + img.demothumb { + box-shadow: 1px 1px 4px #BBB; + margin-right: 6px; + margin-left: 4px; + width: 80px; + } } /* nboftopmenuentries = , fontsize= */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index f4e7fe8342a..9e217efb30c 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1087,6 +1087,8 @@ div.tmenucenter } div.menu_titre { padding-bottom: 2px; + overflow: hidden; + text-overflow: ellipsis; } .mainmenuaspan { @@ -1458,7 +1460,7 @@ div.vmenu, td.vmenu { .companylogo { padding-top: 4px; } .searchform { padding-top: 8px; } -a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active { font-size:px; font-family: ; text-align: ; font-weight: bold; } +a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active { white-space: nowrap; font-size:px; font-family: ; text-align: ; font-weight: bold; } font.vmenudisabled { font-size:px; font-family: ; text-align: ; font-weight: bold; color: #aaa; margin-left: 4px; } a.vmenu:link, a.vmenu:visited { color: #; } diff --git a/htdocs/user/index.php b/htdocs/user/index.php index f7927cee665..5d8f02e1c32 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -229,6 +229,15 @@ $sql.=$hookmanager->resPrint; $sql.=$db->order($sortfield,$sortorder); //$sql.= $db->plimit($conf->liste_limit+1, $offset); +/*$totalnboflines=0; +$result=$db->query($sql); +if ($result) +{ + $totalnboflines = $db->num_rows($result); +} + +$sql.= $db->plimit($limit+1, $offset); +*/ $result = $db->query($sql); if ($result) { @@ -236,6 +245,8 @@ if ($result) $i = 0; $param=''; + if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($sall != '') $param.='&sall='.urlencode($sall); if ($search_user != '') $param.="&search_user=".$search_user; if ($search_login != '') $param.="&search_login=".$search_login; diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index df755a50b64..38054c48c69 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -80,6 +80,23 @@ if ($key != $conf->global->CRON_KEY) exit(-1); } +// If param userlogin is reserved word 'firstadmin' +if ($userlogin == 'firstadmin') +{ + $sql='SELECT login from '.MAIN_DB_PREFIX.'user WHERE admin = 1 ORDER BY entity LIMIT 1'; + $resql=$db->query($sql); + if ($resql) + { + $obj=$db->fetch_object($resql); + if ($obj) + { + $userlogin = $obj->login; + echo "First admin user found is login '".$userlogin."'\n
"; + } + } + else dol_print_error($db); +} + // Check user login $user=new User($db); $result=$user->fetch('',$userlogin); @@ -93,8 +110,8 @@ else { if (empty($user->id)) { - echo " User user login: ".$userlogin." do not exists"; - dol_syslog(" User user login:".$userlogin." do not exists", LOG_ERR); + echo "User user login: ".$userlogin." does not exists"; + dol_syslog("User user login:".$userlogin." does not exists", LOG_ERR); exit(-1); } } @@ -178,7 +195,7 @@ function usage($path,$script_file) { global $conf; - print "Usage: ".$script_file." securitykey userlogin [cronjobid]\n"; + print "Usage: ".$script_file." securitykey userlogin|'firstadmin' [cronjobid]\n"; print "The script return 0 when everything worked successfully.\n"; print "\n"; print "On Linux system, you can have cron jobs ran automatically by adding an entry into cron.\n";
Demo '.$profilearray['label'].'Demo '.$profilearray['label'].''.$langs->trans($profilearray['label']).'