Guest User

Untitled

a guest
Dec 12th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. $(document).ready(function () {
  2. $('#billing_table tr').each(function() {
  3.  
  4. var checked = $(this).find($(".billed-select")).val();
  5. console.log(checked);
  6.  
  7. if(checked != "1") {
  8. $('.paid').attr('disabled', true);
  9. } else {
  10. $('.paid').attr('disabled', false);
  11. }
  12. });
  13. });
  14.  
  15. <table id="billing_table">
  16. <thead>
  17. <tr>
  18. <td style="display: none">Account</td>
  19. <td>Collector Name</td>
  20. <td>Customer</td>
  21. <td>Bill Date</td>
  22. <td>Days Until<br>Next Action</td>
  23. <td>Next Action</td>
  24. <td>Billed</td>
  25. <td>Bill<br>Amount</td>
  26. <td>Payment<br>Due Date</td>
  27. <td>Notes</td>
  28. <td>Paid</td>
  29. <td>Save</td>
  30. </tr>
  31. </thead>
  32. <tbody>
  33.  
  34.  
  35. <?php
  36. foreach ($dbh->query($bill) as $rows) {
  37. ?>
  38. <tr class="row">
  39. <td></td>
  40. <td></td>
  41. <td></td>
  42. <td></td>
  43. <td></td>
  44. <td></td>
  45.  
  46. <?php if ($rows ['Billed Status'] == 'Billed') {?>
  47. <td>
  48. <select class="billed-select">
  49. <option class="selection" value="1" selected>Yes</option>
  50. <option class="selection" value="0">No</option>
  51. <option class="selection" value="2">Exempt</option>
  52. </select>
  53. </td>
  54. <?php } else if ($rows ['Billed Status'] == 'Unbilled'){ ?>
  55. <td>
  56. <select class="billed-select">
  57. <option class="selection" value="1">Yes</option>
  58. <option class="selection" value="0" selected>No</option>
  59. <option class="selection" value="2">Exempt</option>
  60. </select>
  61. </td>
  62. <?php } else if ($rows ['Billed Status'] == 'Exempt'){ ?>
  63. <td>
  64. <select class="billed-select">
  65. <option class="selection" value="1">Yes</option>
  66. <option class="selection" value="0">No</option>
  67. <option class="selection" value="2" selected>Exempt</option>
  68. </select>
  69. </td>
  70. <?php } ?>
  71.  
  72. <td></td>
  73. <td></td>
  74. <td></td>
  75.  
  76. <?php if ($rows ['Payment Status'] == 'Paid') {?>
  77. <td align="center"><input type="checkbox" id="paid" class="paid" name="paid" checked></td>
  78. <?php } else { ?>
  79. <td align="center"><input type="checkbox" id="paid" class="paid" name="paid"></td>
  80. <?php } ?>
  81.  
  82. <td></td>
  83. </tr>
  84. <?php
  85. }
  86. ?>
  87. </tbody>
  88. </table>
Add Comment
Please, Sign In to add comment