@if($scannedData)
	@foreach($scannedData as $asset)
	<tr id="added-count-{{$loop->iteration}}">
		<td>{{ $loop->iteration }}</td>
		<td class="asset-tag-value">{{$asset->serial_no}}</td>
		<td onclick="deleteVarianceRow('{{$asset->id}}','{{$loop->iteration}}')"><i class="icon icon-delete-forever"></i></td>
		<input type="hidden" name="serial_no{{$loop->iteration}}" id="asset_tag_added{{$loop->iteration}}" value="{{$asset->serial_no}}">
		<input type="hidden" name="location_id"  id="location_id_added" value="{{$asset->location_id}}">
		<input type="hidden" name="count" value="{{$loop->iteration}}">
	</tr>
	@endforeach
@else
<tr id="added-count-{{request('count_add')}}">
	<td>{{request('count_add')}}</td>
	<td class="asset-tag-value">{{isset($scannedAsset) ? $scannedAsset->serial_no : request('serial_no') }}</td>
	<td onclick="deleteVarianceRow('{{isset($scannedAset) ? $scannedAset->id : request('count_add')}} ',{{request('count_add')}})"><i class="icon icon-delete-forever"></i></td>
	<input type="hidden" name="serial_no{{request('count_add')}}" id="asset_tag_added{{request('count_add')}}" value="{{isset($scannedAset) ? $scannedAset->serial_no : request('serial_no')}}">
	<input type="hidden" name="location_id" id="location_id_added" value="{{isset($scannedAset) ? $scannedAset->location_id : request('location_id')}}">
	<input type="hidden" name="count" value="{{request('count_add')}}">
</tr>
@endif