function updateSalesQty(id_sale,id_product,id_customer,sign=0,qty=0)
So far, only firefox supports default arguments in JS. You'd have to set the defaults inside of the function, for example like
sign = sign || 0;
or
qty = (typeof qty !== 'undefined') ? qty : 0;