<div class="table-responsive">
<table id="myTable" class="table table-striped">
<thead>
<tr>
     <th></th>
    <th>#</th>
    <th>MRF No</th>
    <th>MAF No</th>
    <th>Property Code</th>
    <th> Assessed value </th>
    <th>Merged Amount</th>
     <th>Remaining Amount</th>
</tr>
</thead>
<tbody>
<?php $count =1;?>

@foreach($properties as $merging_property)
<tr>
    
    @if(old('merging_property_id') == $merging_property->id)
    
    <td><input id="merging_property_id" style="zoom: 1.4;" type="radio" checked="" required name='merging_property_id' data-amount="{{$merging_property->merging_assessed_value - $mergedAmount[$merging_property->id]}}"merging_value value='{{$merging_property->id}}' onchange="getMergingAmount(this)" ></td>
    @else
    <td><input id="merging_property_id" style="zoom: 1.4;" type="radio" required name='merging_property_id' data-amount="{{$merging_property->merging_assessed_value - $mergedAmount[$merging_property->id]}}" value='{{$merging_property->id}}'  onchange="getMergingAmount(this)"></td>
    @endif
     
    <td>{{$count++}}</td>
    
    <td><b>{{$merging_property->mrf_no}} </b></td>
    
    <td>{{$merging_property->maf_no}} </td>
    
    <td>{{$merging_property->property_code}} </td>
    
    
    <td>{{$merging_property->merging_assessed_value}} PKR</td>
    
    <td>{{$mergedAmount[$merging_property->id]}} PKR</td>
    
     <td>{{$merging_property->merging_assessed_value - $mergedAmount[$merging_property->id]}} PKR</td>
</tr>
@endforeach

</tbody>
</table>
</div>