From 0302e8c1f8021ba605bde0d218b59dbf705ef16f Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 11 Dec 2016 09:29:20 +0100 Subject: [PATCH 1/2] Missing comment --- htdocs/commande/class/commande.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index e9f909564e5..68cfb061e16 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2768,6 +2768,7 @@ class Commande extends CommonOrder * @param int $special_code Special code (also used by externals modules!) * @param array $array_options extrafields array * @param string $fk_unit Code of the unit to use. Null to use the default one + * @param double $pu_ht_devise Amount in currency * @return int < 0 if KO, > 0 if OK */ function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0,$txlocaltax2=0.0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $fk_unit=null, $pu_ht_devise = 0) From ac41b61ad8b91f71c98ce1d7dd338eb4dbad3321 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 11 Dec 2016 10:48:49 +0100 Subject: [PATCH 2/2] Empty inputs when editing line --- htdocs/core/tpl/objectline_create.tpl.php | 2 ++ htdocs/core/tpl/objectline_edit.tpl.php | 21 +++++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index beeecf9f511..c87a243a1c3 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -698,6 +698,7 @@ function setforfree() { jQuery("#prod_entry_mode_free").prop('checked',true); jQuery("#prod_entry_mode_predef").prop('checked',false); jQuery("#price_ht").show(); + jQuery("#multicurrency_price_ht").show(); jQuery("#price_ttc").show(); // May no exists jQuery("#tva_tx").show(); jQuery("#buying_price").val('').show(); @@ -717,6 +718,7 @@ function setforpredef() { jQuery("#prod_entry_mode_free").prop('checked',false); jQuery("#prod_entry_mode_predef").prop('checked',true); jQuery("#price_ht").hide(); + jQuery("#multicurrency_price_ht").hide(); jQuery("#price_ttc").hide(); // May no exists jQuery("#tva_tx").hide(); jQuery("#buying_price").show(); diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index ce019d58dea..74c6bdd4211 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -260,12 +260,25 @@ jQuery(document).ready(function() { jQuery("#price_ht").keyup(function(event) { // 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) { // 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(''); + } + }); margin->enabled))