@extends('backend.header')
@section('index-content')
<style>
  .add-btn{
    width: auto !important;
    height: 31px !important;
    border-radius: 3px !important;
    line-height: 16px !important;
  }
</style>
<div class="row px-3">
  <section role="main" class="content-body">
      <header class="page-header">
          <h2>Subvendor List</h2>
      </header>
      <div class="row">
        <div class="col-xs-12">
          <div class="right-wrapper">
            <ol class="breadcrumbs">
              <li>
                <a href="{{url('index')}}">
                  <i class="fa fa-home"></i>
                </a>
              </li>
              <li><a href="{{'armsclamps_view'}}"><span class="active">{{$district->area_name??"Districts"}}</span></a></li>
            </ol>
          </div>
        </div>
        <div class="col-xs-12 mt-3">
          <div>
            <button class="btn btn-primary" onclick="window.history.back()">Back</button>
          </div>
        </div>
      </div>


      <!-- start: page -->
          <section class="panel pt-4">
            <header class="panel-heading mb-5">
              <h4 class="my-2">Subvendor List</h4> 
             <div class="add-btn-div">
               
            <a href="{{url('vendor_outwards_armsclamps')}}" class="btn btn-primary add-btn">Subvendor Transfer</a>
    
          </div>
            
            </header>
             <table class="table table-bordered table-striped mb-none mt-0" id="datatable-default">
               <thead>
                   <tr>
                      <th>S.NO</th>
          <th class="text-left">Subvendor&nbsp;Names</th>
          <th>Arms Dia*25-mm</th>
          <th>Arms Dia Inner*32-mm </th>
            <th>Arms Dia inner*40-mm
</th>
          <th>Clams Set*25-mm</th>
            <th> Clams Set*40*2-mm</th>
          <th>Clams Set*40*3-mm</th>
          <th>Transfered cable </th>
          <th>Total</th>         
                   </tr>
               </thead>
               <tbody>
               <?php $tw1=0;$tw2=0;$tw3=0;$tw4=0;$tw5=0;$tw6=0;$tw7=0; $sum=0; $i=0;?>
           
            @foreach($area_dis as $list)

             <?php $i++;
             $counts=$list['arms_25']+$list['arms_32']+$list['arms_40']+$list['clamps_25']+$list['clamps_42']+$list['clamps_43']
             // $ex_buf_stock=$counts-$list['buffer_stk'];
             ?>
                <tr>
                  <td data-order="{{$i}}">{{$i}}</td>
                   <td><a href="">{{$list['subvendor_name']['name']}}</a></td>
                     <td>{{$list['arms_25']??'0'}}</td>
                      <td>{{$list['arms_32']??'0'}}</td>
                       <td>{{$list['arms_40']??'0'}}</td>
                      <td>{{$list['clamps_25']??'0'}}</td>
                       <td>{{$list['clamps_42']??'0'}}</td>
                      <td>{{$list['clamps_43']??'0'}}</td>
                       <td>{{$list['rcv_cbl']??'0'}}</td>
                      <td>{{$counts??'0'}}</td>
     
                </tr>
               <?php 
       $tw1=$list['arms_25']+$tw1;
       $tw2=$list['arms_32']+$tw2;
       $tw3=$list['arms_40']+$tw3;
       $tw4=$list['clamps_25']+$tw4;
       $tw5=$list['clamps_42']+$tw5;
       $tw6=$list['clamps_43']+$tw6;
       $tw7=$list['rcv_cbl']+$tw7;
       $sum=$sum+$counts; ?>
                                
       @endforeach
       <tr>
         <td data-order="{{$i}}"></td>
         <td><b>Total</b></td>
          <td><b>{{$tw1??'0'}}</b></td>
          <td><b>{{$tw2??'0'}}</b></td>
          <td><b>{{$tw3??'0'}}</b></td>
          <td><b>{{$tw4??'0'}}</b></td>
          <td><b>{{$tw5??'0'}}</b></td>
          <td><b>{{$tw6??'0'}}</b></td>
          <td><b>{{$tw7??'0'}}</b></td>
          <td><b>{{$sum??'0'}}</b></td>  
       </tr>
               
               </tbody>
           </table>
       </section>
       <table class="table table-bordered table-striped mb-none mt-0" >
               <thead>
                   <tr class="table-success">
                      <th>S.NO</th>
          <th class="text-left">Supplied&nbsp;Names</th>
           <th>Arms Dia- 25-mm</th>
          <th>Arms Dia Inner- 32-mm</th>
            <th>Arms Dia inner- 40-mm</th>
          <th>Clams Set 25-mm</th>
            <th>Clams Set 40- 2-mm</th>
          <th>Clams Set 40- 3-mm</th>
          <th>1C *1.5 sq.mm</th>
         <!--  <th>Total</th> -->         
                   </tr>
               </thead>
               <tbody>
               <?php $tw1=0;$tw2=0;$tw3=0;$tw4=0;$tw5=0;$tw6=0;$tw7=0; $sum=0; $i=0;?>
           
            @foreach($area_dis_supply as $list)

             <?php $i++;
             $counts=$list['arms_25']+$list['arms_32']+$list['arms_40']+$list['clamps_25']+$list['clamps_42']+$list['clamps_43']+$list['rcv_cbl']
             // $ex_buf_stock=$counts-$list['buffer_stk'];
             ?>
                <tr>
                  <td data-order="{{$i}}">{{$i}}</td>
                    <td>{{$list['suplied_by']??'0'}}</td>
                     <td>{{$list['arms_25']??'0'}}</td>
                      <td>{{$list['arms_32']??'0'}}</td>
                       <td>{{$list['arms_40']??'0'}}</td>
                      <td>{{$list['clamps_25']??'0'}}</td>
                       <td>{{$list['clamps_42']??'0'}}</td>
                      <td>{{$list['clamps_43']??'0'}}</td>
                       <td>{{$list['rcv_cbl']??'0'}}</td>
                      <!-- <td>{{$counts}}</td> -->
     
                </tr>
        <?php 
       $tw1=$list['arms_25']+$tw1;
       $tw2=$list['arms_32']+$tw2;
       $tw3=$list['arms_40']+$tw3;
       $tw4=$list['clamps_25']+$tw4;
       $tw5=$list['clamps_42']+$tw5;
       $tw6=$list['clamps_43']+$tw6;
       $tw7=$list['rcv_cbl']+$tw7;
       $sum=$sum+$counts; ?>
                                
       @endforeach
       <tr>
         <td data-order="{{$i}}"></td>
         <td><b>Total</b></td>
          <td><b>{{$tw1??'0'}}</b></td>
          <td><b>{{$tw2??'0'}}</b></td>
          <td><b>{{$tw3??'0'}}</b></td>
          <td><b>{{$tw4??'0'}}</b></td>
          <td><b>{{$tw5??'0'}}</b></td>
          <td><b>{{$tw6??'0'}}</b></td>
          <td><b>{{$tw7??'0'}}</b></td>
          <!-- <td><b>{{$sum??'0'}}</b></td>  -->    
       </tr>
               
               </tbody>
           </table>
   </section>
 </div>
     @stop