diff --git a/ChangeLog b/ChangeLog index 4200d8ec9fc..29666714337 100644 --- a/ChangeLog +++ b/ChangeLog @@ -430,6 +430,25 @@ Dolibarr better: - Function get_exdir require now 6 parameters. This is to prepare a future feature. +***** ChangeLog for 3.7.3 compared to 3.7.2 ***** +FIX: #3734 Do not show empty links of deleted source objects in stock movement list +FIX: #3890 Expected transactions bank account page, shows negative numbers +FIX: #3928 Creating a Customer order and a Customer invoice from a project, does not inherit payment conditions and method of payment of customer card +FIX: #3980 Search field in "product by supplier" list sends empty result 3.8 and 3.7 +FIX: #4081 Added missing translation +FIX: #4097 Public holiday calculation +FIX: #4242 Allow disabling dashes in documents +FIX: #4243 sql injection +FIX: Can use formated float number on old expense report module. +FIX: Change object statut when closing shipment and remove erratic db commit +FIX: Export with category contact extrafields +FIX: NB task and percent progress in box project +FIX: Not delete a product when have customer price +FIX: Not deleting contrats on element_element table +FIX: Not use localtaxes when invoice some orders +FIX: Product link in project box +FIX: Use "WHERE true" instead of "WHERE 1" #4132 + ***** ChangeLog for 3.7.2 compared to 3.7.1 ***** FIX: #2957 : missing $langs object for trigger FIX: #2983 Load gravatar avatar images securely over HTTPS @@ -738,6 +757,17 @@ Dolibarr better: - Replaced USER_UPDATE_SESSION trigger with an updateSession hook may break modules using it. +***** ChangeLog for 3.6.6 compared to 3.6.5 ***** +FIX: #3734 Do not show empty links of deleted source objects in stock movement list +FIX: #4081 Added missing translation +FIX: #4097 Public holiday calculation +FIX: #4242 Allow disabling dashes in documents +FIX: #4243 sql injection +FIX: Add a protection to not make release if ChangeLog was not generated. Prepare package 3.6.5 +FIX: export with category contact extrafields +FIX: Not delete a product when have customer price +FIX: Not deleting contrats on element_element table + ***** ChangeLog for 3.6.5 compared to 3.6.4 ***** FIX: #2957 : missing $langs object for trigger FIX: #2983 Load gravatar avatar images securely over HTTPS diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index 2e113f22430..c3eedd4b442 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -2,6 +2,7 @@ /* Copyright (C) 2008-2015 Laurent Destailleur * Copyright (C) 2011-2015 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2016 Raphaël Doursenaud * * 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 @@ -95,7 +96,7 @@ if ($actionsave) // Save nb of agenda if (! $error) { - $res=dolibarr_set_const($db,'AGENDA_EXT_NB',trim(GETPOST('AGENDA_EXT_NB','alpha')),'chaine',0,'',$conf->entity); + $res=dolibarr_set_const($db,'AGENDA_EXT_NB',trim(GETPOST('AGENDA_EXT_NB','int')),'chaine',0,'',$conf->entity); if (! $res > 0) $error++; if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB=5; $MAXAGENDA=empty($conf->global->AGENDA_EXT_NB)?5:$conf->global->AGENDA_EXT_NB; @@ -214,9 +215,9 @@ while ($i <= $MAXAGENDA) // Nb print ''.$langs->trans("AgendaExtNb",$key).""; // Name - print ''; + print ''; // URL - print ''; + print ''; // Offset TZ print ''; // Color (Possible colors are limited by Google) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index f632492a59d..18f13a44813 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1294,7 +1294,7 @@ class Categorie extends CommonObject if (is_numeric( $type )) { // We want to reverse lookup $map_type = array_flip( $this->MAP_ID ); - $type = $map_type; + $type = $map_type[$type]; dol_syslog( get_class( $this ) . "::rechercher(): numeric types are deprecated, please use string instead", LOG_WARNING ); } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 1cf042e9d13..c281d9bebbd 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2755,6 +2755,7 @@ abstract class CommonObject /** * Return if a country is inside the EEC (European Economic Community) + * TODO Add a field into dictionary * * @return boolean true = country inside EEC, false = country outside EEC */ @@ -2776,7 +2777,8 @@ abstract class CommonObject 'FR', // France 'GB', // United Kingdom 'GR', // Greece - 'NL', // Holland + 'HR', // Croatia + 'NL', // Holland 'HU', // Hungary 'IE', // Ireland 'IM', // Isle of Man - Included in UK @@ -2786,7 +2788,7 @@ abstract class CommonObject 'LV', // Latvia 'MC', // Monaco - Included in France 'MT', // Malta - //'NO', // Norway + //'NO', // Norway 'PL', // Poland 'PT', // Portugal 'RO', // Romania diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index 528abfcd6a5..03eb651e4db 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -93,10 +93,14 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt //dol_syslog("Price.lib::calcul_price_total qty=".$qty." pu=".$pu." remiserpercent_ligne=".$remise_percent_ligne." txtva=".$txtva." uselocaltax1_rate=".$uselocaltax1_rate." uselocaltax2_rate=".$uselocaltax2_rate.' remise_percent_global='.$remise_percent_global.' price_base_type='.$ice_base_type.' type='.$type.' progress='.$progress); $countryid=$seller->country_id; + + if (is_numeric($uselocaltax1_rate)) $uselocaltax1_rate=(float) $uselocaltax1_rate; + if (is_numeric($uselocaltax2_rate)) $uselocaltax2_rate=(float) $uselocaltax2_rate; + if ($uselocaltax1_rate < 0) $uselocaltax1_rate=$seller->localtax1_assuj; if ($uselocaltax2_rate < 0) $uselocaltax2_rate=$seller->localtax2_assuj; - dol_syslog('Price.lib::calcul_price_total qty='.$qty.' pu='.$pu.' remise_percent_ligne='.$remise_percent_ligne.' txtva='.$txtva.' uselocaltax1_rate='.$uselocaltax1_rate.' uselocaltax2_rate='.$uselocaltax2_rate.' remise_percent_global='.$remise_percent_global.' price_base_type='.$ice_base_type.' type='.$type.' progress='.$progress); + dol_syslog('Price.lib::calcul_price_total qty='.$qty.' pu='.$pu.' remise_percent_ligne='.$remise_percent_ligne.' txtva='.$txtva.' uselocaltax1_rate='.$uselocaltax1_rate.' uselocaltax2_rate='.$uselocaltax2_rate.' remise_percent_global='.$remise_percent_global.' price_base_type='.$price_base_type.' type='.$type.' progress='.$progress); // Now we search localtaxes information ourself (rates and types). $localtax1_type=0; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 21aab088fd0..32a608b39bd 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -447,7 +447,7 @@ if (empty($reshook)) 'HT', $product_type, $lines[$i]->rang, - 1, + 0, $lines[$i]->array_options, $lines[$i]->fk_unit ); diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index ca0b1d04d7a..87c8dc07f91 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -580,10 +580,10 @@ if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') $newSolde = $soldeActuel + ($nbopenedday * $cp->getConfCP('nbHolidayDeducted')); // On ajoute la modification dans le LOG - $result1=$cp->addLogCP($user->id, $cp->fk_user, $langs->transnoentitiesnoconv("HolidaysCancelation"), $newSolde); + $result1=$cp->addLogCP($user->id, $cp->fk_user, $langs->transnoentitiesnoconv("HolidaysCancelation"), $newSolde, $cp->fk_type); // Mise à jour du solde - $result2=$cp->updateSoldeCP($cp->fk_user, $newSolde); + $result2=$cp->updateSoldeCP($cp->fk_user, $newSolde, $cp->fk_type); if ($result1 < 0 || $result2 < 0) { diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index b329cffda35..751b24a9d1b 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -251,7 +251,7 @@ $out=''; $typeleaves=$holiday->getTypes(1,1); foreach($typeleaves as $key => $val) { - $nb_type = $holiday->getCPforUser($user->id, $val['rowid']); + $nb_type = $holiday->getCPforUser($user_id, $val['rowid']); $nb_holiday += $nb_type; $out .= ' - '.$val['label'].': '.($nb_type?price2num($nb_type):0).'
'; } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 73abcfbf38b..f1399655666 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -98,7 +98,8 @@ function test_sql_and_script_inject($val, $type) // All examples on page: http://ha.ckers.org/xss.html#XSScalc $sql_inj += preg_match('/