propage tva rate on tva field

This commit is contained in:
Norbert Penel 2022-05-20 19:08:26 +02:00 committed by GitHub
parent fe0bbbb626
commit 6e9c1764ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -948,9 +948,13 @@ if (!empty($usemargins) && $user->rights->margins->creer) {
var discount = parseFloat($('option:selected', this).attr('data-discount'));
if (isNaN(discount)) { discount = parseFloat(jQuery('#idprodfournprice').attr('data-discount'));}
var tva_tx = parseFloat($('option:selected', this).data('tvatx'));
console.log("We find supplier price :"+up+" qty: "+qty+" discount: "+discount+" for product "+jQuery('#idprodfournprice').val());
jQuery("#price_ht").val(up);
$('#tva_tx option').removeAttr('selected').filter('[value='+tva_tx+']').prop('selected', true);
if (jQuery("#qty").val() < qty)
{
jQuery("#qty").val(qty);