Merge remote-tracking branch 'origin/3.7' into 3.7_bug

This commit is contained in:
Regis Houssin 2015-06-13 09:37:55 +02:00
commit 296b76603a
8 changed files with 35 additions and 20 deletions

View File

@ -8,6 +8,8 @@ You may also experience troubles with Mysql 5.5.41 with error "Lost connection"
Upgrading to any other version or database system is abolutely required BEFORE trying to
make a Dolibarr upgrade.
***** ChangeLog for 3.7.2 compared to 3.7.1 *****
FIX [ bug #2855 ] Wrong translation key in localtax report page
***** ChangeLog for 3.7.1 compared to 3.7.* *****
FIX Bug in the new photo system

View File

@ -109,7 +109,7 @@ $calc=$conf->global->MAIN_INFO_LOCALTAX_CALC.$local;
if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice for goods and services
{
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT'.$local.'Rec");
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");

View File

@ -129,7 +129,7 @@ $calc=$conf->global->MAIN_INFO_LOCALTAX_CALC.$local;
if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice for goods and services
{
$nom=$langs->trans($local==1?"LT1ReportByQuartersInDueDebtMode":"LT2ReportByQuartersInDueDebtMode");
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT'.$local.'Rec");
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
@ -161,7 +161,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice
if ($conf->global->$calc==2) // Invoice for goods, payment for services
{
$nom=$langs->trans($local==1?"LT1ReportByQuartersInInputOutputMode":"LT2ReportByQuartersInInputOutputMode");
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT'.$local.'Rec");
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;

View File

@ -586,7 +586,7 @@ class FormOther
}
/**
* Output a HTML code to select a color
* Output a HTML code to select a color. Field will return an hexa color like '334455'.
*
* @param string $set_color Pre-selected color
* @param string $prefix Name of HTML field

View File

@ -1844,22 +1844,24 @@ function fetchObjectByElement($element_id,$element_type) {
* Convert an array with RGB value into hex RGB value
*
* @param array $arraycolor Array
* @param string $colorifnotfound Color code to return if entry not defined
* @param string $colorifnotfound Color code to return if entry not defined or not a RGB format
* @return string RGB hex value (without # before). For example: FF00FF
* @see Make the opposite of colorStringToArray
*/
function colorArrayToHex($arraycolor,$colorifnotfound='888888')
{
if (! is_array($arraycolor)) return $colorifnotfound;
if (empty($arraycolor)) return $colorifnotfound;
return dechex($arraycolor[0]).dechex($arraycolor[1]).dechex($arraycolor[2]);
}
/**
* Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,255)
* Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,255).
* If entry is already an array, return it.
*
* @param string $stringcolor String with hex (FFFFFF) or comma RGB ('255,255,255')
* @param string $colorifnotfound Color code to return if entry not defined
* @param array $colorifnotfound Color code array to return if entry not defined
* @return string RGB hex value (without # before). For example: FF00FF
* @see Make the opposite of colorArrayToHex
*/

View File

@ -10,7 +10,7 @@
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
*
* 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
@ -820,8 +820,13 @@ else
if (! empty($conf->barcode->enabled) && ! empty($conf->global->BARCODE_PRODUCT_ADDON_NUM))
{
$module=strtolower($conf->global->BARCODE_PRODUCT_ADDON_NUM);
$result=dol_include_once('/core/modules/barcode/'.$module.'.php');
if ($result > 0)
$dirbarcode=array_merge(array('/core/modules/barcode/'),$conf->modules_parts['barcode']);
foreach ($dirbarcode as $dirroot)
{
$res=dol_include_once($dirroot.$module.'.php');
if ($res) break;
}
if ($res > 0)
{
$modBarCodeProduct =new $module();
}

View File

@ -49,8 +49,8 @@ $sall=GETPOST("sall");
$type=GETPOST("type","int");
$search_sale = GETPOST("search_sale");
$search_categ = GETPOST("search_categ",'int');
$tosell = GETPOST("tosell");
$tobuy = GETPOST("tobuy");
$tosell = GETPOST("tosell", 'int');
$tobuy = GETPOST("tobuy", 'int');
$fourn_id = GETPOST("fourn_id",'int');
$catid = GETPOST('catid','int');

View File

@ -93,7 +93,6 @@ $isblue=max(0,(2*$colblue-$colred-$colgreen)/2); // 0 - 255
$colorbackhmenu1=($colred-3).','.($colgreen-3).','.($colblue-3); // topmenu
$colorbackhmenu2=($colred+5).','.($colgreen+5).','.($colblue+5);
$colorbackvmenu1=($colred+15).','.($colgreen+16).','.($colblue+17); // vmenu
$colorbackvmenu1b=($colred+5).','.($colgreen+6).','.($colblue+7); // vmenu (not menu)
$colorbackvmenu2=($colred-15).','.($colgreen-15).','.($colblue-15);
$colorbacktitle1=($colred-5).','.($colgreen-5).','.($colblue-5); // title of array
$colorbacktitle2=($colred-15).','.($colgreen-15).','.($colblue-15);
@ -106,7 +105,7 @@ $colorbacklineimpairhover=(230+round(($isred+$isgreen+$isblue)/9)).','.(230+roun
$colorbacklinepair1=(244+round($isred/3)).','.(244+round($isgreen/3)).','.(244+round($isblue/3)); // line pair
$colorbacklinepair2=(250+round($isred/3)).','.(250+round($isgreen/3)).','.(250+round($isblue/3)); // line pair
$colorbacklinepairhover=(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)); // line pair
$colorbackbody='#f9f9f9';
$colorbackbody='249,249,249';
$colortext='40,40,40';
$fontsize='12';
$fontsizesmaller='11';
@ -124,7 +123,7 @@ if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED))
$conf->global->THEME_ELDY_BACKTABCARD2='210,210,210'; // card
$conf->global->THEME_ELDY_BACKTABCARD1='234,234,234';
$conf->global->THEME_ELDY_BACKTABACTIVE='234,234,234';
$conf->global->THEME_ELDY_BACKBODY='#f9f9f9;';
$conf->global->THEME_ELDY_BACKBODY='249,249,249;';
$conf->global->THEME_ELDY_LINEIMPAIR1='255,255,255';
$conf->global->THEME_ELDY_LINEIMPAIR2='255,255,255';
$conf->global->THEME_ELDY_LINEIMPAIRHOVER='238,246,252';
@ -139,7 +138,6 @@ if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED))
$colorbackhmenu1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$conf->global->THEME_ELDY_TOPMENU_BACK1) :(empty($user->conf->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$user->conf->THEME_ELDY_TOPMENU_BACK1);
$colorbackhmenu2 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK2)?$colorbackhmenu2:$conf->global->THEME_ELDY_TOPMENU_BACK2) :(empty($user->conf->THEME_ELDY_TOPMENU_BACK2)?$colorbackhmenu2:$user->conf->THEME_ELDY_TOPMENU_BACK2);
$colorbackvmenu1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_VERMENU_BACK1)?$colorbackvmenu1:$conf->global->THEME_ELDY_VERMENU_BACK1) :(empty($user->conf->THEME_ELDY_VERMENU_BACK1)?$colorbackvmenu1:$user->conf->THEME_ELDY_VERMENU_BACK1);
$colorbackvmenu1b =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_VERMENU_BACK1b)?$colorbackvmenu1:$conf->global->THEME_ELDY_VERMENU_BACK1b) :(empty($user->conf->THEME_ELDY_VERMENU_BACK1b)?$colorbackvmenu1b:$user->conf->THEME_ELDY_VERMENU_BACK1b);
$colorbackvmenu2 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_VERMENU_BACK2)?$colorbackvmenu2:$conf->global->THEME_ELDY_VERMENU_BACK2) :(empty($user->conf->THEME_ELDY_VERMENU_BACK2)?$colorbackvmenu2:$user->conf->THEME_ELDY_VERMENU_BACK2);
$colorbacktitle1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_BACKTITLE1) ?$colorbacktitle1:$conf->global->THEME_ELDY_BACKTITLE1) :(empty($user->conf->THEME_ELDY_BACKTITLE1)?$colorbacktitle1:$user->conf->THEME_ELDY_BACKTITLE1);
$colorbacktitle2 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_BACKTITLE2) ?$colorbacktitle2:$conf->global->THEME_ELDY_BACKTITLE2) :(empty($user->conf->THEME_ELDY_BACKTITLE2)?$colorbacktitle2:$user->conf->THEME_ELDY_BACKTITLE2);
@ -165,6 +163,11 @@ if ((! empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) && empty($user->conf->
}
// Format color value to match expected format (may be 'FFFFFF' or '255,255,255')
$colorbackbody=join(',',colorStringToArray($colorbackbody));
/*$colorbackhmenu1=join(',',colorStringToArray($colorbackhmenu1));
$colorbackhmenu2=join(',',colorStringToArray($colorbackhmenu2));
$colorbackvmenu1=join(',',colorStringToArray($colorbackvmenu1));
$colorbackvmenu2=join(',',colorStringToArray($colorbackvmenu2));*/
$colorbacktabcard1=join(',',colorStringToArray($colorbacktabcard1));
$colorbacktabcard2=join(',',colorStringToArray($colorbacktabcard2));
@ -186,7 +189,6 @@ $tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppa
if ($tmpval <= 340) { $colortextbacktab='FFF'; }
else { $colortextbacktab='444'; }
$usecss3=true;
if ($conf->browser->name == 'ie' && round($conf->browser->version,2) < 10) $usecss3=false;
elseif ($conf->browser->name == 'iceweasel') $usecss3=false;
@ -195,6 +197,10 @@ elseif ($conf->browser->name == 'epiphany') $usecss3=false;
print '/*'."\n";
print 'colred='.$colred.' colgreen='.$colgreen.' colblue='.$colblue."\n";
print 'isred='.$isred.' isgreen='.$isgreen.' isblue='.$isblue."\n";
print 'colorbackbody='.$colorbackbody."\n";
print 'colorbackvmenu1='.$colorbackvmenu1."\n";
print 'colorbackhmenu1='.$colorbackhmenu1."\n";
print 'colorbacktitle1='.$colorbacktitle1."\n";
print 'colorbacklineimpair1='.$colorbacklineimpair1."\n";
print 'colorbacklineimpair2='.$colorbacklineimpair2."\n";
print 'colorbacklineimpairhover='.$colorbacklineimpairhover."\n";
@ -223,7 +229,7 @@ body {
<?php if (GETPOST("optioncss") == 'print') { ?>
background-color: #FFFFFF;
<?php } else { ?>
background: <?php print $colorbackbody; ?>;
background: rgb(<?php print $colorbackbody; ?>);
<?php } ?>
color: #101010;
font-size: <?php print $fontsize ?>px;
@ -1820,7 +1826,7 @@ table.liste td {
}
*/
.impair:hover, td.nohover {
.impair:hover {
<?php if ($colorbacklineimpairhover) { if ($usecss3) { ?>
background: rgb(<?php echo $colorbacklineimpairhover; ?>);
<?php } else { ?>
@ -1829,7 +1835,7 @@ table.liste td {
border: 0px;
}
.impair, .nohover .impair:hover, tr.impair td.nohover {
.impair, .nohover .impair:hover, tr.impair td.nohover, td.nohover {
<?php if ($usecss3) { ?>
background: linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);