FIX Each time we edit a line, we loose the unit price.

This commit is contained in:
Laurent Destailleur 2016-03-30 16:26:34 +02:00
parent fa10f9e030
commit 7146a8319b

View File

@ -252,6 +252,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('');
@ -300,7 +304,7 @@ if (! empty($conf->margin->enabled))
/* Add rules to reset price_ht from margin info */
<?php
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
if (! empty($conf->global->DISPLAY_MARGIN_RATES) && !empty($conf->global->MARGIN_RESET_HT_FROM_MARGIN_FIELD))
{
?>
$('#savelinebutton').click(function (e) {
@ -312,7 +316,7 @@ if (! empty($conf->margin->enabled))
});*/
<?php
}
if (! empty($conf->global->DISPLAY_MARK_RATES))
if (! empty($conf->global->DISPLAY_MARK_RATES) && !empty($conf->global->MARGIN_RESET_HT_FROM_MARGIN_FIELD))
{
?>
$('#savelinebutton').click(function (e) {