Server : Apache System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 User : vapecompany ( 2719) PHP Version : 7.4.33 Disable Function : NONE Directory : /home/vapecompany/demo.vapecompany.com.bd/resources/views/backend/stock/ |
Upload File : |
<div class="panel-heading"> <h3 class="panel-title">Imei excel Data</h3> </div> <input type="hidden" value="{{$totalQty}}" class="form-control" id="quantity" name="quantity"> <div class="panel-body"> <div class="table-responsive"> <table id="dtables" class="table table-striped table-bordered dt-responsive nowrap" style="width:100%"> <thead> <tr> <th>SL</th> <th>CARTON CODE</th> <th>ITEM CODE</th> <th>MODEL</th> <th>COLOR</th> <th>IMEI-1</th> <th>IMEI-2</th> </tr> </thead> <tbody> @php $i=0; $data= json_decode($datas); $colorarr=array(); $colorerr=array(); $colorerr2=array(); @endphp @for ($i = 0; $i < sizeof($data); $i++) @if($i != 0) @php $colorV=$data[$i][3]; if(isset($color[$colorV])){ $c_id=$color[$colorV][0]['color_id']; if(in_array($c_id,$product_color)){ if(isset($colorarr[$c_id])){ $colorarr[$c_id] = $colorarr[$c_id]+1; }else{ $colorarr[$c_id] = 1; } }else{ $colorerr2[]='Product has not Color at row '.$i; } }else{ $c_id=0; $colorerr[]='Color is not match at row '.$i; } @endphp <tr> <th>{{$i}}</th> <th>{{$data[$i][0]}}</th> <th>{{$data[$i][1]}}</th> <th>{{$data[$i][2]}}</th> <th>{{$data[$i][3]}}</th> <th>{{$data[$i][4]}}</th> <th>{{$data[$i][5]}}</th> </tr> @endif @endfor </tbody> </table> @foreach($colorarr as $k=>$v) <input type="hidden" name="color[{{$k}}]" value="{{$v}}"> @endforeach </div> </div> <div class="row"> <div class="col-md-6"> <table> @foreach($colorerr as $k=>$c) <tr> <th>{{$c}}</th> </tr> @endforeach </table> </div> <div class="col-md-6"> <table> @foreach($colorerr2 as $k=>$c) <tr> <th>{{$c}}</th> </tr> @endforeach </table> </div> @if(count($colorerr) > 0 || count($colorerr2)) <input type="hidden" name="errorvalid" value="1"> @endif </div> <script type="text/javascript"> $(document).ready(function() { var ts= $('#dtables').DataTable(); }); </script>