diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index a88f1bc210c..7541cd90938 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -274,6 +274,10 @@ if (! empty($conf->margin->enabled)) jQuery("input[name='np_marginRate']:first").val(''); jQuery("input[name='np_markRate']:first").val(''); }); + jQuery("#qty").keyup(function() { + jQuery("input[name='np_marginRate']:first").val(''); + jQuery("input[name='np_markRate']:first").val(''); + }); jQuery("#remise_percent").keyup(function() { jQuery("input[name='np_marginRate']:first").val(''); jQuery("input[name='np_markRate']:first").val(''); @@ -322,7 +326,7 @@ if (! empty($conf->margin->enabled)) /* Add rules to reset price_ht from margin info */ global->DISPLAY_MARGIN_RATES)) + if (! empty($conf->global->DISPLAY_MARGIN_RATES) && !empty($conf->global->MARGIN_RESET_HT_FROM_MARGIN_FIELD)) { ?> $('#savelinebutton').click(function (e) { @@ -334,7 +338,7 @@ if (! empty($conf->margin->enabled)) });*/ global->DISPLAY_MARK_RATES)) + if (! empty($conf->global->DISPLAY_MARK_RATES) && !empty($conf->global->MARGIN_RESET_HT_FROM_MARGIN_FIELD)) { ?> $('#savelinebutton').click(function (e) { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index cb9c31d044e..732fcb50565 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1963,7 +1963,7 @@ if (! function_exists("llxFooter")) print "\n\n"; print '' . "\n"; } diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 7d12d1f74be..98bcc1ab727 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -7,7 +7,7 @@ * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2013-2014 Cedric GROSS - * Copyright (C) 2013-2015 Marcos García + * Copyright (C) 2013-2016 Marcos García * Copyright (C) 2011-2014 Alexandre Spangaro * Copyright (C) 2014 Henry Florian * Copyright (C) 2014-2016 Philippe Grand @@ -4139,7 +4139,11 @@ class Product extends CommonObject $price_min = $price * (1 - ($rules[$i]->var_min_percent/100)); } - if ($price == $this->multiprices[$i] && ($price_min == $this->multiprices_min[$i])) { + //Little check to make sure the price is modified before triggering generation + $check_amount = (($price == $this->multiprices[$i]) && ($price_min == $this->multiprices_min[$i])); + $check_type = ($baseprice == $this->multiprices_base_type[$i]); + + if ($check_amount && $check_type) { continue; } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 73dd3e7b642..08abf28b9c6 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2964,12 +2964,10 @@ table.valid { border-radius: 4px; } #tiptip_content { --moz-border-radius:0px; --webkit-border-radius: 0px; -border-radius: 0px; -background-color: rgb(255,255,255); -/* background-color: rgb(255,255,255); - background-color: rgba(255,255,255,0.95);*/ + -moz-border-radius:0px; + -webkit-border-radius: 0px; + border-radius: 0px; + background-color: rgb(255,255,255); line-height: 1.4em; min-width: 200px; }