Merge remote-tracking branch 'Upstream/4.0' into 4.0-p36

Conflicts:
	htdocs/societe/rib.php
This commit is contained in:
aspangaro 2016-08-01 07:27:49 +02:00
commit 4a0eb496fa
91 changed files with 9030 additions and 195 deletions

View File

@ -19,7 +19,7 @@ File added into doxygen generated documentation
<hr class="footer" />
<address class="footer"><small>Generated on $datetime
for <a href="http://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversion </small></address>
for <a href="https://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversion </small></address>
<!-- Google AdSense -->
@ -32,7 +32,7 @@ google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<!-- End google adsense -->
<br>

View File

@ -15,10 +15,7 @@ Alias /dolibarr "WAMPROOT/www/dolibarr/htdocs/"
# NOTE FOR APACHE 2.3:
# To restrict access to dolibarr from outside set lines
#
# <RequireAny>
# Require ip 127.0.0.1
# Require host localhost
# <RequireAny>
# Require local
#
# instead of
#

View File

@ -42,6 +42,7 @@ SolidCompression=yes
WizardImageFile=build\exe\doliwamp\doliwamp.bmp
WizardSmallImageFile=build\exe\doliwamp\doliwampsmall.bmp
SetupIconFile=doc\images\dolibarr.ico
;To say the installer must be ran as admin
PrivilegesRequired=admin
DisableProgramGroupPage=yes
ChangesEnvironment=no
@ -148,8 +149,12 @@ Name: "{userdesktop}\Dolibarr Help center"; Filename: "{app}\rundolihelp.bat"; W
[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;
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN";
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN";
Root: "HKLM32"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN";
Root: "HKLM32"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN";
Root: "HKLM64"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN"; Check: IsWin64
Root: "HKLM64"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN"; Check: IsWin64
[Code]
@ -239,9 +244,9 @@ begin
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\MSCRM','SMTPServer', value) then
begin
if value <> '' then smtpServer:=value;
end
end
end
end;
end;
end;
end;
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','apachePort', value) then
@ -419,7 +424,7 @@ begin
begin
themessage := FmtMessage(CustomMessage('FailedToDeleteLock'),[pathWithSlashes]);
MsgBox(themessage,mbInformation,MB_OK);
end
end;
// Check if parameters already defined in conf.php file
@ -592,7 +597,7 @@ begin
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
SaveStringToFile(destFileA,srcContents, False);
end
end;
if MsgBox(CustomMessage('DoliWampWillStartApacheMysql'),mbConfirmation,MB_YESNO) = IDYES then
@ -615,7 +620,7 @@ begin
StringChangeEx (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
DeleteFile(srcFile);
@ -648,8 +653,8 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
SaveStringToFile(destFile, srcContents, False);
end
end
end;
end;
DeleteFile(srcFile);
@ -679,8 +684,8 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
SaveStringToFile(destFile,srcContents, False);
end
end
end;
end;
@ -703,7 +708,7 @@ begin
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
@ -725,7 +730,7 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
@ -757,7 +762,7 @@ begin
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
SaveStringToFile(destFile, srcContents, False);
end
end;
@ -780,7 +785,7 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
@ -801,7 +806,7 @@ begin
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
@ -822,7 +827,7 @@ begin
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
@ -843,7 +848,7 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
//----------------------------------------------
@ -864,7 +869,7 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
//----------------------------------------------
@ -885,7 +890,7 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
//----------------------------------------------
@ -904,7 +909,7 @@ begin
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
//----------------------------------------------
@ -921,7 +926,7 @@ begin
StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
//----------------------------------------------
// Create file php.ini in apache (if not exists)
@ -937,7 +942,7 @@ begin
StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
@ -979,7 +984,7 @@ begin
res := False;
end
end;
end
else
@ -989,9 +994,9 @@ begin
res := False;
end
end;
end
end;
Result := res;

View File

@ -255,6 +255,9 @@ KeepAliveTimeout 30
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Require all granted
<RequireAny>
Require ip 127.0.0.1
Require host localhost

View File

@ -19,17 +19,11 @@ Alias /phpmyadmin "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/"
#
# instead of
#
# <RequireAny>
# Require ip 127.0.0.1
# Require host localhost
# <RequireAny>
# Require local
#
<Directory "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<RequireAny>
Require ip 127.0.0.1
Require host localhost
</RequireAny>
Require local
</Directory>

View File

@ -1117,6 +1117,7 @@ if ($nboftargetok) {
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
print "Remove tmp file $SOURCE/build/exe/doliwamp/doliwamp.tmp.iss\n";
$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
next;

View File

@ -2,4 +2,4 @@ README
------
Scripts in this directory can be used to load or purge data of a database instance.
WARNING: This may erase data.
WARNING: Some of this script may delete definitely data.

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -15,7 +15,7 @@
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
if [ "x$mydir" = "x" ]
if [ "x$mydir" = 'x' -o "x$mydir" = 'x./' ]
then
export mydir="."
fi
@ -132,24 +132,7 @@ then
exit;;
esac
# ---------------------------- chemin d'acces du repertoire documents
#DIALOG=${DIALOG=dialog}
#fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
#trap "rm -f $fichtemp" 0 1 2 5 15
#$DIALOG --title "Init Dolibarr with demo values" --clear \
# --inputbox "Full path to documents directory (ex: /var/www/dolibarr/documents)- no / at end :" 16 55 2> $fichtemp
#valret=$?
#case $valret in
# 0)
#docs=`cat $fichtemp`;;
# 1)
#exit;;
# 255)
#exit;;
#esac
# ---------------------------- confirmation
DIALOG=${DIALOG=dialog}
$DIALOG --title "Init Dolibarr with demo values" --clear \
@ -177,6 +160,25 @@ echo "mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile"
mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
export res=$?
# ---------------------------- copy demo files
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" `
if [ "x$documentdir" != "x" ]
then
echo cp -pr $mydir/documents_demo/* "$documentdir/"
cp -pr $mydir/documents_demo/* "$documentdir/"
echo cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
mkdir -p "$documentdir/ecm/Administrative documents"
mkdir -p "$documentdir/ecm/Images"
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
else
echo Detection of documents directory failed so demo files were not copied.
fi
if [ "x$res" = "x0" ]
then
echo "Success, file successfully loaded."

File diff suppressed because one or more lines are too long

View File

@ -187,7 +187,6 @@ export list="
--ignore-table=$base.llx_bt_webseedfiles
--ignore-table=$base.llx_c_civilite
--ignore-table=$base.llx_c_dolicloud_plans
--ignore-table=$base.llx_c_lead_status
--ignore-table=$base.llx_c_source
--ignore-table=$base.llx_cabinetmed_c_banques
--ignore-table=$base.llx_cabinetmed_c_ccam

126
dev/initdemo/updatedemo.php Executable file
View File

@ -0,0 +1,126 @@
#!/usr/bin/env php
<?php
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*
* Get a distant dump file and load it into a mysql database
*/
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit;
}
// Global variables
$error=0;
$confirm=isset($argv[1])?$argv[1]:'';
// Include Dolibarr environment
$res=0;
if (! $res && file_exists($path."../../master.inc.php")) $res=@include($path."../../master.inc.php");
if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include($path."../../htdocs/master.inc.php");
if (! $res && file_exists("../master.inc.php")) $res=@include("../master.inc.php");
if (! $res && file_exists("../../master.inc.php")) $res=@include("../../master.inc.php");
if (! $res && file_exists("../../../master.inc.php")) $res=@include("../../../master.inc.php");
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include($path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include("../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
if (! $res) die ("Failed to include master.inc.php file\n");
include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
/*
* Main
*/
if (empty($confirm))
{
print "Usage: $script_file confirm\n";
print "Return code: 0 if success, <>0 if error\n";
exit(-1);
}
$tmp=dol_getdate(dol_now());
$tables=array(
'propal'=>array(0=>'datep', 1=>'fin_validite', 2=>'date_valid', 3=>'date_cloture'),
'commande'=>array(0=>'date_commande', 1=>'date_valid', 2=>'date_cloture'),
'facture'=>array(0=>'datef', 1=>'date_valid', 2=>'date_lim_reglement'),
'paiement'=>array(0=>'datep'),
'bank'=>array(0=>'datev', 1=>'dateo'),
'commande_fournisseur'=>array(0=>'date_commande', 1=>'date_valid', 3=>'date_creation', 4=>'date_approve', 5=>'date_approve2', 6=>'date_livraison'),
'supplier_proposal'=>array(0=>'datec', 1=>'date_valid', 2=>'date_cloture')
);
$year=2010;
$currentyear=$tmp['year'];
while ($year <= $currentyear)
{
//$year=2021;
$delta=($currentyear - $year);
//$delta=-1;
if ($delta)
{
foreach($tables as $tablekey => $tableval)
{
print "\nCorrect ".$tablekey." for year ".$year." and move them to current year ".$currentyear." ";
$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)";
//$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." > NOW()";
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i=0;
while ($i < $num)
{
$obj=$db->fetch_object($resql);
if ($obj)
{
print ".";
$sql2="UPDATE ".MAIN_DB_PREFIX.$tablekey." set ";
$j=0;
foreach($tableval as $field)
{
if ($j) $sql2.=", ";
$sql2.= $field." = DATE_ADD(".$field.", INTERVAL ".$delta." YEAR)";
$j++;
}
$sql2.=" WHERE rowid = ".$obj->rowid;
//print $sql2."\n";
$resql2 = $db->query($sql2);
if (! $resql2) dol_print_error($db);
}
$i++;
}
}
else dol_print_error($db);
}
}
$year++;
}
print "\n";
exit(0);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -141,7 +141,7 @@ print '</td></tr>';
// ICS
print '<tr class="pair"><td class="fieldrequired">'.$langs->trans("ICS").'</td>';
print '<td align="left">';
print '<input type="text" name="PRELEVEMENT_ICS" value="'.$conf->global->PRELEVEMENT_ICS.'" size="9" ></td>';
print '<input type="text" name="PRELEVEMENT_ICS" value="'.$conf->global->PRELEVEMENT_ICS.'" size="15" ></td>';
print '</td></tr>';
//User

View File

@ -176,7 +176,7 @@ if (ini_get('safe_mode') && ! empty($conf->global->MAIN_ANTIVIRUS_COMMAND))
dol_syslog("safe_mode is on, basedir is ".$basedir.", safe_mode_exec_dir is ".ini_get('safe_mode_exec_dir'), LOG_WARNING);
}
}
print '<input type="text" name="MAIN_ANTIVIRUS_COMMAND" size="72" value="'.(! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)?dol_htmlentities($conf->global->MAIN_ANTIVIRUS_COMMAND):'').'">';
print '<input type="text" name="MAIN_ANTIVIRUS_COMMAND" class="minwidth500imp" value="'.(! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)?dol_htmlentities($conf->global->MAIN_ANTIVIRUS_COMMAND):'').'">';
print "</td>";
print '</tr>';
@ -187,7 +187,7 @@ print '<td colspan="2">'.$langs->trans("AntiVirusParam").'<br>';
print $langs->trans("AntiVirusParamExample");
print '</td>';
print '<td>';
print '<input type="text" name="MAIN_ANTIVIRUS_PARAM" size="72" value="'.(! empty($conf->global->MAIN_ANTIVIRUS_PARAM)?dol_htmlentities($conf->global->MAIN_ANTIVIRUS_PARAM):'').'">';
print '<input type="text" name="MAIN_ANTIVIRUS_PARAM" class="minwidth500imp" value="'.(! empty($conf->global->MAIN_ANTIVIRUS_PARAM)?dol_htmlentities($conf->global->MAIN_ANTIVIRUS_PARAM):'').'">';
print "</td>";
print '</tr>';

View File

@ -72,7 +72,7 @@ function printBookmarksList($aDb, $aLangs)
while ($i < $conf->global->BOOKMARKS_SHOW_IN_MENU && $obj = $db->fetch_object($resql))
{
$ret.='<div class="menu_contenu"><a class="vsmenu" title="'.$obj->title.'" href="'.$obj->url.'"'.($obj->target == 1?' target="_blank"':'').'>';
$ret.=' '.img_object('','bookmark').' ';
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $ret.=' '.img_object('','bookmark').' ';
$ret.= dol_trunc($obj->title, 20).'</a><br></div>';
$i++;
}

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
@ -118,9 +118,14 @@ if ($catname || $id > 0)
$categstatic->ref=$cat->label;
$categstatic->label=$cat->label;
$categstatic->type=$cat->type;
$categstatic->color=$cat->color;
print '<span class="noborderoncategories" '.($categstatic->color?' style="background: #'.$categstatic->color.';"':' style="background: #aaa"').'>';
print $categstatic->getNomUrl(1,'');
print '</span>';
print "</td>\n";
print "\t\t<td>";
print $cat->description;
print "</td>\n";
print "\t\t<td>".$cat->description."</td>\n";
print "\t</tr>\n";
}
print "</table>";

View File

@ -876,7 +876,7 @@ else
{
print "\n\n<div class=\"tabsAction\">\n";
if (($object->statut == 0) && $user->rights->mailing->creer)
if (($object->statut == 0 || $object->statut == 1) && $user->rights->mailing->creer)
{
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&amp;id='.$object->id.'">'.$langs->trans("EditMailing").'</a>';
}

View File

@ -1939,7 +1939,7 @@ if ($action == 'create')
print '<tr>';
print '<td width="25%">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('Rate','multicurrency_tx');
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';

View File

@ -2208,7 +2208,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<tr>';
print '<td width="25%">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('Rate','multicurrency_tx');
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';

View File

@ -152,7 +152,7 @@ if($error)
$amount = GETPOST('amount','int');
}
print load_fiche_titre($langs->trans("BankTransfer"), '', 'title_bank.png');
print load_fiche_titre($langs->trans("MenuBankInternalTransfer"), '', 'title_bank.png');
print $langs->trans("TransferDesc");
print "<br><br>";

View File

@ -3559,7 +3559,7 @@ else if ($id > 0 || ! empty($ref))
print '<tr>';
print '<td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('Rate','multicurrency_tx');
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';

View File

@ -509,7 +509,7 @@ if ($object->id > 0)
{
if ($num == 0)
{
if ($object->statut > Facture::STATUS_DRAFT) print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AlreadyPayed")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
if ($object->statut > Facture::STATUS_DRAFT) print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AlreadyPaid")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("Draft")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
}
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("RequestAlreadyDone")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';

View File

@ -548,7 +548,7 @@ else
}
else {
print '<tr><td><label for="socid">'.$langs->trans("ThirdParty").'</label></td><td colspan="3" class="maxwidthonsmartphone">';
print $form->select_company($socid,'socid','',1);
print $form->select_company($socid,'socid','','SelectThirdParty');
print '</td></tr>';
}
}

View File

@ -5012,7 +5012,9 @@ class Form
*/
static function multiSelectArrayWithCheckbox($htmlname, &$array, $varpage)
{
global $user;
global $conf,$user;
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) return '';
$tmpvar="MAIN_SELECTEDFIELDS_".$varpage;
if (! empty($user->conf->$tmpvar))

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2008-2010 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2008-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -25,9 +25,12 @@
* This is source documentation for Dolibarr ERP/CRM.<br>
* This documentation can be built or updated running the script <b>dolibarr-doxygen-build.pl</b> or from Eclipse with Doxygen plugin.<br>
* <br>
* Dolibarr official web site: <a href="http://www.dolibarr.org">www.dolibarr.org</a><br>
* Dolibarr official web site: <a href="https://www.dolibarr.org">www.dolibarr.org</a><br>
* <br>
* Dolibarr french portal: <a href="http://www.dolibarr.fr">www.dolibarr.fr</a><br>
* Dolibarr spanish portal: <a href="http://www.dolibarr.es">www.dolibarr.es</a><br>
* Dolibarr italian portal: <a href="http://www.dolibarr.it">www.dolibarr.it</a><br>
* Dolibarr greek portal: <a href="http://www.dolibarr.gr">www.dolibarr.gr</a><br>
* Dolibarr german portal: <a href="http://www.dolibarr.de">www.dolibarr.de</a><br>
* <br>
*/

View File

@ -182,15 +182,16 @@ function getBrowserInfo($user_agent)
elseif (preg_match('/macintosh/i', $user_agent)) { $os='macintosh'; }
// Name
if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='firefox'; $version=$reg[2]; }
elseif (preg_match('/chrome(\/|\s)([\d\.]+)/i', $user_agent, $reg)) { $name='chrome'; $version=$reg[2]; } // we can have 'chrome (Mozilla...) chrome x.y' in one string
elseif (preg_match('/chrome/i', $user_agent, $reg)) { $name='chrome'; }
elseif (preg_match('/iceweasel/i', $user_agent)) { $name='iceweasel'; $version=$reg[2]; }
elseif (preg_match('/epiphany/i', $user_agent)) { $name='epiphany'; $version=$reg[2]; }
elseif (preg_match('/safari(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='safari'; $version=$reg[2]; } // Safari is often present in string for mobile but its not.
elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='opera'; $version=$reg[2]; }
elseif (preg_match('/(MSIE\s([0-9]+\.[0-9]))|.*(Trident\/[0-9]+.[0-9];\srv:([0-9]+\.[0-9]+))/i', $user_agent, $reg)) { $name='ie'; $version=end($reg); } // MS products at end
if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='firefox'; $version=$reg[2]; }
elseif (preg_match('/chrome(\/|\s)([\d\.]+)/i', $user_agent, $reg)) { $name='chrome'; $version=$reg[2]; } // we can have 'chrome (Mozilla...) chrome x.y' in one string
elseif (preg_match('/chrome/i', $user_agent, $reg)) { $name='chrome'; }
elseif (preg_match('/iceweasel/i', $user_agent)) { $name='iceweasel'; }
elseif (preg_match('/epiphany/i', $user_agent)) { $name='epiphany'; }
elseif (preg_match('/safari(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='safari'; $version=$reg[2]; } // Safari is often present in string for mobile but its not.
elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='opera'; $version=$reg[2]; }
elseif (preg_match('/(MSIE\s([0-9]+\.[0-9]))|.*(Trident\/[0-9]+.[0-9];\srv:([0-9]+\.[0-9]+))/i', $user_agent, $reg)) { $name='ie'; $version=end($reg); } // MS products at end
elseif (preg_match('/l(i|y)n(x|ks)(\(|\/|\s)*([\d\.]+)/i', $user_agent, $reg)) { $name='lynxlinks'; $version=$reg[4]; }
if ($tablet) {
$layout = 'tablet';
} elseif ($phone) {
@ -1009,26 +1010,26 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
global $conf,$langs;
$ret='';
$countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); // See also MAIN_FORCE_STATE_INTO_ADDRESS
$countriesusingstate=array('AU','CA','US','IN','GB','ES','UK','TR'); // See also MAIN_FORCE_STATE_INTO_ADDRESS
// Address
$ret .= $object->address;
// Zip/Town/State
if (in_array($object->country_code,array('US','AU')) || ! empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS)) // US: title firstname name \n address lines \n town, state, zip \n country
if (in_array($object->country_code,array('AU', 'CA', 'US')) || ! empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS)) // US: title firstname name \n address lines \n town, state, zip \n country
{
$ret .= ($ret ? $sep : '' ).$object->town;
if ($object->state)
{
$ret.=", ".$object->state;
$ret.=($ret?", ":'').$object->state;
}
if ($object->zip) $ret .= ', '.$object->zip;
if ($object->zip) $ret .= ($ret?", ":'').$object->zip;
}
else if (in_array($object->country_code,array('GB','UK'))) // UK: title firstname name \n address lines \n town state \n zip \n country
{
$ret .= ($ret ? $sep : '' ).$object->town;
if ($object->state)
{
$ret.=", ".$object->state;
$ret.=($ret?", ":'').$object->state;
}
if ($object->zip) $ret .= ($ret ? $sep : '' ).$object->zip;
}
@ -5603,7 +5604,7 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0)
*
* @param string $file Original filename (full or relative path)
* @param string $extName Extension to differenciate thumb file name ('', '_small', '_mini')
* @param string $extImgTarget Force image extension for thumbs. Use '' to keep same extension than original image. Use '.png' for generated thumb files.
* @param string $extImgTarget Force image extension for thumbs. Use '' to keep same extension than original image (default).
* @return string New file name (full or relative path, including the thumbs/)
*/
function getImageFileNameForSize($file, $extName, $extImgTarget='')

View File

@ -133,8 +133,10 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$m
*/
function print_start_menu_array_auguria()
{
global $conf;
print '<div class="tmenudiv">';
print '<ul class="tmenu">';
print '<ul class="tmenu"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?'':' title="Top menu"').'>';
}
/**

View File

@ -342,8 +342,10 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
*/
function print_start_menu_array()
{
global $conf;
print '<div class="tmenudiv">';
print '<ul class="tmenu">';
print '<ul class="tmenu"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?'':' title="Top menu"').'>';
}
/**
@ -1062,7 +1064,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add("/compta/bank/search.php",$langs->trans("ListTransactions"),1,$user->rights->banque->lire);
$newmenu->add("/compta/bank/budget.php",$langs->trans("ListTransactionsByCategory"),1,$user->rights->banque->lire);
$newmenu->add("/compta/bank/virement.php",$langs->trans("BankTransfers"),1,$user->rights->banque->transfer);
$newmenu->add("/compta/bank/virement.php",$langs->trans("MenuBankInternalTransfer"),1,$user->rights->banque->transfer);
}
if (! empty($conf->categorie->enabled)) {

View File

@ -307,8 +307,10 @@ class MenuManager
*/
function print_start_menu_array_empty()
{
global $conf;
print '<div class="tmenudiv">';
print '<ul class="tmenu">';
print '<ul class="tmenu"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?'':' title="Top menu"').'>';
}
/**

View File

@ -145,7 +145,7 @@ class modOpenSurvey extends DolibarrModules
'langs'=>'opensurvey',
'position'=>200,
'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
'perms'=>'',
'perms'=>'$user->rights->opensurvey->read',
'target'=>'',
'user'=>0);
$r++;
@ -173,7 +173,7 @@ class modOpenSurvey extends DolibarrModules
'langs'=>'opensurvey',
'position'=>220,
'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
'perms'=>'',
'perms'=>'$user->rights->opensurvey->read',
'target'=>'',
'user'=>0);
$r++;

View File

@ -190,7 +190,7 @@ class modResource extends DolibarrModules
$r++;
$this->rights[$r][0] = 63004;
$this->rights[$r][1] = 'Link resources';
$this->rights[$r][1] = 'Link resources to agenda events';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'link';
$r++;

View File

@ -77,7 +77,7 @@ class modSociete extends DolibarrModules
$this->const[$r][0] = "SOCIETE_CODECLIENT_ADDON";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "mod_codeclient_leopard";
$this->const[$r][2] = "mod_codeclient_monkey";
$this->const[$r][3] = 'Module to control third parties codes';
$this->const[$r][4] = 0;
$r++;

View File

@ -239,14 +239,15 @@ class EcmDirectory // extends CommonObject
/**
* Update cache of nb of documents into database
*
* @param string $sign '+' or '-'
* @param string $value '+' or '-' or new number
* @return int <0 if KO, >0 if OK
*/
function changeNbOfFiles($sign)
function changeNbOfFiles($value)
{
// Update request
$sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories SET";
$sql.= " cachenbofdoc = cachenbofdoc ".$sign." 1";
if (preg_match('/[0-9]+/', $value)) $sql.= " cachenbofdoc = ".(int) $value;
else $sql.= " cachenbofdoc = cachenbofdoc ".$value." 1";
$sql.= " WHERE rowid = ".$this->id;
dol_syslog(get_class($this)."::changeNbOfFiles", LOG_DEBUG);
@ -256,6 +257,12 @@ class EcmDirectory // extends CommonObject
$this->error="Error ".$this->db->lasterror();
return -1;
}
else
{
if (preg_match('/[0-9]+/', $value)) $this->cachenbofdoc = (int) $value;
else if ($value == '+') $this->cachenbofdoc++;
else if ($value == '-') $this->cachenbofdoc--;
}
return 1;
}

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2008-2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -272,7 +272,13 @@ print '<tr><td>'.$langs->trans("ECMDirectoryForFiles").'</td><td>';
print '/ecm/'.$relativepath;
print '</td></tr>';
print '<tr><td>'.$langs->trans("ECMNbOfDocs").'</td><td>';
print count($filearray);
$nbofiles=count($filearray);
print $nbofiles;
// Test if nb is same than in cache
if ($nbofiles != $ecmdir->cachenbofdoc)
{
$ecmdir->changeNbOfFiles((string) $nbofiles);
}
print '</td></tr>';
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td>';
print dol_print_size($totalsize);

View File

@ -201,8 +201,11 @@ if ($action == 'confirm_deletesection' && GETPOST('confirm') == 'yes')
}
// Refresh directory view
// This refresh list of dirs, not list of files (for preformance reason). List of files is refresh only if dir was not synchronized.
// To refresh content of dir with cache, just open the dir in edit mode.
if ($action == 'refreshmanual')
{
$ecmdirtmp = new EcmDirectory($db);
// This part of code is same than into file ecm/ajax/ecmdatabase.php TODO Remove duplicate

View File

@ -50,6 +50,7 @@ $(document).ready(function() {
);
$('#refreshbutton').click( function() {
console.log("Click on refreshbutton");
$.pleaseBePatient("<?php echo $langs->trans('PleaseBePatient'); ?>");
$.get( "<?php echo DOL_URL_ROOT . '/ecm/ajax/ecmdatabase.php'; ?>", {
action: "build",

View File

@ -1865,7 +1865,7 @@ elseif (! empty($object->id))
print '<tr>';
print '<td width="25%">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('Rate','multicurrency_tx');
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';

View File

@ -1901,7 +1901,7 @@ else
print '<tr>';
print '<td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('Rate','multicurrency_tx');
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';

View File

@ -41,6 +41,7 @@ delete from llx_livraisondet where fk_livraison in (select rowid from llx_livrai
delete from llx_livraison where ref = '';
delete from llx_expeditiondet where fk_expedition in (select rowid from llx_expedition where ref = '');
delete from llx_expedition where ref = '';
delete from llx_holiday_logs where fk_user_update not IN (select rowid from llx_user);
update llx_deplacement set dated='2010-01-01' where dated < '2000-01-01';

View File

@ -383,7 +383,8 @@ EnableFileCache=Enable file cache
ShowDetailsInPDFPageFoot=Add more details into footer of PDF files, like your company address, or manager names (to complete professional ids, company capital and VAT number).
NoDetails=No more details in footer
DisplayCompanyInfo=Display company address
DisplayCompanyInfoAndManagers=Display company and manager names
DisplayCompanyManagers=Display manager names
DisplayCompanyInfoAndManagers=Display company address and manager names
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.
ModuleCompanyCodeAquarium=Return an accountancy code built by:<br>%s followed by third party supplier code for a supplier accountancy code,<br>%s followed by third party customer code for a customer accountancy code.
ModuleCompanyCodePanicum=Return an empty accountancy code.
@ -780,6 +781,10 @@ Permission55002=Create/modify polls
Permission59001=Read commercial margins
Permission59002=Define commercial margins
Permission59003=Read every user margin
Permission63001=Read resources
Permission63002=Create/modify resources
Permission63003=Delete resources
Permission63004=Link resources to agenda events
DictionaryCompanyType=Types of thirdparties
DictionaryCompanyJuridicalType=Legal forms of thirdparties
DictionaryProspectLevel=Prospect potential level
@ -1255,7 +1260,7 @@ LDAPFieldCompanyExample=Example : o
LDAPFieldSid=SID
LDAPFieldSidExample=Example : objectsid
LDAPFieldEndLastSubscription=Date of subscription end
LDAPFieldTitle=Post/Function
LDAPFieldTitle=Job position
LDAPFieldTitleExample=Example: title
LDAPSetupNotComplete=LDAP setup not complete (go on others tabs)
LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode.

View File

@ -94,7 +94,8 @@ WithdrawalPayment=Withdrawal payment
SocialContributionPayment=Social/fiscal tax payment
BankTransfer=Bank transfer
BankTransfers=Bank transfers
TransferDesc=Transfer from one account to another one, Dolibarr will write two records (a debit in source account and a credit in target account, of the same amount. The same label and date will be used for this transaction)
MenuBankInternalTransfer=Internal transfer
TransferDesc=Transfer from one account to another one, Dolibarr will write two records (a debit in source account and a credit in target account. The same amount (except sign), label and date will be used for this transaction)
TransferFrom=From
TransferTo=To
TransferFromToDone=A transfer from <b>%s</b> to <b>%s</b> of <b>%s</b> %s has been recorded.

View File

@ -47,7 +47,7 @@ CivilityCode=Civility code
RegisteredOffice=Registered office
Lastname=Last name
Firstname=First name
PostOrFunction=Post/Function
PostOrFunction=Job position
UserTitle=Title
Address=Address
State=State/Province
@ -64,7 +64,7 @@ Chat=Chat
PhonePro=Prof. phone
PhonePerso=Pers. phone
PhoneMobile=Mobile
No_Email=Don't send mass e-mailings
No_Email=Refuse mass e-mailings
Fax=Fax
Zip=Zip Code
Town=City
@ -294,6 +294,7 @@ ContactForProposals=Proposal's contact
ContactForContracts=Contract's contact
ContactForInvoices=Invoice's contact
NoContactForAnyOrder=This contact is not a contact for any order
NoContactForAnyOrderOrShipments=This contact is not a contact for any order or shipment
NoContactForAnyProposal=This contact is not a contact for any commercial proposal
NoContactForAnyContract=This contact is not a contact for any contract
NoContactForAnyInvoice=This contact is not a contact for any invoice

View File

@ -278,6 +278,7 @@ MonthOfDay=Month of the day
HourShort=H
MinuteShort=mn
Rate=Rate
CurrencyRate=Currency conversion rate
UseLocalTax=Include tax
Bytes=Bytes
KiloBytes=Kilobytes

View File

@ -41,3 +41,4 @@ rateMustBeNumeric=Rate must be a numeric value
markRateShouldBeLesserThan100=Mark rate should be lower than 100
ShowMarginInfos=Show margin infos
CheckMargins=Margins detail
MarginPerSaleRepresentativeWarning=The report of margin per user use the link between thirdparties and sale representatives to calculate the margin of each user. Because some thirdparties may not be linked to any sale representative and some thirdparties may be linked to several users, some margins may not appears in these report or may appears in several different lines.

View File

@ -59,6 +59,8 @@ SellingPriceHT=Selling price (net of tax)
SellingPriceTTC=Selling price (inc. tax)
CostPriceDescription=This price (net of tax) can be used to store the average amount this product cost to your company. It may be any price you calculate yourself, for example from the average buying price plus average production and distribution cost.
CostPriceUsage=In a future version, this value could be used for margin calculation.
SoldAmount=Sold amount
PurchasedAmount=Purchased amount
NewPrice=New price
MinPrice=Min. selling price
CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount.

View File

@ -7,8 +7,8 @@ NewSalaryPayment=New salary payment
SalaryPayment=Salary payment
SalariesPayments=Salaries payments
ShowSalaryPayment=Show salary payment
THM=Average hourly price
TJM=Average daily price
THM=Average hourly rate
TJM=Average daily rate
CurrentSalary=Current salary
THMDescription=This value may be used to calculate cost of time consumed on a project entered by users if module project is used
TJMDescription=This value is currently as information only and is not used for any calculation

View File

@ -766,7 +766,7 @@ if (! GETPOST('nojs')) // If javascript was not disabled on URL
}
else $conf->use_javascript_ajax=0;
// Set MAIN_OPTIMIZEFORTEXTBROWSER
if (GETPOST('textbrowser') || ! empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) // If text browser was enabled on URL
if (GETPOST('textbrowser') || (! empty($conf->browser->name) && $conf->browser->name == 'lynxlinks') || ! empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) // If we must enable text browser
{
$conf->global->MAIN_OPTIMIZEFORTEXTBROWSER=1;
}
@ -1437,21 +1437,24 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
if (! empty($conf->global->MAIN_FEATURES_LEVEL)) $appli.="<br>".$langs->trans("LevelOfFeature").': '.$conf->global->MAIN_FEATURES_LEVEL;
$logouttext='';
$logouthtmltext=$appli.'<br>';
if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http')
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
$logouthtmltext.=$langs->trans("Logout").'<br>';
$logouttext .='<a href="'.DOL_URL_ROOT.'/user/logout.php">';
$logouttext .= img_picto($langs->trans('Logout').":".$langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1);
$logouttext .='</a>';
$logouthtmltext=$appli.'<br>';
if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http')
{
$logouthtmltext.=$langs->trans("Logout").'<br>';
$logouttext .='<a href="'.DOL_URL_ROOT.'/user/logout.php">';
$logouttext .= img_picto($langs->trans('Logout').":".$langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1);
$logouttext .='</a>';
}
else
{
$logouthtmltext.=$langs->trans("NoLogoutProcessWithAuthMode",$_SESSION["dol_authmode"]);
$logouttext .= img_picto($langs->trans('Logout').":".$langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1);
}
}
else
{
$logouthtmltext.=$langs->trans("NoLogoutProcessWithAuthMode",$_SESSION["dol_authmode"]);
$logouttext .= img_picto($langs->trans('Logout').":".$langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1);
}
print '<div class="login_block">'."\n";
// Add login user link
@ -1664,7 +1667,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra
// Left column
print '<!-- Begin left menu -->'."\n";
print '<div class="vmenu">'."\n\n";
print '<div class="vmenu"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?'':' title="Left menu"').'>'."\n\n";
// Show left menu with other forms
$menumanager->menu_array = $menu_array_before;

View File

@ -91,12 +91,10 @@ dol_fiche_head($head, 'agentMargins', $titre, 0, $picto);
print '<form method="post" name="sel" action="'.$_SERVER['PHP_SELF'].'">';
print '<table class="border" width="100%">';
if ($user->rights->margins->read->all) {
print '<tr><td width="20%">'.$langs->trans('SalesRepresentative').'</td>';
print '<td colspan="4">';
print $form->select_dolusers($agentid, 'agentid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
print '</td></tr>';
}
print '<tr><td width="20%">'.$langs->trans('SalesRepresentative').'</td>';
print '<td colspan="4">';
print $form->select_dolusers($agentid, 'agentid', 1, '', $user->rights->margins->read->all ? 0 : 1, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
print '</td></tr>';
// Start date
print '<td>'.$langs->trans('DateStart').' ('.$langs->trans("DateValidation").')</td>';
@ -153,6 +151,11 @@ $sql.=$db->order($sortfield,$sortorder);
// TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
print '<br>';
print img_info('').' '.$langs->trans("MarginPerSaleRepresentativeWarning").'<br>';
dol_syslog('margin::agentMargins.php', LOG_DEBUG);
$result = $db->query($sql);
if ($result)

View File

@ -261,7 +261,7 @@ if ($result)
$companystatic->id=$objp->socid;
$companystatic->name=$objp->name;
$companystatic->client=$objp->client;
print "<td>".$companystatic->getNomUrl(1,'customer')."</td>\n";
print "<td>".$companystatic->getNomUrl(1,'margin')."</td>\n";
}
print "<td align=\"right\">".price($pv, null, null, null, null, $rounding)."</td>\n";
@ -282,16 +282,16 @@ if ($result)
// affichage totaux marges
$var=!$var;
$totalMargin = $cumul_vente - $cumul_achat;
if ($totalMargin < 0)
/*if ($totalMargin < 0)
{
$marginRate = ($cumul_achat != 0)?-1*(100 * $totalMargin / $cumul_achat):'';
$markRate = ($cumul_vente != 0)?-1*(100 * $totalMargin / $cumul_vente):'';
}
else
{
{*/
$marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):'';
$markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):'';
}
//}
print '<tr class="liste_total">';
if ($client)

View File

@ -295,16 +295,16 @@ if ($result)
// affichage totaux marges
$var=!$var;
$totalMargin = $cumul_vente - $cumul_achat;
if ($totalMargin < 0)
/*if ($totalMargin < 0)
{
$marginRate = ($cumul_achat != 0)?-1*(100 * $totalMargin / $cumul_achat):'';
$markRate = ($cumul_vente != 0)?-1*(100 * $totalMargin / $cumul_vente):'';
}
else
{
{*/
$marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):'';
$markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):'';
}
//}
print '<tr class="liste_total">';
if ($id > 0)
print '<td colspan=2>';

View File

@ -225,7 +225,7 @@ if ($id > 0 || ! empty($ref))
$markRate = ($cumul_vente != 0)?-1*(100 * $totalMargin / $cumul_vente):'';
}
else
{
{
$marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):'';
$markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):'';
}

View File

@ -176,8 +176,8 @@ if ($socid > 0)
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Invoice"),$_SERVER["PHP_SELF"],"f.facnumber","","&amp;socid=".$_REQUEST["socid"],'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&amp;socid=".$_REQUEST["socid"],'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("SellingPrice"),$_SERVER["PHP_SELF"],"selling_price","","&amp;socid=".$_REQUEST["socid"],'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("BuyingPrice"),$_SERVER["PHP_SELF"],"buying_price","","&amp;socid=".$_REQUEST["socid"],'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("SoldAmount"),$_SERVER["PHP_SELF"],"selling_price","","&amp;socid=".$_REQUEST["socid"],'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("PurchasedAmount"),$_SERVER["PHP_SELF"],"buying_price","","&amp;socid=".$_REQUEST["socid"],'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Margin"),$_SERVER["PHP_SELF"],"marge","","&amp;socid=".$_REQUEST["socid"],'align="right"',$sortfield,$sortorder);
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
print_liste_field_titre($langs->trans("MarginRate"),$_SERVER["PHP_SELF"],"","","&amp;socid=".$_REQUEST["socid"],'align="right"',$sortfield,$sortorder);
@ -221,8 +221,8 @@ if ($socid > 0)
print '<td align="right">'.$invoicestatic->LibStatut($objp->paye,$objp->statut,5).'</td>';
print "</tr>\n";
$i++;
$cumul_achat += $objp->buying_price;
$cumul_vente += $objp->selling_price;
$cumul_achat += ($objp->type == 2 ? -1 : 1) * $objp->buying_price;
}
}
@ -239,6 +239,8 @@ if ($socid > 0)
$marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):'';
$markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):'';
}
// Total
print '<tr class="liste_total">';
print '<td colspan=2>'.$langs->trans('TotalMargin')."</td>";
print "<td align=\"right\">".price($cumul_vente, null, null, null, null, $rounding)."</td>\n";

View File

@ -84,15 +84,15 @@ if (empty($reshook))
// Visible
$alwayscheckedmodules=array('barcode','bookmark','categorie','externalrss','fckeditor','geoipmaxmind','gravatar','memcached','syslog','user','webservices'); // Technical module we always want
$alwaysuncheckedmodules=array('dynamicprices','loan','multicurrency','paybox','paypal','google','printing','resource','scanner','workflow'); // Module we never want
$alwaysuncheckedmodules=array('dynamicprices','loan','multicurrency','paybox','paypal','google','printing','scanner','workflow'); // Module we never want
// Not visible
$alwayshiddencheckedmodules=array('accounting','barcode','bookmark','clicktodial','comptabilite','document','domain','externalrss','externalsite','fckeditor','geoipmaxmind','gravatar','label','ldap',
$alwayshiddencheckedmodules=array('accounting','api','barcode','bookmark','clicktodial','comptabilite','cron','document','domain','externalrss','externalsite','fckeditor','geoipmaxmind','gravatar','label','ldap',
'mailmanspip','notification','oauth','syslog','user','webservices',
// Extended modules
'memcached','numberwords','zipautofillfr');
$alwayshiddenuncheckedmodules=array('ftp','webservicesclient','api','websites',
$alwayshiddenuncheckedmodules=array('ftp','webservicesclient','websites',
// Extended modules
'awstats','bittorrent','bootstrap','cabinetmed','cmcic','concatpdf','customfield','dolicloud','filemanager','lightbox','mantis','monitoring','moretemplates','multicompany','nltechno','numberingpack','openstreetmap',
'awstats','bittorrent','bootstrap','cabinetmed','cmcic','concatpdf','customfield','deplacement','dolicloud','filemanager','lightbox','mantis','monitoring','moretemplates','multicompany','nltechno','numberingpack','openstreetmap',
'ovh','phenix','phpsysinfo','pibarcode','postnuke','selectbank','skincoloreditor','submiteverywhere','survey','thomsonphonebook','topten','tvacerfa','voyage','webcalendar','webmail');
}

View File

@ -1869,7 +1869,12 @@ class Societe extends CommonObject
$label.= '<u>' . $langs->trans("ShowCategorySupplier") . '</u>';
$link = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=1';
}
else if ($option == 'margin')
{
$label.= '<u>' . $langs->trans("ShowMargin") . '</u>';
$link = '<a href="'.DOL_URL_ROOT.'/margin/tabs/thirdpartyMargins.php?socid='.$this->id.'&type=1';
}
// By default
if (empty($link))
{

View File

@ -456,22 +456,22 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer)
}
// IBAN
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("IBAN").'</td>';
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("IBAN").'</td>';
print '<td colspan="4"><input size="30" type="text" name="iban" value="'.$account->iban.'"></td></tr>';
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("BIC").'</td>';
print '<tr><td class="fieldrequired">'.$langs->trans("BIC").'</td>';
print '<td colspan="4"><input size="12" type="text" name="bic" value="'.$account->bic.'"></td></tr>';
print '<tr><td valign="top">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="4">';
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="4">';
print '<textarea name="domiciliation" rows="4" cols="40">';
print $account->domiciliation;
print "</textarea></td></tr>";
print '<tr><td valign="top">'.$langs->trans("BankAccountOwner").'</td>';
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
print '<td colspan="4"><input size="30" type="text" name="proprio" value="'.$account->proprio.'"></td></tr>';
print "</td></tr>\n";
print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="4">';
print '<tr><td>'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="4">';
print "<textarea name=\"owner_address\" rows=\"4\" cols=\"40\">";
print $account->owner_address;
print "</textarea></td></tr>";
@ -488,11 +488,11 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer)
// RUM
print '<tr><td class="titlefield">'.$langs->trans("RUM").'</td>';
print '<td>'.$account->rum.'</td></tr>';
print '<td colspan="4">'.$account->rum.'</td></tr>';
// FRSTRECUR
print '<tr><td>'.$langs->trans("WithdrawMode").'</td>';
print '<td><input size="30" type="text" name="frstrecur" value="'.(GETPOST('frstrecur')?GETPOST('frstrecur'):$account->frstrecur).'"></td></tr>';
print '<td colspan="4"><input size="30" type="text" name="frstrecur" value="'.(GETPOST('frstrecur')?GETPOST('frstrecur'):$account->frstrecur).'"></td></tr>';
print '</table>';
}
@ -521,7 +521,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer)
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
print '<tr><td valign="top" class="titlefield fieldrequired">'.$langs->trans("LabelRIB").'</td>';
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("LabelRIB").'</td>';
print '<td colspan="4"><input size="30" type="text" name="label" value="'.GETPOST('label').'"></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("Bank").'</td>';
@ -557,22 +557,22 @@ if ($socid && $action == 'create' && $user->rights->societe->creer)
}
// IBAN
print '<tr><td valign="top">'.$langs->trans("IBAN").'</td>';
print '<tr><td>'.$langs->trans("IBAN").'</td>';
print '<td colspan="4"><input size="30" type="text" name="iban" value="'.GETPOST('iban').'"></td></tr>';
print '<tr><td valign="top">'.$langs->trans("BIC").'</td>';
print '<tr><td>'.$langs->trans("BIC").'</td>';
print '<td colspan="4"><input size="12" type="text" name="bic" value="'.GETPOST('bic').'"></td></tr>';
print '<tr><td valign="top">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="4">';
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="4">';
print '<textarea name="domiciliation" rows="4" cols="40">';
print GETPOST('domiciliation');
print "</textarea></td></tr>";
print '<tr><td valign="top">'.$langs->trans("BankAccountOwner").'</td>';
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
print '<td colspan="4"><input size="30" type="text" name="proprio" value="'.GETPOST('proprio').'"></td></tr>';
print "</td></tr>\n";
print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="4">';
print '<tr><td>'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="4">';
print '<textarea name="owner_address" rows="4" cols="40">';
print GETPOST('owner_address');
print "</textarea></td></tr>";
@ -586,7 +586,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer)
print '<table class="border" width="100%">';
// RUM
print '<tr><td class="titlefield">'.$langs->trans("RUM").'</td>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("RUM").'</td>';
print '<td>'.$langs->trans("RUMWillBeGenerated").'</td></tr>';
// FRSTRECUR

View File

@ -1488,7 +1488,7 @@ if ($action == 'create')
}
// Multicurrency
if ( empty($conf->multicurrency->enabled))
if (! empty($conf->multicurrency->enabled))
{
// Multicurrency code
print '<tr>';
@ -1511,7 +1511,7 @@ if ($action == 'create')
print '<tr>';
print '<td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('Rate','multicurrency_tx');
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';

View File

@ -61,6 +61,8 @@ $sall=GETPOST("sall");
$mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
$year=GETPOST("year");
$month=GETPOST("month");
$yearvalid=GETPOST("yearvalid");
$monthvalid=GETPOST("monthvalid");
// Nombre de ligne pour choix de produit/service predefinis
$NBLINES=4;
@ -130,6 +132,8 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPO
$search_societe='';
$search_montant_ht='';
$search_author='';
$yearvalid='';
$monthvalid='';
$year='';
$month='';
$viewstatut='';
@ -192,7 +196,7 @@ $companystatic=new Societe($db);
$now=dol_now();
$sql = 'SELECT s.rowid, s.nom as name, s.town, s.client, s.code_client,';
$sql.= ' p.rowid as supplier_proposalid, p.note_private, p.total_ht, p.ref, p.fk_statut, p.fk_user_author, p.date_livraison as dp,';
$sql.= ' p.rowid as supplier_proposalid, p.note_private, p.total_ht, p.ref, p.fk_statut, p.fk_user_author, p.date_valid, p.date_livraison as dp,';
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,";
$sql.= ' u.login';
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'supplier_proposal as p';
@ -211,28 +215,13 @@ if (! $user->rights->societe->client->voir && ! $socid) //restriction
{
$sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
}
if ($search_ref) {
$sql .= natural_search('p.ref', $search_ref);
}
if ($search_societe) {
$sql .= natural_search('s.nom', $search_societe);
}
if ($search_author)
{
$sql.= " AND u.login LIKE '%".$db->escape(trim($search_author))."%'";
}
if ($search_montant_ht)
{
$sql.= " AND p.total_ht='".$db->escape(price2num(trim($search_montant_ht)))."'";
}
if ($sall) {
$sql .= natural_search(array_keys($fieldstosearchall), $sall);
}
if ($search_ref) $sql .= natural_search('p.ref', $search_ref);
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
if ($search_author) $sql.= " AND u.login LIKE '%".$db->escape(trim($search_author))."%'";
if ($search_montant_ht) $sql.= " AND p.total_ht='".$db->escape(price2num(trim($search_montant_ht)))."'";
if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
if ($socid) $sql.= ' AND s.rowid = '.$socid;
if ($viewstatut <> '')
{
$sql.= ' AND p.fk_statut IN ('.$viewstatut.')';
}
if ($viewstatut <> '') $sql.= ' AND p.fk_statut IN ('.$viewstatut.')';
if ($month > 0)
{
if ($year > 0 && empty($day))
@ -246,6 +235,19 @@ else if ($year > 0)
{
$sql.= " AND p.date_livraison BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
}
if ($monthvalid > 0)
{
if ($yearvalid > 0 && empty($dayvalid))
$sql.= " AND p.date_valid BETWEEN '".$db->idate(dol_get_first_day($yearvalid,$monthvalid,false))."' AND '".$db->idate(dol_get_last_day($yearvalid,$monthvalid,false))."'";
else if ($yearvalid > 0 && ! empty($dayvalid))
$sql.= " AND p.date_valid BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $monthvalid, $dayvalid, $yearvalid))."' AND '".$db->idate(dol_mktime(23, 59, 59, $monthvalid, $dayvalid, $yearvalid))."'";
else
$sql.= " AND date_format(p.date_valid, '%m') = '".$monthvalid."'";
}
else if ($yearvalid > 0)
{
$sql.= " AND p.date_valid BETWEEN '".$db->idate(dol_get_first_day($yearvalid,1,false))."' AND '".$db->idate(dol_get_last_day($yearvalid,12,false))."'";
}
if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale;
if ($search_user > 0)
{
@ -341,6 +343,7 @@ if ($result)
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Supplier'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Date'),$_SERVER["PHP_SELF"],'p.date_valid','',$param, 'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('SupplierProposalDate'),$_SERVER["PHP_SELF"],'p.date_livraison','',$param, 'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('AmountHT'),$_SERVER["PHP_SELF"],'p.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Author'),$_SERVER["PHP_SELF"],'u.login','',$param,'align="center"',$sortfield,$sortorder);
@ -356,6 +359,15 @@ if ($result)
print '<input class="flat" type="text" size="12" name="search_societe" value="'.$search_societe.'">';
print '</td>';
// Date valid
print '<td class="liste_titre" colspan="1" align="center">';
//print $langs->trans('Month').': ';
print '<input class="flat" type="text" size="1" maxlength="2" name="monthvalid" value="'.$monthvalid.'">';
//print '&nbsp;'.$langs->trans('Year').': ';
$syearvalid = $yearvalid;
$formother->select_year($syearvalid,'yearvalid',1, 20, 5);
print '</td>';
// Date
print '<td class="liste_titre" colspan="1" align="center">';
//print $langs->trans('Month').': ';
@ -435,7 +447,12 @@ if ($result)
print $companystatic->getNomUrl(1,'customer');
print '</td>';
// Date askprice
// Date
print '<td align="center">';
print dol_print_date($db->jdate($objp->date_valid), 'day');
print "</td>\n";
// Date delivery
print '<td align="center">';
print dol_print_date($db->jdate($objp->dp), 'day');
print "</td>\n";
@ -466,14 +483,14 @@ if ($result)
if($num<$limit){
$var=!$var;
print '<tr class="liste_total"><td align="left">'.$langs->trans("TotalHT").'</td>';
print '<td colspan="3" align="right">'.price($total).'</td><td colspan="3"></td>';
print '<td colspan="4" align="right">'.price($total).'</td><td colspan="3"></td>';
print '</tr>';
}
else
{
$var=!$var;
print '<tr class="liste_total"><td align="left">'.$langs->trans("TotalHTforthispage").'</td>';
print '<td colspan="3" align="right">'.price($total).'</td><td colspan="3"></td>';
print '<td colspan="4" align="right">'.price($total).'</td><td colspan="3"></td>';
print '</tr>';
}

View File

@ -46,7 +46,7 @@ CKEDITOR.editorConfig = function( config )
// Used for mailing fields
config.toolbar_dolibarr_mailings =
[
['Source','Maximize'],
['Source','Maximize','Preview'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Format','Font','FontSize'],

View File

@ -603,6 +603,12 @@ div.myavailability {
.minwidth300 { min-width: 300px; }
.minwidth400 { min-width: 400px; }
.minwidth500 { min-width: 500px; }
.minwidth50imp { min-width: 50px !important; }
.minwidth100imp { min-width: 100px !important; }
.minwidth200imp { min-width: 200px !important; }
.minwidth300imp { min-width: 300px !important; }
.minwidth400imp { min-width: 400px !important; }
.minwidth500imp { min-width: 500px !important; }
.maxwidth100 { max-width: 100px; }
.maxwidth150 { max-width: 150px; }
.maxwidth200 { max-width: 200px; }
@ -619,6 +625,22 @@ div.myavailability {
{
.titlefield { width: 30% !important; }
.titlefieldcreate { width: 30% !important; }
.minwidth50imp { min-width: 50px !important; }
.minwidth100imp { min-width: 100px !important; }
.minwidth200imp { min-width: 200px !important; }
.minwidth300imp { min-width: 300px !important; }
.minwidth400imp { min-width: 300px !important; }
.minwidth500imp { min-width: 300px !important; }
}
@media only screen and (max-width: 960px)
{
.minwidth50imp { min-width: 50px !important; }
.minwidth100imp { min-width: 50px !important; }
.minwidth200imp { min-width: 100px !important; }
.minwidth300imp { min-width: 100px !important; }
.minwidth400imp { min-width: 100px !important; }
.minwidth500imp { min-width: 100px !important; }
}
/* Force values for small screen */
@ -631,6 +653,12 @@ div.myavailability {
.maxwidth200onsmartphone { max-width: 200px; }
.maxwidth300onsmartphone { max-width: 300px; }
.maxwidth400onsmartphone { max-width: 400px; }
.minwidth50imp { min-width: 50px !important; }
.minwidth100imp { min-width: 50px !important; }
.minwidth200imp { min-width: 50px !important; }
.minwidth300imp { min-width: 50px !important; }
.minwidth400imp { min-width: 50px !important; }
.minwidth500imp { min-width: 50px !important; }
.titlefield { width: auto; }
.titlefieldcreate { width: auto; }
}

View File

@ -46,7 +46,7 @@ CKEDITOR.editorConfig = function( config )
// Used for mailing fields
config.toolbar_dolibarr_mailings =
[
['Source','Maximize'],
['Source','Maximize','Preview'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Format','Font','FontSize'],

View File

@ -601,6 +601,12 @@ div.myavailability {
.minwidth300 { min-width: 300px; }
.minwidth400 { min-width: 400px; }
.minwidth500 { min-width: 500px; }
.minwidth50imp { min-width: 50px !important; }
.minwidth100imp { min-width: 100px !important; }
.minwidth200imp { min-width: 200px !important; }
.minwidth300imp { min-width: 300px !important; }
.minwidth400imp { min-width: 400px !important; }
.minwidth500imp { min-width: 500px !important; }
.maxwidth100 { max-width: 100px; }
.maxwidth150 { max-width: 150px; }
.maxwidth200 { max-width: 200px; }
@ -617,6 +623,22 @@ div.myavailability {
{
.titlefield { width: 30% !important; }
.titlefieldcreate { width: 30% !important; }
.minwidth50imp { min-width: 50px !important; }
.minwidth100imp { min-width: 100px !important; }
.minwidth200imp { min-width: 200px !important; }
.minwidth300imp { min-width: 300px !important; }
.minwidth400imp { min-width: 300px !important; }
.minwidth500imp { min-width: 300px !important; }
}
@media only screen and (max-width: 960px)
{
.minwidth50imp { min-width: 50px !important; }
.minwidth100imp { min-width: 50px !important; }
.minwidth200imp { min-width: 100px !important; }
.minwidth300imp { min-width: 100px !important; }
.minwidth400imp { min-width: 100px !important; }
.minwidth500imp { min-width: 100px !important; }
}
/* Force values for small screen */
@ -629,6 +651,12 @@ div.myavailability {
.maxwidth200onsmartphone { max-width: 200px; }
.maxwidth300onsmartphone { max-width: 300px; }
.maxwidth400onsmartphone { max-width: 400px; }
.minwidth50imp { min-width: 50px !important; }
.minwidth100imp { min-width: 50px !important; }
.minwidth200imp { min-width: 50px !important; }
.minwidth300imp { min-width: 50px !important; }
.minwidth400imp { min-width: 50px !important; }
.minwidth500imp { min-width: 50px !important; }
.titlefield { width: auto; }
.titlefieldcreate { width: auto; }
}