var cb = $(this).siblings('input[name^="treated"]');
supposed to be
var cb = $(this).closest('tr').find('input[name^="treated"]');
The siblings
will not work in this case as input[name^=treated]
is not a sibling of the quantity input.
Siblings are the elements are are present at the same level as the other elements.
But here the treated
input in inside another td
and not the same td