diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index c323fbf5cc5..c855f2165a8 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -680,8 +680,8 @@ if (empty($reshook))
$objectline->qty=GETPOST('elqty');
$objectline->remise_percent=GETPOST('elremise_percent');
$objectline->tva_tx=GETPOST('eltva_tx')?GETPOST('eltva_tx'):0; // Field may be disabled, so we use vat rate 0
- $objectline->localtax1_tx=$localtax1_tx;
- $objectline->localtax2_tx=$localtax2_tx;
+ $objectline->localtax1_tx=is_numeric($localtax1_tx)?$localtax1_tx:0;
+ $objectline->localtax2_tx=is_numeric($localtax2_tx)?$localtax2_tx:0;
$objectline->date_ouverture_prevue=$date_start_update;
$objectline->date_ouverture=$date_start_real_update;
$objectline->date_fin_validite=$date_end_update;
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index 0a26bfb748c..233bda18542 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -1307,6 +1307,8 @@ class Contrat extends CommonObject
if (empty($info_bits)) $info_bits=0;
if (empty($pu_ht) || ! is_numeric($pu_ht)) $pu_ht=0;
if (empty($pu_ttc)) $pu_ttc=0;
+ if (empty($txlocaltax1) || ! is_numeric($txlocaltax1)) $txlocaltax1=0;
+ if (empty($txlocaltax2) || ! is_numeric($txlocaltax2)) $txlocaltax2=0;
if ($price_base_type=='HT')
{
diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php
index 115ccd52f8b..5a26fb2b22e 100644
--- a/htdocs/ecm/index.php
+++ b/htdocs/ecm/index.php
@@ -100,7 +100,13 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC))
if (empty($_FILES['userfile']['tmp_name']))
{
$error++;
- setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors');
+ if($_FILES['userfile']['error'] == 1 || $_FILES['userfile']['error'] == 2){
+ setEventMessages($langs->trans('ErrorFileSizeTooLarge'),null, 'errors');
+ }
+ else {
+ setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors');
+ }
+
}
if (! $error)
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 554af48ecd3..09b327967b6 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1222,8 +1222,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print ''."\n";
print ''."\n";
print ''."\n";
- print ''."\n";
- print ''."\n";
}
// jQuery Timepicker
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
@@ -1444,7 +1442,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http')
{
$logouthtmltext.=$langs->trans("Logout").'
';
-
+
$logouttext .='';
$logouttext .= img_picto($langs->trans('Logout').":".$langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1);
$logouttext .='';
@@ -1455,7 +1453,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
$logouttext .= img_picto($langs->trans('Logout').":".$langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1);
}
}
-
+
print '