From 1dbb8d697ecbcd3832f1e53f892d9f4d1f2e5046 Mon Sep 17 00:00:00 2001 From: Sergio Sanchis Climent Date: Tue, 4 Oct 2016 00:26:39 +0200 Subject: [PATCH 1/5] FIX: addline if $txlocaltax1 is empty --- htdocs/contrat/class/contrat.class.php | 2 ++ 1 file changed, 2 insertions(+) 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') { From 9024c225fd2624c3c35217ebb998f6db31b70fc4 Mon Sep 17 00:00:00 2001 From: Sergio Sanchis Climent Date: Tue, 4 Oct 2016 00:33:34 +0200 Subject: [PATCH 2/5] FIX: updateligne if $txlocaltax1 is null --- htdocs/contrat/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; From ad52957439c3dfb01216fefd666962e196e434d1 Mon Sep 17 00:00:00 2001 From: Sergio Sanchis Climent Date: Tue, 4 Oct 2016 00:56:35 +0200 Subject: [PATCH 3/5] FIX: #5779 --- htdocs/ecm/index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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) From 9e8d8c5f5c52bb62163556428e23c14ea222937e Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 7 Oct 2016 13:16:33 +0200 Subject: [PATCH 4/5] Fix: pdfmake is not present --- htdocs/main.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 554af48ecd3..3abef5d520f 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1222,8 +1222,8 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; print ''."\n"; 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 +1444,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 +1455,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 '