Guest User

maak_factuur.php

a guest
Jan 25th, 2016
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.55 KB | None | 0 0
  1. <table class="table table-bordered table-striped mb-none" id="pricetable">
  2.                         <thead>
  3.                             <tr>
  4.                                 <th width="20%">Aantal</th>
  5.                                 <th width="40%">Beschrijving</th>
  6.                                 <th width="20%">Prijs per eenheid</th>
  7.                                 <th width="20%">Totaal</th>
  8.                             </tr>
  9.                         </thead>
  10.                         <tbody>
  11.                         <tr class="gradeX">
  12.                                 <td width="20%"><input type="text" class="form-control" id="amount" placeholder="Aantal" name="amountoff[]"/></td>
  13.                                 <td width="30%"><input type="text" class="form-control" id="jobdescrip" placeholder="Beschrijving" name="job[]"/></td>
  14.                                 <td width="20%"><input type="text" class="form-control" id="price" placeholder="Prijs per eenheid" name="priceoff[]"/></td>
  15.                                 <td width="20%"><input type="text" class="form-control" id="total" placeholder="Totaal" name="totaal[]"/></td>
  16.                         </tr>
  17.                       </tbody>
  18.         </table>
  19. /* Ongebelangrijk stuk code tussen */
  20. <script>
  21. /* Dit stuk zorgt ervoor dat wanneer een nieuwe rij wordt opgevraagd, de laatste rij gekopieerd wordt en de inhoud geleegd wordt. */
  22. $('#newrow').click(function(){
  23.  $('#pricetable tbody>tr:last').clone(true).insertAfter('#pricetable tbody>tr:last');
  24.  $('#pricetable tbody>tr:last [name="amountoff[]"]').val('');
  25.  $('#pricetable tbody>tr:last [name="job[]"]').val('');
  26.  $('#pricetable tbody>tr:last [name="priceoff[]"]').val('');
  27.  $('#pricetable tbody>tr:last [name="totaal[]"]').val('');
  28.  return false;
  29. });
  30. </script>
  31. <script src="invoice.handler.js"></script>
Advertisement
Add Comment
Please, Sign In to add comment