<div class="row">
                                            <div class="col-md-12">
                                            <table class="table table-striped" id="{{ $tableId }}">
                                                <thead>
                                                    <th></th>
                                                    @foreach($data as $item)                                                    
                                                    <th>$item->name</th>
                                                    @endforeach
                                                </thead>
                                                <tbody>                                                    
                                                </tbody>
                                                <tfoot>
                                                    <tr>
                                                        <td colspan="3"><a class="btn btn-info fa fa-plus" id="addRow" /><a class="btn btn-warning btn-fill ti-minus" id="deleteRow" /><a class="btn btn-danger btn-fill ti-close" id="deleteAllRow"/></td>                                                                                                                                                                        
                                                        <td></td>
                                                        <td></td>
                                                        <td></td>
                                                    </tr>
                                                </tfoot>
                                                </table>
                                            </div>
 </div>

 <script>

function addRow(part, price, dis, gst, total){
    $("#{{ $tableId }}").each(function () {
         var tds = '<tr>'+
                                                    '<td><input type="text" class="form-control border-input" name="particular"  placeholder="Particular" value="'+part+'"><span class="invalid-feedback" role="alert"><strong ></strong></span></td>'+
                                                    '<td><input type="text" maxlength="12" oninput="multiplyTable()" class="form-control border-input price" name="price"  placeholder="Price" value="'+price+'"><span class="invalid-feedback" role="alert"><strong ></strong></span></td>'+
                                                    '<td><input type="text" maxlength="5" oninput="multiplyTable()" class="form-control border-input percent" name="discount"  placeholder="Discount(%)" value="'+dis+'"><span class="invalid-feedback" role="alert"><strong ></strong></span></td>'+
                                                    '<td><input type="text" maxlength="5" oninput="multiplyTable()" class="form-control border-input percent" name="gst"  placeholder="GST (%)" value="'+gst+'" disabled><span class="invalid-feedback" role="alert"><strong ></strong></span></td>'+
                                                    '<td><input type="number" class="form-control border-input price" name="total" value="'+total+'" disabled/></td>'+
                                                    '</tr>';
                
        $('tbody', this).append(tds);
        
        //var td = $('#formTable tbody tr:last td:first').find('.tableGSTlabel').append('<span class="icons"><span class="first-icon fa fa-square fa-base"></span><span class="second-icon fa fa-check-square fa-base"></span></span>');        
        //setPercentMask('.percent');  
        //setPriceMask('.price');  
     });
}

function clearAll(){
      $("#project").val("");
      //$("#account").val("");
      $("#currency").val("");
      $("#invoice_date").val(todayDate);
      $("#gst").val("");
      $('#total').val("");
      $("#formTable > tbody").html("");
      $( "#gst_applicable" ).prop( "checked", false );
  }

</script>