@extends('template.app')

@section('meta')
@endsection

@section('title')
    RTO Master View
@endsection

@section('styles')
@endsection

@section('content')
<div class="page-breadcrumb">
    <div class="row">
        <div class="col-7 align-self-center">
            <h4 class="page-title text-truncate text-dark font-weight-medium mb-1">RTO Master Master</h4>
            <div class="d-flex align-items-center">
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb m-0 p-0">
                        <li class="breadcrumb-item"><a href="{{ route('dashboard') }}" class="text-muted">Dashboard</a></li>
                        <li class="breadcrumb-item"><a href="{{ route('rto_master') }}" class="text-muted">RTO Master</a></li>
                        <li class="breadcrumb-item text-muted active" aria-current="page">View</li>
                    </ol>
                </nav>
            </div>
        </div>
    </div>
</div>
<div class="container-fluid">
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <form action="{{ route('rto_master.view') }}" name="form" id="form" method="post" enctype="multipart/form-data">
                        @csrf
                        @method('GET')

                        <div class="row">
                            <!--div class="form-group col-sm-3">
                                <label for="name">Amount</label>
                                <input type="text" name="amount" id="amount" class="form-control" placeholder="Enter Amount" value="{{ $data->amount ??'' }}" disabled>
                                <span class="kt-form__help error name"></span>
                            </div !--> 
                            <!--<div class="form-group col-sm-3">
                                <label for="to_branch">Branch</label> <?php echo $data->branchid; ?>
                                <select class="form-control" name="branch" id="branch">
                                    @if(isset($branch) && $branch->isNotEmpty())
                                        @foreach($branch as $row)
                                            <option value="{{ $row->id }}" <?php if($row->id ==  $data->branch_id){ echo "selected"; } ?> > {{ $row->name }} </option>
                                        @endforeach
                                    @endif
                                </select>
                                <span class="kt-form__help error to_branch"></span>
                            </div>


                             <div class="form-group col-sm-3">
                                <label for="to_branch">Car Model</label>
                                <select class="form-control" name="car_model" id="car_model">
                                    @if(isset($carmodel) && $carmodel->isNotEmpty())
                                        @foreach($carmodel as $row)
                                            <option value="{{ $row->id }}" <?php if($row->id ==  $data->car_model_id){ echo "selected"; } ?>> {{ $row->name }} </option>
                                        @endforeach
                                    @endif
                                </select>
                                <span class="kt-form__help error to_branch"></span>
                            </div>
                             <div class="form-group col-sm-3">
                                <label for="to_branch">Car Varient</label>
                                <select class="form-control" name="car_varient" id="car_varient">
                                    @if(isset($carvarient) && $carvarient->isNotEmpty())
                                        @foreach($carvarient as $row)
                                            <option value="{{ $row->id }}" <?php if($row->id ==  $data->car_varient_id){ echo "selected"; } ?>> {{ $row->name }} </option>
                                        @endforeach
                                    @endif
                                </select>
                                <span class="kt-form__help error to_branch"></span>
                            </div>
                             <div class="form-group col-sm-3">
                                <label for="to_branch">Price List</label> <?php $priselist = explode(",",$data->pricelist_id); ?>

                                <select class="form-control" name="pricelist" id="pricelist" >
                                    @if(isset($query) && $query->isNotEmpty())
                                        @foreach($query as $row)<?php if(in_array($row->id,$priselist)){?>
                                            <option value="{{ $row->id }}" <?php if(in_array($row->id,$priselist)){ echo "selected"; } ?>> {{ $row->price_list_name }} </option><?php } ?>
                                        @endforeach
                                    @endif
                                </select>
                                <span class="kt-form__help error to_branch"></span>
                            </div>     -->
                             <div class="form-group col-sm-3">
                                <label for="to_branch" >RTO Type</label>
                                <select class="form-control" name="rto_type" id="rto_type" readonly>
                                <option value="regular_rto" <?php if('regular_rto' ==  $data->rto_type){ echo "selected"; } ?>>Regular Rto</option>
                                <option value="csd"  <?php if('csd' ==  $data->rto_type){ echo "selected"; } ?>>CSD</option>
                                <option value="handicap"  <?php if('handicap' ==  $data->rto_type){ echo "selected"; } ?>>Handicap</option>
                                <option value="taxi"  <?php if('taxi' ==  $data->rto_type){ echo "selected"; } ?>>M-Drive(Taxi)</option>
                                <option value="electric"  <?php if('electric' ==  $data->rto_type){ echo "selected"; } ?>>Electric</option>
                                <option value="crtem"  <?php if('crtem' ==  $data->rto_type){ echo "selected"; } ?>>Crtem</option>

                                </select>
                                <span class="kt-form__help error to_branch"></span>
                            </div>    
                            
                            
                            <div class="form-group col-sm-3">
                                <label for="name">RTO Tax Individual (%)</label>
                                <input type="number" name="rto_tax_individual" id="rto_tax_individual" class="form-control" placeholder="Enter Rto Tax Individual" min="0"  value="{{ $data->rto_tax_individual ??'' }}" readonly>
                                <span class="kt-form__help error name"></span>
                            </div>  
                            
                               
                            <div class="form-group col-sm-3">
                                <label for="name">RTO Tax Company (%)</label>
                                <input type="number" name="rto_tax_company" id="rto_tax_company" class="form-control" placeholder="Enter Rto Tax Company" min="0" value="{{ $data->rto_tax_company ??'' }}" readonly>
                                <span class="kt-form__help error name"></span>
                            </div> 
                            
                              <div class="form-group col-sm-3">
                                <label for="name">Temporary Registration</label>
                                <input type="number" name="temporary_registration" id="temporary_registration" class="form-control" placeholder="Enter Temporary Registration" min="0" value="{{ $data->temporary_registration ??'' }}" readonly>
                                <span class="kt-form__help error name"></span>
                            </div> 
                            
                              <div class="form-group col-sm-3">
                                <label for="name">Smart Card Fee</label>
                                <input type="number" name="smart_card_fee" id="smart_card_fee" class="form-control" placeholder="Enter Smart Card Fee" min="0" value="{{ $data->smart_card_fee ??'' }}" readonly>
                                <span class="kt-form__help error name"></span>
                            </div> 
                            
                            
                              <div class="form-group col-sm-3">
                                <label for="name">Hypothecation</label>
                                <input type="number" name="hypothecation" id="hypothecation" class="form-control" placeholder="Enter Hypothecation" min="0" value="{{ $data->hypothecation ??'' }}" readonly>
                                <span class="kt-form__help error name"></span>
                            </div> 
                            
                            
                              <div class="form-group col-sm-3">
                                <label for="name">Fresh Permit</label>
                                <input type="number" name="fresh_permit" id="fresh_permit" class="form-control" placeholder="Enter Fresh Permit" min="0" value="{{ $data->fresh_permit ??'' }}" readonly>
                                <span class="kt-form__help error name"></span>
                            </div> 
                            
                            
                              <div class="form-group col-sm-3">
                                <label for="name">New Registration </label>
                                <input type="number" name="new_registion" id="new_registion" class="form-control" placeholder="Enter New Registration" min="0" value="{{ $data->new_registion ??'' }}" readonly>
                                <span class="kt-form__help error name"></span>
                            </div> 
                            
                              <div class="form-group col-sm-3">
                                <label for="name">Crtem </label>
                                <input type="number" name="crtem" id="crtem" class="form-control" placeholder="Enter New Crtem" min="0" value="{{ $data->crtem ??'' }}" readonly >
                                <span class="kt-form__help error name"></span>
                            </div>
                            
                            
                            <div class="form-group col-sm-3">
                                <label for="name">Agent Charges </label>
                                <input type="number" name="agent_charges" id="agent_charges" class="form-control" placeholder="Enter Agent Charges" min="0" value="{{ $data->agent_charges ??'' }}" readonly>
                                <span class="kt-form__help error name"></span>
                            </div>
                            
                            <div class="form-group col-sm-3">
                                <label for="name">Rto Heandling Charges </label>
                                <input type="number" name="rto_heandling_charges" id="rto_heandling_charges" class="form-control" placeholder="Enter RTO Heading Charges" value="{{ $data->rto_heandling_charges ??'' }}" readonly >
                                <span class="kt-form__help error name"></span>
                            </div>
                            
                        </div>
                        <div class="form-group">
                            <a href="{{ route('rto_master') }}" class="btn waves-effect waves-light btn-rounded btn-outline-secondary">Back</a>
                        </div>
                    </form>
                    
                    
                </div>
            </div>
        </div>
        
        <div class="col-md-12 mt-5" style="background-color:white;">
                  <table class="table" >
                      <th class="text-center"><h1>Calculation</h1></th>
                  </table>
                  <table class="table" >
                      <th class="text-center"><h1>Car Model :   Rajkot Carnival </h1></th>
                  </table>
            
            <table class="table" >
  <thead>
    <tr>
      <th scope="col">Sr</th>
      <th scope="col">RTO Type</th>
      <th scope="col">Basic Amount</th>
      <th scope="col">Rto Tax Individual</th>
      <th scope="col">Rto Tax Company</th>
      <th scope="col">Amount</th>
      <th scope="col">Temporary Registration</th>
      <th scope="col">Smart Card Fee</th>
      <th scope="col">Hypothecation</th>
      <th scope="col">Fresh Permit</th>
      <th scope="col">New Registration</th>
      <th scope="col">Total (a)</th>
      <th scope="col">Crtem</th>
      <th scope="col">Agent Charges</th>
      <th scope="col">Rto Heandling Charges</th>
      <th scope="col">Total (b)</th>
       <th scope="col">Total (a+b)</th>
      
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope="row">1</th>
      <td>Regular Rto</td>
      <td>803379</td>
      <td>6%</td>
      <td>12%</td>
      <td>48203</td>
      <td>200</td>
      <td>200</td>
      <td>1500</td>
      <td>0</td>
      <td>600</td>
      <td>50703</td>
      <td>531</td>
      <td>800</td>
      <td>2500</td>
      <td>3831</td>
      <td>54534 | 102737</td>
    </tr>
    <tr>
      <th scope="row">2</th>
      <td>CSD</td>
      <td>-</td>
      <td>6%</td>
      <td>12%</td>
      <td>48203</td>
      <td>200</td>
      <td>200</td>
      <td>1500</td>
      <td>0</td>
      <td>600</td>
      <td>50703</td>
      <td>531</td>
      <td>800</td>
      <td>2500</td>
      <td>3831</td>
      <td>6331 | 6331</td>
    </tr>
    
    <tr>
      <th scope="row">3</th>
      <td>Handicap</td>
      <td>-</td>
      <td>0%</td>
      <td>0%</td>
      <td>0</td>
      <td>200</td>
      <td>200</td>
      <td>500</td>
      <td>0</td>
      <td>50</td>
      <td>950</td>
      <td>531</td>
      <td>800</td>
      <td>2500</td>
      <td>3831</td>
      <td>4781 | 4781</td>
    </tr>
    
    <tr>
      <th scope="row">4</th>
      <td>M-Drive (Taxi)</td>
      <td>578254</td>
      <td>6%</td>
      <td>12%</td>
      <td>34695</td>
      <td>200</td>
      <td>200</td>
      <td>1500</td>
      <td>350</td>
      <td>1000</td>
      <td>37945</td>
      <td>531</td>
      <td>5000</td>
      <td>2500</td>
      <td>8031</td>
      <td>45976 | 80671</td>
    </tr>
    
    <tr>
      <th scope="row">5</th>
      <td>Electric </td>
      <td>-</td>
      <td>12%</td>
      <td>24%</td>
      <td>0</td>
      <td>200</td>
      <td>200</td>
      <td>1500</td>
      <td>0</td>
      <td>600</td>
      <td>2500</td>
      <td>531</td>
      <td>800</td>
      <td>2500</td>
      <td>3831</td>
      <td>6331 | 6331</td>
    </tr>
    <tr>
      <th scope="row">6</th>
      <td>Crtem </td>
      <td>-</td>
      <td>0%</td>
      <td>0%</td>
      <td>0</td>
      <td>200</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>200</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>200</td>
      <td>200 | 200</td>
    </tr>
    
  </tbody>
</table>
          
          
          <br>
          
          <table class="table" >
                      <th class="text-center"><h1>Calculation</h1></th>
                  </table>
                  <table class="table" >
                      <th class="text-center"><h1>Car Model :   Junaghadh Carnival </h1></th>
                  </table>
            
            <table class="table" >
  <thead>
    <tr>
      <th scope="col">Sr</th>
      <th scope="col">RTO Type</th>
      <th scope="col">Basic Amount</th>
      <th scope="col">Rto Tax Individual</th>
      <th scope="col">Rto Tax Company</th>
      <th scope="col">Amount</th>
      <th scope="col">Temporary Registration</th>
      <th scope="col">Smart Card Fee</th>
      <th scope="col">Hypothecation</th>
      <th scope="col">Fresh Permit</th>
      <th scope="col">New Registration</th>
      <th scope="col">Total (a)</th>
      <th scope="col">Crtem</th>
      <th scope="col">Agent Charges</th>
      <th scope="col">Rto Heandling Charges</th>
      <th scope="col">Total (b)</th>
       <th scope="col">Total (a+b)</th>
      
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope="row">1</th>
      <td>Regular Rto</td>
      <td>803379</td>
      <td>6%</td>
      <td>12%</td>
      <td>48203</td>
      <td>200</td>
      <td>200</td>
      <td>1500</td>
      <td>0</td>
      <td>600</td>
      <td>50703</td>
      <td>531</td>
      <td>800</td>
      <td>2500</td>
      <td>3831</td>
      <td>54534 | 102737</td>
    </tr>
    <tr>
      <th scope="row">2</th>
      <td>CSD</td>
      <td>-</td>
      <td>6%</td>
      <td>12%</td>
      <td>48203</td>
      <td>200</td>
      <td>200</td>
      <td>1500</td>
      <td>0</td>
      <td>600</td>
      <td>50703</td>
      <td>531</td>
      <td>800</td>
      <td>2500</td>
      <td>3831</td>
      <td>6331 | 6331</td>
    </tr>
    
    <tr>
      <th scope="row">3</th>
      <td>Handicap</td>
      <td>-</td>
      <td>0%</td>
      <td>0%</td>
      <td>0</td>
      <td>200</td>
      <td>200</td>
      <td>500</td>
      <td>0</td>
      <td>50</td>
      <td>950</td>
      <td>531</td>
      <td>800</td>
      <td>2500</td>
      <td>3831</td>
      <td>4781 | 4781</td>
    </tr>
    
    <tr>
      <th scope="row">4</th>
      <td>M-Drive (Taxi)</td>
      <td>578254</td>
      <td>6%</td>
      <td>12%</td>
      <td>34695</td>
      <td>200</td>
      <td>200</td>
      <td>1500</td>
      <td>350</td>
      <td>1000</td>
      <td>37945</td>
      <td>531</td>
      <td>5000</td>
      <td>2500</td>
      <td>8031</td>
      <td>45976 | 80671</td>
    </tr>
    
    <tr>
      <th scope="row">5</th>
      <td>Electric </td>
      <td>-</td>
      <td>12%</td>
      <td>24%</td>
      <td>0</td>
      <td>200</td>
      <td>200</td>
      <td>1500</td>
      <td>0</td>
      <td>600</td>
      <td>2500</td>
      <td>531</td>
      <td>800</td>
      <td>2500</td>
      <td>3831</td>
      <td>6331 | 6331</td>
    </tr>
    <tr>
      <th scope="row">6</th>
      <td>Crtem </td>
      <td>-</td>
      <td>0%</td>
      <td>0%</td>
      <td>0</td>
      <td>200</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>200</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>200</td>
      <td>200 | 200</td>
    </tr>
    
  </tbody>
</table>
            
            
        </div>
        
    </div>
</div>
@endsection

@section('scripts')
@endsection