- if ( el[i].type == 'checkbox' && el[i].checked ) {
- subtotal += parseFloat( el[i].getAttribute('data-amount') );
- amounts.push( el[i].getAttribute('data-amount') );
- billpkgnums.push( el[i].getAttribute('data-billpkgnum') );
- setuprecurs.push( el[i].getAttribute('data-setuprecur') );
+
+ if ( el[i].type == 'checkbox' ) {
+ var amount_el = document.getElementById( el[i].id + '-amount' );
+ if ( el[i].checked ) {
+ amount_el.disabled = false;
+ var amount = amount_el.value;
+ subtotal += parseFloat( amount );
+ amounts.push( amount );
+ billpkgnums.push( el[i].getAttribute('data-billpkgnum') );
+ setuprecurs.push( el[i].getAttribute('data-setuprecur') );
+ } else {
+ amount_el.disabled = true;
+ }