Merge pull request #6147 from atm-maxime/mko_multicurrency_debug
Fix multicurrency - Part 3
This commit is contained in:
commit
31fad0a610
@ -2768,7 +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 float $pu_ht_devise Unit price in foreign currency
|
||||
* @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)
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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('');
|
||||
}
|
||||
});
|
||||
|
||||
<?php
|
||||
if (! empty($conf->margin->enabled))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user