From 1dbb8d697ecbcd3832f1e53f892d9f4d1f2e5046 Mon Sep 17 00:00:00 2001 From: Sergio Sanchis Climent Date: Tue, 4 Oct 2016 00:26:39 +0200 Subject: [PATCH 01/12] 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 02/12] 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 03/12] 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 6efbae0731fe82aca96b98b1c2f55559a3b99bb1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 4 Oct 2016 19:52:00 +0200 Subject: [PATCH 04/12] Fix title --- htdocs/accountancy/admin/fiscalyear.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 638e9794fe8..a831cebcb51 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -80,8 +80,8 @@ $max = 100; $form = new Form($db); $title = $langs->trans('FiscalYears'); - -llxHeader('', $title, LOG_ERR); +$helpurl = ""; +llxHeader('', $title, $helpurl); $sql = "SELECT f.rowid, f.label, f.date_start, f.date_end, f.statut, f.entity"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_fiscalyear as f"; From c1e10fa4e6d673b180a13dfc4ab8e8d30ece7454 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 4 Oct 2016 20:54:14 +0200 Subject: [PATCH 05/12] FIX Sql error in widget of product for stock alerts --- htdocs/core/boxes/box_produits_alerte_stock.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index 4d79abd156b..3ec0fc7070c 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -66,7 +66,7 @@ class box_produits_alerte_stock extends ModeleBoxes if ($user->rights->produit->lire || $user->rights->service->lire) { - $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.seuil_stock_alerte,p.entity,"; + $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.seuil_stock_alerte, p.entity,"; $sql.= " SUM(".$db->ifsql("s.reel IS NULL","0","s.reel").") as total_stock"; $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as s on p.rowid = s.fk_product"; @@ -74,7 +74,7 @@ class box_produits_alerte_stock extends ModeleBoxes $sql.= " AND p.tosell = 1 AND p.seuil_stock_alerte > 0"; if (empty($user->rights->produit->lire)) $sql.=' AND p.fk_product_type != 0'; if (empty($user->rights->service->lire)) $sql.=' AND p.fk_product_type != 1'; - $sql.= " GROUP BY p.rowid, p.ref, p.label, p.price, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.seuil_stock_alerte"; + $sql.= " GROUP BY p.rowid, p.ref, p.label, p.price, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.seuil_stock_alerte, p.entity"; $sql.= " HAVING SUM(".$db->ifsql("s.reel IS NULL","0","s.reel").") < p.seuil_stock_alerte"; $sql.= $db->order('p.seuil_stock_alerte', 'DESC'); $sql.= $db->plimit($max, 0); From 9e8d8c5f5c52bb62163556428e23c14ea222937e Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 7 Oct 2016 13:16:33 +0200 Subject: [PATCH 06/12] 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 '