Resets value to 0 if it does not find any value with its currency symbol
Resets value to 0 if it does not find any value with its currency symbol
Cordial greetings I have a problem I have a table with numeric data with monetary symbols that are dollars and soles (currency of my country), what I do is the general sum of the column depending on the monetary symbol that has, my issue is that when I filter by state and there is no value with the dollar symbol or soles brings me in general summed amount and I would like it to be the value of 0.
I tried to improve the conditional but I can't find the solution.
in this link is my executable code
Answers
I'd refactor your code to only update the HTML element at the end of the
change()
function, rather than on each iteration - and update both thesoles
and thedollar
elements. That way both would get set only once, with old values being cleared.Colin