Multiplication in Edit Form only working first row
Hey Guys,i'm developing form which have auto complete, add row auto and multiplication between quantity * price.
I'm success insert it without bugs but after that i'm going create edit form for this and face the bugs multiplication only working in the first rows after that not working ,
Then trying copas insert form and put in my edit for plus value (cause it came from database)
here is my edit form is succes --------->
http://jsfiddle.net/99nkbv5a/5/
and this this is my view with database only working first row
- <table class="table table-bordered table-hover" style="margin-top:50px;">
- <thead>
- <tr>
- <th width="2%"><input id="check_all" class="formcontrol" type="checkbox"/></th>
- <th width="12%">Kode Barang</th>
- <th width="15%">Nama Barang</th>
- <th width="8%">Stock</th>
- <th width="15%">Harga</th>
- <th width="10%">Jumlah</th>
- <th width="15%">Total</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><input class="case" type="checkbox"/></td>
- <td>
- <input type="text" data-type="id_barang" name="itemNo[]" id="itemNo_1" class="form-control autocomplete_txt" autocomplete="off">
- <input type="hidden" name="kode[]" id="kode_1" value="<?php echo $id ?>">
-
- </td>
- <td><input type="text" data-type="nama_barang" name="itemName[]" id="itemName_1" class="form-control autocomplete_txt" autocomplete="off" readonly></td>
- <td><input type="text" name="StockName[]" id="StockName_1" class="form-control autocomplete_txt" autocomplete="off" readonly></td>
- <td><input type="number" name="price[]" id="price_1" class="form-control changesNo" autocomplete="off" onKeyPress="return IsNumeric(event);" ondrop="return false;" onpaste="return false;" pattern="^\d+(\.|\,)\d{2}$"></td>
- <td><input type="number" name="quantity[]" id="quantity_1" class="form-control changesNo quantity" autocomplete="off" onKeyPress="return IsNumeric(event);" ondrop="return false;" onpaste="return false;" ></td>
- <td><input type="number" name="total[]" id="total_1" class="form-control totalLinePrice" autocomplete="off" onKeyPress="return IsNumeric(event);" ondrop="return false;" onpaste="return false;" readonly pattern="^\d+(\.|\,)\d{2}$"></td>
- </tr>
- </tbody>
- </table>