Empty inputs when editing line
This commit is contained in:
parent
0302e8c1f8
commit
ac41b61ad8
@ -698,6 +698,7 @@ function setforfree() {
|
|||||||
jQuery("#prod_entry_mode_free").prop('checked',true);
|
jQuery("#prod_entry_mode_free").prop('checked',true);
|
||||||
jQuery("#prod_entry_mode_predef").prop('checked',false);
|
jQuery("#prod_entry_mode_predef").prop('checked',false);
|
||||||
jQuery("#price_ht").show();
|
jQuery("#price_ht").show();
|
||||||
|
jQuery("#multicurrency_price_ht").show();
|
||||||
jQuery("#price_ttc").show(); // May no exists
|
jQuery("#price_ttc").show(); // May no exists
|
||||||
jQuery("#tva_tx").show();
|
jQuery("#tva_tx").show();
|
||||||
jQuery("#buying_price").val('').show();
|
jQuery("#buying_price").val('').show();
|
||||||
@ -717,6 +718,7 @@ function setforpredef() {
|
|||||||
jQuery("#prod_entry_mode_free").prop('checked',false);
|
jQuery("#prod_entry_mode_free").prop('checked',false);
|
||||||
jQuery("#prod_entry_mode_predef").prop('checked',true);
|
jQuery("#prod_entry_mode_predef").prop('checked',true);
|
||||||
jQuery("#price_ht").hide();
|
jQuery("#price_ht").hide();
|
||||||
|
jQuery("#multicurrency_price_ht").hide();
|
||||||
jQuery("#price_ttc").hide(); // May no exists
|
jQuery("#price_ttc").hide(); // May no exists
|
||||||
jQuery("#tva_tx").hide();
|
jQuery("#tva_tx").hide();
|
||||||
jQuery("#buying_price").show();
|
jQuery("#buying_price").show();
|
||||||
|
|||||||
@ -260,12 +260,25 @@ jQuery(document).ready(function()
|
|||||||
{
|
{
|
||||||
jQuery("#price_ht").keyup(function(event) {
|
jQuery("#price_ht").keyup(function(event) {
|
||||||
// console.log(event.which); // discard event tag and arrows
|
// console.log(event.which); // discard event tag and arrows
|
||||||
if (event.which != 9 && (event.which < 37 ||event.which > 40) && jQuery("#price_ht").val() != '') jQuery("#price_ttc").val('');
|
if (event.which != 9 && (event.which < 37 ||event.which > 40) && jQuery("#price_ht").val() != '') {
|
||||||
});
|
jQuery("#price_ttc").val('');
|
||||||
|
jQuery("#multicurrency_subprice").val('');
|
||||||
|
}
|
||||||
|
});
|
||||||
jQuery("#price_ttc").keyup(function(event) {
|
jQuery("#price_ttc").keyup(function(event) {
|
||||||
// console.log(event.which); // discard event tag and arrows
|
// console.log(event.which); // discard event tag and arrows
|
||||||
if (event.which != 9 && (event.which < 37 || event.which > 40) && jQuery("#price_ttc").val() != '') jQuery("#price_ht").val('');
|
if (event.which != 9 && (event.which < 37 || event.which > 40) && jQuery("#price_ttc").val() != '') {
|
||||||
});
|
jQuery("#price_ht").val('');
|
||||||
|
jQuery("#multicurrency_subprice").val('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
jQuery("#multicurrency_subprice").keyup(function(event) {
|
||||||
|
// console.log(event.which); // discard event tag and arrows
|
||||||
|
if (event.which != 9 && (event.which < 37 || event.which > 40) && jQuery("#price_ttc").val() != '') {
|
||||||
|
jQuery("#price_ht").val('');
|
||||||
|
jQuery("#price_ttc").val('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (! empty($conf->margin->enabled))
|
if (! empty($conf->margin->enabled))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user