diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 4b6f92a03d5..d5159f003e2 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -909,7 +909,7 @@ class Categorie extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Return childs of a category + * Return direct childs of a category * * @return array|int <0 KO, array ok */ @@ -922,7 +922,7 @@ class Categorie extends CommonObject $res = $this->db->query($sql); if ($res) { - $cats = array (); + $cats = array(); while ($rec = $this->db->fetch_array($res)) { $cat = new Categorie($this->db); @@ -940,7 +940,7 @@ class Categorie extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Load this->motherof that is array(id_son=>id_parent, ...) + * Load the array this->motherof that is array(id_son=>id_parent, ...) * * @return int <0 if KO, >0 if OK */ @@ -1007,9 +1007,9 @@ class Categorie extends CommonObject $sql = "SELECT DISTINCT c.rowid, c.label, c.description, c.color, c.fk_parent, c.visible"; // Distinct reduce pb with old tables with duplicates if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= ", t.label as label_trans, t.description as description_trans"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie as c"; - if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$current_lang."'"; + if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$this->db->escape($current_lang)."'"; $sql .= " WHERE c.entity IN (" . getEntity('category') . ")"; - $sql .= " AND c.type = " . $type; + $sql .= " AND c.type = " . (int) $type; dol_syslog(get_class($this)."::get_full_arbo get category list", LOG_DEBUG); $resql = $this->db->query($sql); diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 210ba6fe9e9..e88e435df67 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1421,7 +1421,6 @@ if ($action == 'create') print ''; print '('.$stock.')'; - } else { @@ -1522,7 +1521,6 @@ if ($action == 'create') } } } - } if ($subj == 0) // Line not shown yet, we show it { diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index 8adccf9d228..cdc12553401 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -608,7 +608,7 @@ else $reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $object, $action); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - if (empty($reshook)) + if (empty($reshook)) { print ''; if ($object->lines[$i]->fk_product > 0) @@ -635,7 +635,7 @@ else { $label = (!empty($object->lines[$i]->label) ? $object->lines[$i]->label : $object->lines[$i]->product_label); } - + print ''; // Affiche ligne produit diff --git a/htdocs/takepos/css/pos.css b/htdocs/takepos/css/pos.css index cac9a23a8d9..fff566e6aaa 100644 --- a/htdocs/takepos/css/pos.css +++ b/htdocs/takepos/css/pos.css @@ -155,7 +155,11 @@ div.catwatermark{ text-align: center; box-sizing: border-box; overflow: auto; - background-color:white; + /* background-color:white; */ + padding-top: 0; + padding-bottom: 10px; + padding-right: 5px; + padding-left: 5px; } .div2{ @@ -163,8 +167,11 @@ div.catwatermark{ width: 33%; font-size: 0; float: left; - padding-left: 10px; box-sizing: border-box; + padding-top: 0; + padding-bottom: 10px; + padding-right: 5px; + padding-left: 5px; } .div3{ @@ -172,6 +179,10 @@ div.catwatermark{ width: 33%; float: left; box-sizing: border-box; + padding-top: 0; + padding-bottom: 10px; + padding-right: 5px; + padding-left: 5px; } .div4{ @@ -180,7 +191,10 @@ div.catwatermark{ float: left; box-sizing: border-box; font-size: 6px; - padding:3px; + padding-top: 10px; + padding-bottom: 10px; + padding-right: 5px; + padding-left: 5px; } .div5{ @@ -189,7 +203,10 @@ div.catwatermark{ float: left; box-sizing: border-box; font-size: 6px; - padding:10px; + padding-top:10px; + padding-bottom:10px; + padding-right: 5px; + padding-left: 5px; } p.description_content{ diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index cdb693fdcae..bcfca236925 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -64,22 +64,21 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); $categorie = new Categorie($db); $categories = $categorie->get_full_arbo('product'); -$maincategories = array_filter($categories, function ($item) { - if (($item['level']==1) !== false && ($item['visible']==1) !== false) { - return true; +$maincategories = array(); +$subcategories = array(); +foreach($categories as $key => $categorycursor) +{ + if ($categorycursor['level'] == 1) + { + $maincategories[$key] = $categorycursor; } - return false; -}); + else + { + $subcategories[$key] = $categorycursor; + } +} sort($maincategories); - -$subcategories = array_filter($categories, function ($item) { - if (($item['level']!=1) !== false && ($item['visible']==1) !== false) { - return true; - } - return false; -}); - sort($subcategories); ?> @@ -487,6 +486,10 @@ if (!empty($reshook)) { ?>
+
-
id='catdiv'> - width="100%" height="85%" id='catimg'/> +
id='catdiv'> + width="100%" height="100%" id="catimg" />
@@ -522,22 +526,22 @@ foreach($menus as $menu) {
- -
onclick="MoreProducts('less');" onclick="MoreProducts('more');" > - width="100%" height="85%" id='proimg'/> -
-
-
-
+
-
- + +
onclick="MoreProducts('less');" onclick="MoreProducts('more');" > + width="100%" height="100%" id="proimg" /> +
+
+
+
+
+
+