dev_fix5353

Conflicts:
	build/pad/DoliWamp.pml
	build/pad/Dolibarr.pml
	build/pad/pad_dolibarr.xml
	build/pad/pad_doliwamp.xml
This commit is contained in:
florian HENRY 2016-07-07 09:05:13 +02:00
commit 1bb28648c4
72 changed files with 651 additions and 286 deletions

View File

@ -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/<lang>/languages.lang
source_file = htdocs/langs/en_US/languages.lang
source_lang = en_US

View File

@ -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...

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

@ -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 "<Path to your exe>" /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"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -187,7 +187,9 @@
<severity>0</severity>
</rule>
<rule ref="PEAR.Commenting.ClassComment.MissingTag" />
<rule ref="PEAR.Commenting.ClassComment.MissingTag">
<severity>0</severity>
</rule>
<rule ref="PEAR.Commenting.ClassComment.MissingAuthorTag">
<severity>0</severity>

View File

@ -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
// );

View File

@ -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

View File

@ -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);

View File

@ -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);
}

View File

@ -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

View File

@ -673,9 +673,9 @@ if ($action == 'create')
dol_fiche_head();
print '<table class="border" width="100%">';
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("MailTitle").'</td><td><input class="flat" name="titre" size="40" value="'.$_POST['titre'].'"></td></tr>';
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("MailFrom").'</td><td><input class="flat" name="from" size="40" value="'.$conf->global->MAILING_EMAIL_FROM.'"></td></tr>';
print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td><input class="flat" name="errorsto" size="40" value="'.(!empty($conf->global->MAILING_EMAIL_ERRORSTO)?$conf->global->MAILING_EMAIL_ERRORSTO:$conf->global->MAIN_MAIL_ERRORS_TO).'"></td></tr>';
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("MailTitle").'</td><td><input class="flat" name="titre" size="40" value="'.$_POST['titre'].'"></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("MailFrom").'</td><td><input class="flat" name="from" size="40" value="'.$conf->global->MAILING_EMAIL_FROM.'"></td></tr>';
print '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td><input class="flat" name="errorsto" size="40" value="'.(!empty($conf->global->MAILING_EMAIL_ERRORSTO)?$conf->global->MAILING_EMAIL_ERRORSTO:$conf->global->MAIN_MAIL_ERRORS_TO).'"></td></tr>';
// Other attributes
$parameters=array();
@ -689,11 +689,11 @@ if ($action == 'create')
print '</br><br>';
print '<table class="border" width="100%">';
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("MailTopic").'</td><td><input class="flat" name="sujet" size="60" value="'.$_POST['sujet'].'"></td></tr>';
print '<tr><td width="25%">'.$langs->trans("BackgroundColorByDefault").'</td><td colspan="3">';
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("MailTopic").'</td><td><input class="flat" name="sujet" size="60" value="'.$_POST['sujet'].'"></td></tr>';
print '<tr><td>'.$langs->trans("BackgroundColorByDefault").'</td><td colspan="3">';
print $htmlother->selectColor($_POST['bgcolor'],'bgcolor','new_mailing',0);
print '</td></tr>';
print '<tr><td width="25%" valign="top"><span class="fieldrequired">'.$langs->trans("MailMessage").'</span><br>';
print '<tr><td valign="top"><span class="fieldrequired">'.$langs->trans("MailMessage").'</span><br>';
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
foreach($object->substitutionarray as $key => $val)
{
@ -792,7 +792,7 @@ else
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("BackToList").'</a>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
print $form->showrefnav($object,'id', $linkback);
print '</td></tr>';
@ -995,7 +995,7 @@ else
print '<table class="border" width="100%">';
// Subject
print '<tr><td width="25%">'.$langs->trans("MailTopic").'</td><td colspan="3">'.$object->sujet.'</td></tr>';
print '<tr><td class="titlefield">'.$langs->trans("MailTopic").'</td><td colspan="3">'.$object->sujet.'</td></tr>';
// Joined files
print '<tr><td>'.$langs->trans("MailFile").'</td><td colspan="3">';
@ -1021,7 +1021,7 @@ else
print '</td></tr>';*/
// Message
print '<tr><td width="25%" valign="top">'.$langs->trans("MailMessage").'<br>';
print '<tr><td valign="top">'.$langs->trans("MailMessage").'<br>';
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
foreach($object->substitutionarray as $key => $val)
{
@ -1055,7 +1055,7 @@ else
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("BackToList").'</a>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
print $form->showrefnav($object,'id', $linkback);
print '</td></tr>';
@ -1114,9 +1114,9 @@ else
print '<table class="border" width="100%">';
// Subject
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("MailTopic").'</td><td colspan="3"><input class="flat" type="text" size=60 name="sujet" value="'.$object->sujet.'"></td></tr>';
print '<tr><td class="fieldrequired titlefield">'.$langs->trans("MailTopic").'</td><td colspan="3"><input class="flat" type="text" size=60 name="sujet" value="'.$object->sujet.'"></td></tr>';
$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 '</td></tr>';
// Background color
print '<tr><td width="25%">'.$langs->trans("BackgroundColorByDefault").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("BackgroundColorByDefault").'</td><td colspan="3">';
print $htmlother->selectColor($object->bgcolor,'bgcolor','edit_mailing',0);
print '</td></tr>';
// Message
print '<tr><td width="25%" valign="top">'.$langs->trans("MailMessage").'<br>';
print '<tr><td valign="top">'.$langs->trans("MailMessage").'<br>';
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
foreach($object->substitutionarray as $key => $val)
{

View File

@ -183,30 +183,30 @@ if ($object->fetch($id) >= 0)
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("BackToList").'</a>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
print $form->showrefnav($object,'id', $linkback);
print '</td></tr>';
print '<tr><td width="25%">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
print '<tr><td>'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
print '<tr><td width="25%">'.$langs->trans("MailFrom").'</td><td colspan="3">'.dol_print_email($object->email_from,0,0,0,0,1).'</td></tr>';
print '<tr><td>'.$langs->trans("MailFrom").'</td><td colspan="3">'.dol_print_email($object->email_from,0,0,0,0,1).'</td></tr>';
// Errors to
print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td colspan="3">'.dol_print_email($object->email_errorsto,0,0,0,0,1);
print '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td colspan="3">'.dol_print_email($object->email_errorsto,0,0,0,0,1);
print '</td></tr>';
// Status
print '<tr><td width="25%">'.$langs->trans("Status").'</td><td colspan="3">'.$object->getLibStatut(4);
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">'.$object->getLibStatut(4);
if ($object->statut == 2) print ' ('.$object->countNbOfTargets('alreadysent').'/'.$object->nbemail.')';
print '</td></tr>';
// Nb of distinct emails
print '<tr><td width="25%">';
print '<tr><td>';
print $langs->trans("TotalNbOfDistinctRecipients");
print '</td><td colspan="3">';
$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');

View File

@ -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;

View File

@ -1030,7 +1030,6 @@ if ($resql)
else print '<td></td>';
}
print '</tr>';
}
$db->free($resql);

View File

@ -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 '<tr><td>'.$langs->trans('Model').'</td>';
print '<td>';

View File

@ -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 '<tr><td width="20%">' . $langs->trans('Ref') . '</td>';
print '<td colspan="5">';
$morehtmlref = '';
$morehtmlright = '';
$discount = new DiscountAbsolute($db);
$result = $discount->fetch(0, $object->id);
if ($result > 0) {
$morehtmlref = ' (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')';
$morehtmlright = '&nbsp; (' . $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 '</td></tr>';
// 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
{

View File

@ -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)
{

View File

@ -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))

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2010-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-2014 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
*
@ -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);
}
}

View File

@ -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.='<div style="vertical-align: middle">';
$ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>';
if ($morehtmlleft) $ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>';
$ret.='<div class="inline-block floatleft valignmiddle refid'.(($shownav && ($previous_ref || $next_ref))?' refidpadding':'').'">';
@ -5624,6 +5625,8 @@ class Form
}
$ret.='</div>';
if ($morehtmlright) $ret.='<div class="inline-block floatleft">'.$morehtmlright.'</div>';
if ($previous_ref || $next_ref || $morehtml)
{
$ret.='<div class="pagination"><ul>';
@ -5641,7 +5644,7 @@ class Form
{
$ret.='</ul></div>';
}
if ($morehtmlright) $ret.='<div class="statusref">'.$morehtmlright.'</div>';
if ($morehtmlstatus) $ret.='<div class="statusref">'.$morehtmlstatus.'</div>';
$ret.='</div>';
return $ret;

View File

@ -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]<br>";
//if ($domain == 'orders') print "Domain=$domain, found a string for $tab[0] with value $tab[1]. Currently in cache ".$this->tab_translate[$key]."<br>";
//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]."<br>";
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<br>";
if ($usecachekey) $tabtranslatedomain[$key]=$value; // To save lang content in cache
}
}

View File

@ -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 ;

View File

@ -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;
}
*/
}

View File

@ -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;
}
}

View File

@ -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 ;
}

View File

@ -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)

View File

@ -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(

View File

@ -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))
{

View File

@ -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;

View File

@ -4,7 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -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 '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@ -165,42 +242,120 @@ if ($result)
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
}
print '<table class="noborder" width="100%">';
$moreforfilter='';
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
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 "</tr>\n";
print '<tr class="liste_titre">';
print '<td class="liste_titre">';
print '<input type="text" class="flat" name="search_ref" value="'.$search_ref.'" size="8">';
print '</td><td class="liste_titre">';
print '<input type="text" class="flat" name="search_company" value="'.$search_company.'" size="10">';
print '</td><td class="liste_titre">';
print '<input type="text" class="flat" name="search_desc" value="'.$search_desc.'" size="12">';
print '</td>';
if (empty($conf->global->FICHINTER_DISABLE_DETAILS))
{
// Desc of line
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
if (! empty($arrayfields['f.ref']['checked']))
{
print '<td class="liste_titre">';
print '<input type="text" class="flat" name="search_ref" value="'.$search_ref.'" size="8">';
print '</td>';
}
if (! empty($arrayfields['s.nom']['checked']))
{
print '<td class="liste_titre">';
print '<input type="text" class="flat" name="search_company" value="'.$search_company.'" size="10">';
print '</td>';
}
if (! empty($arrayfields['f.description']['checked']))
{
print '<td class="liste_titre">';
print '<input type="text" class="flat" name="search_desc" value="'.$search_desc.'" size="12">';
print '</td>';
}
if (! empty($arrayfields['fd.description']['checked']))
{
// Desc of line
print '<td class="liste_titre">&nbsp;</td>';
}
if (! empty($arrayfields['fd.date']['checked']))
{
print '<td class="liste_titre">&nbsp;</td>';
}
if (! empty($arrayfields['fd.duree']['checked']))
{
print '<td class="liste_titre">&nbsp;</td>';
}
print '<td class="liste_titre" align="right">';
$liststatus=$interventionstatic->statuts_short;
print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1);
print '</td>';
// 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 '<td class="liste_titre'.($align?' '.$align:'').'">';
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 '<input class="flat'.($searchclass?' '.$searchclass:'').'" size="4" type="text" name="search_options_'.$tmpkey.'" value="'.dol_escape_htmltag($search_array_options['search_options_'.$tmpkey]).'">';
}
print '</td>';
}
}
}
// 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 '<td class="liste_titre">';
print '</td>';
}
if (! empty($arrayfields['f.tms']['checked']))
{
// Date modification
print '<td class="liste_titre">';
print '</td>';
}
if (! empty($arrayfields['f.fk_statut']['checked']))
{
print '<td class="liste_titre" align="right">';
$liststatus=$interventionstatic->statuts_short;
print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1);
print '</td>';
}
print '<td class="liste_titre" align="right">';
$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 "<tr ".$bc[$var].">";
print "<td>";
$interventionstatic->id=$objp->fichid;
$interventionstatic->ref=$objp->ref;
print $interventionstatic->getNomUrl(1);
print "</td>\n";
print '<td>';
$companystatic->name=$objp->name;
$companystatic->id=$objp->socid;
$companystatic->client=$objp->client;
print $companystatic->getNomUrl(1,'',44);
print '</td>';
print '<td>'.dol_trunc(dolGetFirstLineOfText($objp->description),48).'</td>';
if (empty($conf->global->FICHINTER_DISABLE_DETAILS))
if (! empty($arrayfields['f.ref']['checked']))
{
//print '<td>'.dol_trunc(dol_escape_htmltag(dolGetFirstLineOfText($objp->descriptiondetail)),48).'</td>';
print '<td>'.dolGetFirstLineOfText($objp->descriptiondetail).'</td>';
print '<td align="center">'.dol_print_date($db->jdate($objp->dp),'dayhour')."</td>\n";
print '<td align="right">'.convertSecondToTime($objp->duree).'</td>';
print "<td>";
print $interventionstatic->getNomUrl(1);
print "</td>\n";
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['s.nom']['checked']))
{
print '<td>';
$companystatic->name=$obj->name;
$companystatic->id=$obj->socid;
$companystatic->client=$obj->client;
print $companystatic->getNomUrl(1,'',44);
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['f.description']['checked']))
{
print '<td>'.dol_trunc(dolGetFirstLineOfText($obj->description),48).'</td>';
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['fd.description']['checked']))
{
//print '<td>'.dol_trunc(dol_escape_htmltag(dolGetFirstLineOfText($obj->descriptiondetail)),48).'</td>';
print '<td>'.dolGetFirstLineOfText($obj->descriptiondetail).'</td>';
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['fd.date']['checked']))
{
print '<td align="center">'.dol_print_date($db->jdate($obj->dp),'dayhour')."</td>\n";
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['fd.duree']['checked']))
{
print '<td align="right">'.convertSecondToTime($obj->duree, 'allhourmin').'</td>';
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totaldurationfield']=$totalarray['nbfield'];
$totalarray['totalduration']+=$obj->duree;
}
print '<td align="right">'.$interventionstatic->LibStatut($objp->fk_statut,5).'</td>';
print '<td>&nbsp;</td>';
// 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 '<td';
$align=$extrafields->getAlignFlag($key);
if ($align) print ' align="'.$align.'"';
print '>';
$tmpkey='options_'.$key;
print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1);
print '</td>';
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 '<td align="center">';
print dol_print_date($db->jdate($obj->date_creation), 'dayhour');
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Date modification
if (! empty($arrayfields['f.tms']['checked']))
{
print '<td align="center">';
print dol_print_date($db->jdate($obj->date_update), 'dayhour');
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Status
if (! empty($arrayfields['f.fk_statut']['checked']))
{
print '<td align="right">'.$interventionstatic->LibStatut($obj->fk_statut,5).'</td>';
if (! $i) $totalarray['nbfield']++;
}
// Action column
print '<td></td>';
if (! $i) $totalarray['nbfield']++;
print "</tr>\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 '<tr class="liste_total"><td colspan="5" class="liste_total">'.$langs->trans("Total").'</td>';
print '<td align="right" class="nowrap liste_total">'.convertSecondToTime($total).'</td><td>&nbsp;</td><td>&nbsp;</td>';
print '</tr>';
print '<tr class="liste_total">';
$i=0;
while ($i < $totalarray['nbfield'])
{
$i++;
if ($i == 1)
{
if ($num < $limit) print '<td align="left">'.$langs->trans("Total").'</td>';
else print '<td align="left">'.$langs->trans("Totalforthispage").'</td>';
}
elseif ($totalarray['totaldurationfield'] == $i) print '<td align="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>';
else print '<td></td>';
}
print '</tr>';
}
print '</table>';
@ -264,4 +504,4 @@ else
llxFooter();
$db->close();
$db->close();

View File

@ -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));

View File

@ -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 '<tr><td>' . $langs->trans('Model') . '</td>';
print '<td>';

View File

@ -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

View File

@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@ -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!

View File

@ -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!

View File

@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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();

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 <b>%s</b> ?
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

View File

@ -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

View File

@ -31,9 +31,9 @@ DownPaymentDesc=L'<b>acompte</b> = Le prix de la maison multiplié par le pource
InterestRateDesc=Le <b>taux d'intérêt</b> = Le pourcentage annuel d'intérêt divisé par 100.
MonthlyFactorDesc=The <b>monthly factor</b> = The result of the following formula
MonthlyInterestRateDesc=Le <b>taux d'intérêt mensuel</b> = Le taux annuel d'intérêt divisé par 12 (pour les 12 mois de l'année)
MonthTermDesc=The <b>month term</b> of the loan in months = The number of years you've taken the loan out for times 12
MonthTermDesc=Le <b>terme en mois</b> 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 <a href="#amortization">amortization</a> 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' <a href="#amortization">amortissement</a> 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 : <b>%s</b> sur %s ans
Totalsforyear=Total pour l'année

View File

@ -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 <a href="https://console.developers.google.com/" target="_blank">cette page</a> puis Identitifaction pour créer des informations d'identification OAuth

View File

@ -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 ='<a href="'.$_SERVER["PHP_SELF"].'?'.$qs.($qs?'&':'').'optioncss=print" target="_blank">';
$text.= img_picto(":".$langs->trans("PrintContentArea"), 'printer_top.png', 'class="printer"');
$text.='</a>';

View File

@ -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();

View File

@ -361,7 +361,7 @@ foreach ($demoprofiles as $profilearray)
print '<table summary="Dolibarr online demonstration for profile '.$profilearray['label'].'" style="font-size:14px;" width="100%" class="CTable CTableRow'.($i%2==0?'1':'0').'">'."\n";
// Title
print '<tr>';
print '<td width="132" id="a1'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow cursorpointer':'nomodulelines').'"><a href="'.$urlwithmod.'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'"><img class="demothumb" src="'.$profilearray['icon'].'" width="128" border="0" alt="Demo '.$profilearray['label'].'"></a></td>';
print '<td width="130" id="a1'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow cursorpointer':'nomodulelines').'"><a href="'.$urlwithmod.'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'"><img class="demothumb" src="'.$profilearray['icon'].'" alt="Demo '.$profilearray['label'].'"></a></td>';
print '<td id="a2'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow cursorpointer':'nomodulelines').'"><a href="'.$urlwithmod.'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'">'.$langs->trans($profilearray['label']).'</a></td>';
print '</tr>'."\n";
// Modules
@ -478,7 +478,7 @@ function llxHeaderVierge($title, $head = "")
top_htmlhead($head,$title);
print '<body style="margin: 20px;">'."\n";
print '<body style="padding: 20px;">'."\n";
}
/**

View File

@ -2734,6 +2734,7 @@ class Societe extends CommonObject
global $conf,$langs,$hookmanager;
$url='';
$action = '';
$hookmanager->initHooks(array('idprofurl'));
$parameters=array('idprof'=>$idprof, 'company'=>$thirdparty);

View File

@ -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:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; }
a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active { white-space: nowrap; font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; }
font.vmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; color: #aaa; margin-left: 4px; }
a.vmenu:link, a.vmenu:visited { color: #<?php echo $colortextbackvmenu; ?>; }
@ -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: <?php print dol_size(350,'width'); ?>px;
}
img.demothumb {
box-shadow: 1px 1px 4px #BBB;
margin-right: 6px;
margin-left: 4px;
width: 80px;
}
}
/* nboftopmenuentries = <?php echo $nbtopmenuentries ?>, fontsize=<?php echo $fontsize ?> */

View File

@ -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:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; }
a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active { white-space: nowrap; font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; }
font.vmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; color: #aaa; margin-left: 4px; }
a.vmenu:link, a.vmenu:visited { color: #<?php echo $colortextbackvmenu; ?>; }

View File

@ -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;

View File

@ -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<br>";
}
}
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";