<?php
$is_finance_display_filds = 1;

   

   if($user_role == 'KEC' ||  $user_role == 'Team leader'){

       $is_finance_display_filds = 0;    

   }
?>
@extends('template.app') 
@section('meta')
@endsection
@section('title')
Obf Summary
@endsection
@section('styles')
<link href="{{ asset('assets/css/dropify.min.css') }}" rel="stylesheet">
<link href="{{ asset('assets/css/sweetalert2.bundle.css') }}" rel="stylesheet">
<link href="{{ asset('assets/css/select2.css') }}" rel="stylesheet">
<style type="text/css">
   /*#galeria{
   display: flex;
   }*/
   #galeria img{
   width: 85px;
   height: 85px;
   border-radius: 10px;
   box-shadow: 0 0 8px rgba(0,0,0,0.2);
   opacity: 85%;
   padding: 3px;
   }
   /* #pan_image_multi{
   display: flex;
   }*/
   #pan_image_multi img{
   width: 85px;
   height: 85px;
   border-radius: 10px;
   box-shadow: 0 0 8px rgba(0,0,0,0.2);
   opacity: 85%;
   padding: 3px;
   }
   /*#adhar_image_multi{
   display: flex;
   }*/
   #adhar_image_multi img{
   width: 85px;
   height: 85px;
   border-radius: 10px;
   box-shadow: 0 0 8px rgba(0,0,0,0.2);
   opacity: 85%;
   padding: 3px;
   }
   /*#documents_multi{
   display: flex;
   }*/
   #documents_multi img{
   width: 85px;
   height: 85px;
   border-radius: 10px;
   box-shadow: 0 0 8px rgba(0,0,0,0.2);
   opacity: 85%;
   padding: 3px;
   }
   /*#licance_image_multi{
   display: flex;
   }*/
   #licance_image_multi img{
   width: 85px;
   height: 85px;
   border-radius: 10px;
   box-shadow: 0 0 8px rgba(0,0,0,0.2);
   opacity: 85%;
   padding: 3px;
   }
   .row > .column {
   padding: 0 8px;
   }
   .row:after {
   content: "";
   display: table;
   clear: both;
   }
   /* Create four equal columns that floats next to eachother */
   .column {
   float: left;
   width: 25%;
   }
   /* The Modal (background) */
   .modal {
   display: none;
   position: fixed;
   z-index: 1;
   padding-top: 100px;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
   overflow: auto;
   background-color: black;
   }
   /* Modal Content */
   .modal-content {
   position: relative;
   background-color: #fefefe;
   margin: auto;
   padding: 0;
   width: 100%;
   max-width: 700px;
   }
   /* The Close Button */
   .close {
   color: white;
   position: absolute;
   top: 10px;
   right: 25px;
   font-size: 35px;
   font-weight: bold;
   }
   .close:hover,
   .close:focus {
   color: #999;
   text-decoration: none;
   cursor: pointer;
   }
   /* Hide the slides by default */
   .mySlides {
   display: none;
   }
   /* Next & previous buttons */
   .prev,
   .next {
   cursor: pointer;
   position: absolute;
   top: 50%;
   width: auto;
   padding: 16px;
   margin-top: -50px;
   color: white;
   font-weight: bold;
   font-size: 20px;
   transition: 0.6s ease;
   border-radius: 0 3px 3px 0;
   user-select: none;
   -webkit-user-select: none;
   }
   /* Position the "next button" to the right */
   .next {
   right: 0;
   border-radius: 3px 0 0 3px;
   }
   /* On hover, add a black background color with a little bit see-through */
   .prev:hover,
   .next:hover {
   background-color: rgba(0, 0, 0, 0.8);
   }
   /* Number text (1/3 etc) */
   .numbertext {
   color: #f2f2f2;
   font-size: 12px;
   padding: 8px 12px;
   position: absolute;
   top: 0;
   }
   /* Caption text */
   .caption-container {
   text-align: center;
   background-color: black;
   padding: 2px 16px;
   color: white;
   }
   img.demo {
   opacity: 0.6;
   }
   .active,
   .demo:hover {
   opacity: 1;
   }
   /*img.hover-shadow {
   transition: 0.3s;
   height: 100px;
   width: 100px;
   }*/
   .hover-shadow:hover {
   box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
   }
   .make_deal_table th, 
    .make_deal_table td {
        border: 1px solid #cfbdbd;
        padding: 8px;
        text-align: left;
        line-height: 1.8;
    }
    
    .make_deal_table th {
        background-color: #f2f2f2;
    }
    
    .make_deal_table .right-align {
        text-align: right;
    }
    .make_deal_table .final-deal {
        background-color: #2F345E;
        font-weight: bold;
    }
    .make_deal_table .light_gray{
        background-color: #2F345E;
    }
    .make_deal_table .text-center {
        text-align: center !important;
    }
    h3{
        margin-top: -10px!important;
        margin-bottom: -10px!important;
        background-color: #2F345E!important;
    }    
    @media print {
        body {
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
        }
        .final-deal, .light_gray {
            background-color: lightgray !important;
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
        }
        .no-print {
            display: none !important;
        }
    }
</style>
@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">OBF Summary</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('obf') }}" class="text-muted">OBF</a></li>
                  <li class="breadcrumb-item text-muted active" aria-current="page">Summary</li>
               </ol>
            </nav>
         </div>
      </div>
        <div class="col-5 align-self-center">
            <div class="customize-input float-right">
                <button onclick="printDiv('content-to-print')" style="background-color: green; color: white; margin-left: 30px; border: none; cursor: pointer; border-radius: 5px;">
                    <i class="fa fa-print"></i> Print Content
                </button>
            </div>
        </div>
   </div>
</div>
<div class="container-fluid" id="content-to-print">
<div class="row">
   <div class="col-12">
      <div class="card">
         <div class="card-body">
            <div class="col-md-offset-3">
               <form role="form"  enctype="multipart/form-data">
                  <div class="row">
                     <div class="col-lg-12 ">
                        <div class="col-md-12">
                            <hr style="border:1px solid grey;margin-top:50px;">
                           <h3> Purchase Details</h3>
                           <hr style="border:1px solid grey;">
                           <!--<div class="row">-->
                           <table style="width:100%;">
                              <tbody>
                                 <tr>
                                    <td> 
                                       <label class="control-label"><b>Vin Number : </b></label>
                                    </td>
                                    <td> : </td>
                                    <td> 
                                       <span class="form-label">{{ $obfShow->vin_number ?? 'N/A' }}</span>
                                    </td>
                                    <div class="vl"></div>
                                    <td> 
                                       <label class="control-label"><b>Car Model</b></label>
                                    </td>
                                    <td> : </td>
                                    <td>
                                       <span class="form-label">{{ $obfShow->product ?? 'N/A' }}</span>
                                    </td>
                                 </tr>
                                 <tr>
                                    <td>
                                       <label class="control-label"><b>Car Varient</b></label>
                                    </td>
                                    <td> : </td>
                                    <td>
                                       <span class="form-label">{{ $obfShow->car_varient_name ?? 'N/A' }}</span>
                                    </td>
                                    <td>
                                       <label class="control-label"><b>Interior Colour </b></label>
                                    </td>
                                    <td> : </td>
                                    <td>
                                       <span class="form-label">{{ $obfShow->interior_color ?? 'N/A' }}</span>
                                    </td>
                                 </tr>
                                 <tr>
                                    <td>
                                       <label class="control-label"><b>Exterior Colour </b></label>
                                    </td>
                                    <td> : </td>
                                    <td>
                                       <span class="form-label">{{ $obfShow->exterior_color ?? 'N/A' }}</span>
                                    </td>
                                    <td>
                                       <label class="control-label"><b>Purchase Price </b></label>
                                    </td>
                                    <td> : </td>
                                    <td>
                                       <span class="form-label">{{ $obfShow->purchase_price ?? 'N/A' }}</span>
                                    </td>
                                 </tr>
                                 <tr>
                                    <td>
                                       <label class="control-label"><b>GST</b></label>
                                    </td>
                                    <td> : </td>
                                    <td>
                                       <span class="form-label">{{ $obfShow->gst ?? 'N/A' }}</span>
                                    </td>
                                    <td>
                                       <label class="control-label"><b>Kin Invoice Date</b></label>
                                    </td>
                                    <td> : </td>
                                    <td>
                                       <span class="form-label">{{ $obfShow->kin_invoice_date ?? 'N/A' }}</span>
                                    </td>
                                 </tr>
                                 <tr>
                                    <td>
                                       <label class="control-label"><b>Key Number</b></label>
                                    </td>
                                    <td> : </td>
                                    <td>
                                       <span class="form-label">{{ $obfShow->key_number ?? 'N/A' }}</span>
                                    </td>
                                    <td>
                                       <label class="control-label"><b>Ex Showroom Price</b></label>
                                    </td>
                                    <td> : </td>
                                    <td>
                                       <span class="form-label">{{ $obfShow->ex_showroom_price ?? 'N/A' }}</span>
                                    </td>
                                 </tr>
                                  <tr>
                                    <td>
                                       <label class="control-label"><b>Kin Margin</b></label>
                                    </td>
                                    <td> : </td>
                                    <td>
                                       <span class="form-label">{{ $obfShow->kin_margin ?? 'N/A' }}</span>
                                    </td>
                                    <td>
                                       <label class="control-label"><b>Inventory Type</b></label>
                                    </td>
                                    <td> : </td>
                                    <td>
                                       <span class="form-label">{{ $obfShow->inventory_type ?? 'N/A' }}</span>
                                    </td>
                                 </tr>
                                 </tbody>
                           </table>
                           <!--</div>-->
                        </div>
                     </div>
                     <div class="col-lg-12 ">
   <div class="col-md-12">

                        <hr style="border:1px solid grey;margin-top:50px;">
                        <h3> Personal Details</h3>
                        <hr style="border:1px solid grey;">

                        <!--<div class="row">-->

                        <table style="width:100%;">

                           <tbody>

                              <tr>

                                 <td> 

                                    <label class="control-label"><b>Booking Date</b></label>

                                 </td>

                                 <td> : </td>

                                 <td> 

                                    <span class="form-label">{{ date('d-m-Y',strtotime($obfShow->booking_date)) ?? 'N/A' }}</span>

                                 </td>

                                 <div class="vl"></div>

                                 <td> 

                                    <label class="control-label"><b>Customer Name</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $obfShow->customer_name ?? 'N/A' }}</span>

                                 </td>

                                 <!-- <input type="text"  name="customer_name" id="customer_name" class="form-control" placeholder="Enter Customer Name" value="{{ $obfShow->customer_name ?? '' }}" disabled>

                                    <span class="kt-form__help error customer_name"></span> -->

                              </tr>

                              <tr>

                                 <td>

                                    <label class="control-label"><b>Branch</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $obfShow->branch_name ?? 'N/A' }}</span>


                                 </td>

                                 <td>

                                       <label class="control-label"><b>RTO Type </b></label>

                                    </td>

                                    <td> : </td>

                                    <td>
                                        @php
                                            $customer_type = $data->customer_type;
                                            if ($customer_type == 'bh_parsing') {
                                                $rto_type = 'BH Passing';
                                            } else {
                                                $rto_type = ucwords(str_replace('_', ' ', $data->customer_type));
                                            }
                                       @endphp
                                       <span class="form-label">{{ $rto_type ?? 'N/A' }}</span> 

                                    </td>

                              </tr>

                              <tr>

                                 <td>

                                       <label class="control-label"><b>Customer Type </b></label>

                                    </td>

                                    <td> : </td>

                                    <td>

                                       <span class="form-label">{{ $obfShow->customer_type_nm ?? 'N/A' }}</span>

                                    </td>

                                 <td>

                                    <label class="control-label"><b>Company Name </b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $obfShow->company_name ?? 'N/A' }}</span>

                                 </td>

                              </tr>

                              <tr>

                                 <td>

                                    <label class="control-label"><b>E-Invoice Applicable</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ ucwords($data->einvoicing_applicable) ?? 'N/A' }}</span>

                                 </td>

                                 <td>

                                    <label class="control-label"><b>GST</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $obfShow->gst ?? 'N/A' }}</span>

                                 </td>

                              </tr>

                              <tr>

                                 <td>

                                    <label class="control-label"><b>Address Correspondence</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $obfShow->address ?? 'N/A' }}</span>

                                 </td>

                                 <td>

                                    <label class="control-label"><b>Registration Correspondence</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $obfShow->registration ?? 'N/A' }}</span>

                                 </td>

                              </tr>

                              <tr>

                                 <td>

                                    <label class="control-label"><b>E-Mail</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $data->email ?? 'N/A' }}</span>

                                 </td>

                                 <td> 

                                    <label class="control-label"><b>Mobile Number</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $data->contact_number ?? 'N/A' }}</span>

                                 </td>

                              </tr>

                              <tr>

                                 <td>

                                    <label class="control-label"><b>PAN No</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $data->pan_number ?? 'N/A' }}</span>

                                 </td>

                                 <td>

                                    <label class="control-label"><b>Aadhar No</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $data->adhar_number ?? 'N/A' }}</span>

                                 </td>

                              </tr>

                              <tr>

                                 <td>

                                    <label class="control-label"><b>Voter ID No</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $data->licance_number ?? 'N/A' }}</span>
                                 </td>

                                 <td>

                                    <label class="control-label"><b>Date of Birth</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $data->dob ? \Carbon\Carbon::parse($data->dob)->format('d-m-Y') : 'N/A' }}</span>

                                 </td>

                              </tr>

                              <tr>

                                 <td>

                                    <label class="control-label"><b>Nominee Name</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $data->nominee_name ?? 'N/A' }}</span>

                                 </td>

                                 <td>

                                    <label class="control-label"><b>Nominee Relation</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $data->nominee_reletion ?? 'N/A' }}</span>

                                 </td>

                              </tr>

                              <tr>

                                 <td>

                                    <label class="control-label"><b>Nominee Age</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $data->nominee_age ?? 'N/A' }}</span>

                                 </td>

                                 <td>

                                    <label class="control-label"><b>Occupation</b></label>

                                 </td>

                                 <td> : </td>

                                 <td>

                                    <span class="form-label">{{ $data->occupation ?? 'N/A' }}</span>

                                 </td>
                                 <tr>
                                       <td>
                                          <label class="control-label"><b>Nominee DOB</b></label>
                                       </td>
                                       <td> : </td>
                                       <td>

                                    <span class="form-label">{{ $data->nominee_dob ? \Carbon\Carbon::parse($data->nominee_dob)->format('d-m-Y') : 'N/A' }}</span>

                                 </td>
                                 
                                       <td>
                                          <label class="control-label"><b>Anniversary DOB</b></label>
                                       </td>
                                       <td> : </td>
                                       <td>
                                          <span class="form-label">{{ $data->anniversary_date ? \Carbon\Carbon::parse($data->anniversary_date)->format('d-m-Y') : 'N/A' }}</span>
                                       </td>
                  
                                 </tr>

                              </tr>

                           </tbody>

                        </table>

                        <!--</div>-->

                     </div>

                  </div>
                  <div class="col-lg-12 ">
   <div class="col-md-12">

                        <hr style="border: 1px solid grey;">

                  <div class="row">

                     <div class="col-lg-12">

                        <div class="col-md-12">

                           <h3> Car Details</h3>

                           <hr style="border:1px solid grey;">
                           
                               <table style="width:100%;">
    
                                    <tbody>
    
                                        <tr>
                                            <td> 
        
                                               <label class="control-label"><b>Car Model</b></label>
        
                                            </td>
        
                                            <td> : </td>
        
                                            <td> 
        
                                               <span class="form-label">{{ $data->car_model_name ?? 'N/A' }}</span>
        
                                            </td>
        
                                            <td>
        
                                               <label class="control-label"><b>Sales Person Name</b></label>
        
                                            </td>
        
                                            <td> : </td>
        
                                            <td> 
        
                                               <span class="form-label">{{ $obfShow->sales_person_name ?? 'N/A' }}</span>
        
                                            </td>
        
                                        <tr>

                                            <td>
        
                                               <label for="veriant"><b>Car Variant</b></label>
        
                                            </td>
        
                                            <td> : </td>
        
                                            <td>
        
                                               <span class="form-label">{{ $obfShow->car_varient_name ?? 'N/A' }}</span>
        
                                            </td>
                                            
                                            <td>
        
                                               <label for="veriant"><b>Team Leader Name</b></label>
        
                                            </td>
        
                                            <td> : </td>
        
                                            <td>
        
                                               <span class="form-label">{{ $obfShow->team_name ?? 'N/A' }}</span>
        
                                            </td>
        
                                        </tr>
                                        <tr>

                                            <td>
        
                                               <label for="exterior_color"><b>Exterior Color</b></label>
        
                                            </td>
        
                                            <td> : </td>
        
                                            <td>
        
                                               <span class="form-label">{{ $data->exteriorcolor_name ?? 'N/A' }}</span>
        
                                            </td>
                                            
                                            <td>

                                               <label for="fule_type"><b>Fuel Type</b></label>
        
                                            </td>
        
                                            <td> : </td>
        
                                            <td>
        
                                               <span class="form-label">{{ $fule->fule_name ?? 'N/A' }}</span>  
        
                                            </td>
                                        </tr>    
                                        <tr>
                                            <td>

                                               <label for="interior_color"><b>Interior Color</b></label>
        
                                            </td>
        
                                            <td> : </td>
        
                                            <td>
        
                                               <span class="form-label">{{$data->interiorcolor_name ?? 'N/A' }}</span>
        
                                            </td>
                                            
                                            <td>

                                               <label for="interior_color"><b>Key Number</b></label>
        
                                            </td>
        
                                            <td> : </td>
        
                                            <td>
        
                                               <span class="form-label">{{$obfShow->key_number ?? 'N/A' }}</span>
        
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>

                                               <label for="interior_color"><b>VIN Number</b></label>
        
                                            </td>
        
                                            <td> : </td>
        
                                            <td>
        
                                               <span class="form-label">{{$obfShow->vin_number ?? 'N/A' }}</span>
        
                                            </td>
                                            <td>

                                               <label for="interior_color"><b>MFG Year</b></label>
        
                                            </td>
        
                                            <td> : </td>
        
                                            <td>
        
                                               <span class="form-label">{{$data->manufacturing_year ?? 'N/A' }}</span>
        
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>

                                               <label for="interior_color"><b>Engine Number</b></label>
        
                                            </td>
        
                                            <td> : </td>
        
                                            <td>
        
                                               <span class="form-label">{{$data->engine_number ?? 'N/A' }}</span>
        
                                            </td>
                                            <td>
                                                <label class="control-label"><b>Remarks</b></label>
                                            </td>
                                            <td> : </td>
                                            <td>
    
                                               <span class="form-label">{{ $data->step1_remarks ?? 'N/A' }}</span>
        
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>    

                           <!--<div class="row">-->

                           <table style="width:100%;">

                                <tbody>
                                    <table border="1" cellspacing="0" cellpadding="8" style="width: 100%; background-color:#313761; margin-top:5px;">
                                    <thead>
                                       <tr>
                                             <th colspan="2">On Road Price</th>
                                       </tr>
                                    </thead>
                                 </table>  
                                 
                                 <div style="display: flex; justify-content: space-between; width: 100%; gap: 10px; margin-top:15px;"> 
                                    <!-- Left Table -->
                                    <table border="1" class="left-table" cellspacing="0" cellpadding="8" style="width: 60%; line-height: 1.1; background-color:rgb(155, 229, 229);color:black;">
                                       <tbody>
                                          @php
                                             $on_road_price = $data->on_road_price ?? 0;
                                             $total_discount = $data->offer_amount ?? 0;

                                             $total_payment_received = ($data->booking_amount ?? 0) + ($data->dp_amount ?? 0) + ($data->net_disbusment ?? 0) + ($data->total_exchange_amount ?? 0);

                                             $finance_dis = ($data->finance_discount ?? 0) + ($data->way_off ?? 0) + ($data->offer_ib_amount ?? 0) + ($data->offer_kin_amount ?? 0);
                                             $due_amount = $data->on_road_price - $total_payment_received - $finance_dis;

                                             $total_ofr_discount = ($data->offer_ib_amount ?? 0) + ($data->offer_kin_amount ?? 0) + ($data->total_exchange_amount ?? 0) + ($data->finance_discount ?? 0) + ($data->way_off ?? 0) + ($data->foc_accessories ?? 0);
                                             
                                             $final_total = $on_road_price - $total_ofr_discount;
                                             
                                             $total_accessories = ($accessory_sum ?? 0) + ($data->other_accesssories_prise ?? 0);
                                             
                                             $rto_tax = ($data->registration_tax_id ?? 0) + ($data->rto_custom_handling_charges ?? 0);
                                          @endphp
                                          <tr style="line-height: 1.5;"><td>Ex Showroom</td><td>{{ $data->ex_showroom_price ?? 'N/A' }}</td></tr>
                                          <tr style="line-height: 1.3;"><td>TCS 1% (5% if Link Status No.)</td><td>{{ $data->tcs_tax_id ?? 'N/A' }}</td></tr>
                                          <tr style="line-height: 3.8;"><td>RTO (6%/12%/5%)</td><td>{{ $rto_tax }}</td></tr>
                                          <tr style="line-height: 4.4;"><td>Municipal Tax</td><td>{{ $data->municipal_tax_id ?? 'N/A' }}</td></tr>
                                          <tr style="line-height: 3.9;"><td>Insurance</td><td>{{ $data->insurance_id ?? 'N/A' }}</td></tr>
                                          <tr style="line-height: 1.3;"><td>Road Side Assist</td><td>{{ $data->rsaamount ?? 'N/A' }}</td></tr>
                                          <tr style="line-height: 1.5;"><td>CCS</td><td></td></tr>
                                          <tr style="line-height: 1.4;"><td>Extended Warranty</td><td>{{ $data->extand_warranties_amount ?? 'N/A' }}</td></tr>
                                          <tr style="line-height: 1.4;"><td>MCP / MCP +</td><td></td></tr>
                                          <tr style="line-height: 1.4;"><td>Fastag</td><td>{{ $data->brand_name ?? 'N/A' }}</td></tr>
                                          <tr><td>Accessories</td><td>{{$total_accessories ?? '0'}}</td></tr>
                                          <tr><td>Other_1</td><td>{{ $data->other_one_name ?? 'N/A' }}</td></tr>
                                          <tr><td>Other_2</td><td>{{ $data->other_two_name ?? 'N/A' }}</td></tr>
                                          <tr><td><strong>On Road Price (A)</strong></td><td><strong>{{ $data->on_road_price ?? 'N/A' }}</strong></td></tr>
                                          <tr style="background-color:#f0b7ed"><td>Less: Total Discount (B)</td><td>{{ $total_ofr_discount ?? 'N/A' }}</td></tr>
                                          <tr><td><strong>Final Deal On Road (A - B = C)</strong></td><td><strong>{{$final_total}}</strong></td></tr>
                                          <tr style="background-color: white; border-right:none; "><td></td><td></td></tr>
                                          <tr><th colspan="2" style="background-color:#9ca6ec;"><b>Customer Payment Status<b></th></tr>
                                          <tr style="background-color:#9ca6ec;"><td>Booking Amt.</td><td>{{ $data->booking_amount ?? 'N/A' }}</td></tr>
                                          <tr style="background-color:#9ca6ec;"><td>Down Payment</td><td>{{ $data->dp_amount ?? 'N/A' }}</td></tr>
                                          <tr style="background-color:#9ca6ec;"><td>Finance Disb. Amt.</td><td>{{$data->net_disbusment ?? 'N/A'}}</td></tr>
                                          <tr style="background-color:#9ca6ec;"><td>Exchange Amt.</td><td>{{ $data->total_exchange_amount ?? 'N/A' }}</td></tr>
                                          <tr style="background-color:#9ca6ec;"><td><strong>Total Payment Received (D)</strong></td><td><strong>{{ $total_payment_received }}</strong></td></tr>
                                          <tr style="background-color:#9ca6ec;"><td><strong>Due Amount (+)/Refund (-) (C - D)</strong></td><td><strong>{{$due_amount}}</strong></td></tr>
                                       </tbody>
                                    </table>
                                    <!-- Right Table -->
                                    <table border="1" cellspacing="0" cellpadding="8" style="width: 40%; background-color:#e2e97d; color:black;">
                                       <tbody>
                                           @php
                                                $customer_type = $data->customer_type;
                                                if ($customer_type == 'bh_parsing') {
                                                    $rto_type = 'BH Passing';
                                                } else {
                                                    $rto_type = ucwords(str_replace('_', ' ', $data->customer_type));
                                                }
                                           @endphp
                                          <tr><td>Price List</td><td>{{ $price_list_name->price_list_name ?? 'N/A' }}</td></tr>
                                          <tr><td>Adhar/Pan Link Status</td><td>{{ucwords($data->aadhar_pan_link)}}</td></tr>
                                          <tr><td>RTO Type</td><td>{{ $rto_type ?? 'N/A' }}</td></tr>
                                          <tr><td>Customer Type</td><td>{{ ucwords($data->customer_type_nm) ?? 'N/A' }}</td></tr>
                                          <tr><td>Customer Address</td><td>RMC (Self/Inhouse)</td></tr>
                                          <tr><td colspan="2">{{$data->registration}}</td></tr>
                                          <tr><td>Insurance Company</td><td>{{ $ObfInsurance->company_name ?? 'N/A' }}</td></tr>
                                          <tr><td>Insurance Remark</td><td>{{ $data->step3_remarks ?? 'N/A' }}</td></tr>
                                          <tr><td>Package (RSA)</td><td>{{ $data->rsa_name ?? 'N/A' }}</td></tr>
                                          <tr><td>Package (CCS)</td><td></td></tr>
                                          <tr><td>Package (EW)</td><td>{{ $data->extand_warranties_years}}</td></tr>
                                          <tr><td>Package (MCP)</td><td></td></tr>
                                          <tr><td>Fastag Com. Name</td><td>{{ $data->brand_name ?? 'N/A' }}</td></tr>
                                          <tr style="background-color: white; border-right:none; "><td></td><td></td></tr>
                                          <tr style="background-color:#f0b7ed"><th colspan="2">Discount Breakdown</th></tr>
                                          <tr style="background-color:#f0b7ed"><td>Shimav Kia Offer</td><td>{{ $data->offer_ib_amount ?? '0' }}</td></tr>
                                          <tr style="background-color:#f0b7ed"><td>KIN Offer</td><td>{{ $data->offer_kin_amount ?? '0' }}</td></tr>
                                          <tr style="background-color:#f0b7ed"><td>Exchange Bonus</td><td>{{ $data->total_exchange_amount ?? '0' }}</td></tr>
                                          <tr style="background-color:#f0b7ed"><td>Finance Disc</td><td>{{ $data->finance_discount ?? '0' }}</td></tr>
                                          <tr style="background-color:#f0b7ed"><td>FOC Accessories</td><td>{{ $data->foc_accessories }}</td></tr>
                                          <tr style="background-color:#f0b7ed"><td>Cash Discount</td><td>{{ $data->way_off }}</td></tr>
                                          <tr style="background-color:#f0b7ed"><td><strong>Total Discount (B)</strong></td><td><strong>{{$total_ofr_discount}}</strong></td></tr>
                                          <tr style="background-color: white; border-right:none; "><td></td><td></td></tr>
                                          <tr style="background-color:#77adcc"><td>Bank Name</td><td>{{ $data->finance_name }}</td></tr>
                                          <tr style="background-color:#77adcc"><td>Finance By</td><td>{{ ucwords(str_replace("_", " ", $data->finance_type))}}</td></tr>
                                          <tr style="background-color:#77adcc"><td>Exchange Car Name</td><td>{{ $data->trade_car_name }}</td></tr>
                                       </tbody>
                                    </table>
                                 </div>
                                </tbody>

                           </table>

                           <!-- </div>-->

                        </div>

                     </div>

                  </div>

                     </div>

                  </div>
                   <div class="col-md-12">

                        <hr style="border: 1px solid grey;">

                  <div class="row">

                     <div class="col-lg-12">

                        <div class="col-md-12">
                           <h3> Finance Details</h3>
                    
                                               <hr style="border:1px solid grey;"> 
                    
                                               <!-- <div class="row">-->
                    
                                               <table style="width:100%;">
                    
                                                
                    
                                                  <tbody>
                    
                                                     <tr>
                    
                                                        <td>
                    
                                                           <label class="control-label"><b>Finance Required</b></label>
                    
                                                        </td>
                    
                                                         <td> : </td>
                    
                                                        <td>{{ucwords($obfShow->finance_required)}} </td>
                    
                                                        <div class="vl3"></div>
                    
                                                        <td>

                                       <label class="control-label"><b>Finance</b></label>

                                    </td>

                                     <td> : </td>

                                    <td> 

                                       <span class="form-label">{{ $data->finance_name ?? 'N/A' }}</span>

                                    </td>

                                 </tr>

                                 @if($is_finance_display_filds == 1)

                                 <tr>

                                    <td>

                                       <label class="control-label"><b>Repo Rate</b></label>

                                    </td>

                                     <td> : </td>

                                    <td>

                                       <span class="form-label">{{ $obfShow->repo_rate ?? 'N/A' }}</span>

                                    </td>

                                    <td>

                                       <label class="control-label"><b>Net Disbusment Amount</b></label>

                                    </td>

                                     <td> : </td>

                                    <td>

                                       <span class="form-label">{{ $obfShow->net_disbusment ?? 'N/A' }}</span>

                                    </td>

                                 </tr>

                                 <tr>

                                    <td>

                                       <label class="control-label"><b>Loan Amount</b></label>

                                    </td>

                                     <td> : </td>

                                    <td>

                                       <span class="form-label">{{ $obfShow->loan_amount ?? 'N/A' }}</span>

                                    </td>

                                    <td>

                                       <label class="control-label"><b>Processing Fee</b></label>

                                    </td>

                                     <td> : </td>

                                    <td>

                                       <span class="form-label">{{ $obfShow->processing_fee ?? 'N/A' }}</span>

                                    </td>

                                 </tr>

                                 <tr>

                                    <td>

                                       <label class="control-label"><b>Finance Discount</b></label>

                                    </td>

                                     <td> : </td>

                                    <td> 

                                       <span class="form-label">{{ $obfShow->finance_discount ?? 'N/A' }}</span>

                                    </td>

                                    <td>

                                       <label class="control-label"><b>Payout</b></label>

                                    </td>

                                     <td> : </td>

                                    <td> 

                                       <span class="form-label">{{ $obfShow->payout ?? 'N/A' }}</span>

                                    </td>

                                 </tr>

                                 <tr>

                                    <td>

                                       <label class="control-label"><b>Pay Booster</b></label>

                                    </td>

                                     <td> : </td>

                                    <td> 

                                        {{ucwords($obfShow->pay_booster)}}

                                    </td>

                                    @if(!empty($Inventory_data))

                                    <td>

                                       <label class="control-label"><b>Allocation Date</b></label>

                                    </td>

                                     <td> : </td>

                                    <td>

                                       <span class="form-label">{{ date('d-m-Y',strtotime($Inventory_data->updated_at)) ?? 'N/A' }}</span>

                                       <!-- <input type="text" class="form-control" value="{{ date('d-m-Y',strtotime($Inventory_data->updated_at)) ?? '' }}" disabled="disabled"> -->

                                    </td>

                                 </tr>

                                 <tr>

                                    <td>

                                       <label class="control-label"><b>Aging Days</b></label>

                                    </td>

                                     <td> : </td>

                                    <td>

                                       <span class="form-label">{{ now()->diffInDays($Inventory_data->kin_invoice_date) ?? '' }}</span>

                                       <!--  <input type="text" class="form-control" value="{{ now()->diffInDays($Inventory_data->kin_invoice_date) ?? '' }}" disabled="disabled"> -->

                                    </td>

                                    <td>

                                       <label class="control-label"><b>Kin Invoice Date</b></label>

                                    </td>

                                     <td> : </td>

                                    <td>

                                       <span class="form-label">{{ date('d-m-Y',strtotime($Inventory_data->kin_invoice_date)) ?? 'N/A' }}</span>

                                       <!-- <input type="text" class="form-control" value="{{ date('d-m-Y',strtotime($Inventory_data->kin_invoice_date)) ?? '' }}" disabled="disabled"> -->

                                    </td>

                                 </tr>

                                 <tr>

                                    <td>

                                       <label class="control-label"><b>Allocation Count:</b></label>

                                       <span class="form-label">{{ $Inventory_data->allocation_count ?? 'N/A' }}</span>

                                       <!-- <input type="text" class="form-control" value="{{ $Inventory_data->allocation_count ?? '' }}" disabled="disabled"> -->

                                    </td>

                                    @endif
                                    <td>

                                       <label class="control-label"><b>Disbursement Field</b></label>

                                    </td>

                                     <td> : </td>

                                    <td>{{ucwords($obfShow->disbursement)}} </td>
                                 </tr>
                                 <tr>
                                    <td>

                                       <label class="control-label"><b>Finance Type</b></label>

                                    </td>

                                     <td> : </td>

                                    <td>{{ucwords(str_replace('_', ' ', $obfShow->finance_type))}} </td>
                                    
                                    <td>

                                       <label class="control-label"><b>Payout Amount</b></label>

                                    </td>

                                     <td> : </td>

                                    <td>{{$obfShow->payout_amount}} </td>
                                 </tr>
                                 <tr>
                                    
                                    <td>

                                       <label class="control-label"><b>Lumsum Amount</b></label>

                                    </td>

                                     <td> : </td>

                                    <td>{{$obfShow->lumsum_amount}} </td>
                                    
                                    <td>

                                       <label class="control-label"><b>Total Payout</b></label>

                                    </td>

                                     <td> : </td>

                                    <td>{{$obfShow->total_payout_amount}} </td>
                                 </tr>
                                 <tr>
                                    <td>

                                       <label class="control-label"><b>Remarks</b></label>

                                    </td>

                                     <td> : </td>

                                    <td>{{$obfShow->step2_remarks ?? 'N/A'}} </td>
                                 </tr>

                              </tbody>

                           </table>

                           <!--  </div>-->

                        </div>

                     </div>

                  </div>

                  @endif
                    <div class="col-lg-12 ">
                           <div class="col-md-12">
                           <hr style="border: 1px solid grey;">
                        
                                          <div class="row">
                        
                                             <div class="col-lg-12 ">
                        
                                                <div class="col-md-12">
                        
                                                   <h3> Insurance Details</h3>
                        
                                                   <!-- <div class="row">-->
                        
                                                    <hr style="border:1px solid grey;">
                        
                                                   <table style="width:100%;">
                        
                                                      <tbody>
                        
                                                         <tr>
                        
                                                            <input type="hidden" name="obf_insurance_id" value="{{ $obfShow->id ?? '' }}">
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Insurance</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td> 
                                                                @if(isset($ObfInsurance) && !empty($ObfInsurance))
                                                                    @if($ObfInsurance->insurance_exist == 1) Yes 
                                                                    @else if($ObfInsurance->insurance_exist == 2) No
                                                                    @endif
                                                                @else 
                                                                    No
                                                                @endif
                                                            </td>
                        
                                                            <div class="vl4"></div>
                        
                                                            @php                                            
                        
                                                            $ncb = '';
                        
                                                            if(isset($ObfInsurance->ncb) && $ObfInsurance->ncb != null){
                        
                                                            $ncb = $ObfInsurance->ncb;
                        
                                                            }
                        
                                                            @endphp
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>NCB - No Claim Bonus</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td> 
                        
                                                                @if($ncb =='yes' || $ncb == '') Yes @endif
                        
                                                                @if($ncb == 'no') No @endif
                        
                        
                                                            </td>
                        
                                                         </tr>
                        
                                                         <tr>
                        
                                                            @php                                            
                        
                                                            $documents = [];
                        
                                                            if(isset($obfShow->documents) && $obfShow->documents != null){
                        
                                                            $documents = $obfShow->documents;
                        
                                                            }
                        
                                                            @endphp
                        
                                                               <?php
                        
                                                                  if(!empty($documents))
                        
                                                                  {
                        
                                                                      $other_documents_arr = explode(',', $documents);
                        
                                                                      foreach ($other_documents_arr as $value) {
                        
                                                                          if(file_exists(public_path('/uploads/kyc/'.$value))) { ?>
                        
                                                               <img src="{{asset('uploads/kyc/'. $value )}}" class="hover-shadow2">
                        
                                                               <?php }
                        
                                                                  }
                        
                                                                  }
                        
                                                                  ?>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Date of Insurance</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->date_of_insurance ?? 'N/A' }}</span>
                        
                                                            </td>
                        
                                                         
                        
                                                            <td>
                        
                                                               @php                                            
                        
                                                               $time_of_insurance = '';
                        
                                                               if(isset($obfShow->time_of_insurance) && $obfShow->time_of_insurance != null){
                        
                                                               $time_of_insurance = $obfShow->time_of_insurance;
                        
                                                               }
                        
                                                               @endphp
                        
                                                               <label class="control-label"><b>Time of Insurance</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->time_of_insurance ?? 'N/A' }}</span>
                        
                                                            </td>
                        
                                                            </tr>
                        
                                                            <tr>
                        
                        
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Last Date of Insurance</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->last_time_of_insurance ?? '' }}</span>
                        
                                                            </td>
                        
                                                        
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Company Name</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->company_name ?? 'N/A' }}</span>
                        
                                                            </td>
                        
                                                             </tr>
                        
                                                         <tr>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Amount</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->ncb_amount ?? 'N/A' }}</span>
                        
                                                            </td>
                        
                                                         
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Policy Number</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->policy_number ?? 'N/A' }}</span>
                        
                        
                                                            </td>
                                                            
                        
                                                            </tr>
                        
                                                         <tr>
                        
                                                            <td>
                        
                                                               @php                                            
                        
                                                               $insurance_status = '';
                        
                                                               if(isset($obfShow->insurance_status) && $obfShow->insurance_status != null){
                        
                                                               $insurance_status = $obfShow->insurance_status;
                        
                                                               }
                        
                                                               @endphp
                        
                                                               <label class="control-label"><b>Status</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">
                        
                                                               @if($insurance_status == '1' || $insurance_status == '')  
                        
                                                               Activate
                        
                                                               @endif
                        
                                                               @if($insurance_status == '0')  
                        
                                                               Deactivate
                        
                                                               @endif
                        
                                                               </span>
                        
                                                            </td>
                        
                                                         </tr>
                                                         
                                                         
                                                         <tr>
                        
                                                            <td>
                        
                                                             
                        
                                                               <label class="control-label"><b>Tyer 1</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">
                        
                                                              {{ $obfShow->tyre_no1 ?? 'N/A' }}
                                                               </span>
                        
                                                            
                        
                                                            </td>
                                                             <td>
                        
                                                             
                        
                                                               <label class="control-label"><b>Tyer 2</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">
                        
                                                              {{ $obfShow->tyre_no2 ?? 'N/A' }}
                                                               </span>
                        
                                                            
                        
                                                            </td>
                                                            
                                                            
                        
                                                         </tr>
                                                         <tr>
                                                             
                                                             <td>
                        
                                                             
                        
                                                               <label class="control-label"><b>Tyer 3</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">
                        
                                                              {{ $obfShow->tyre_no3 ?? 'N/A' }}
                                                               </span>
                        
                                                            
                        
                                                            </td>
                                                            <td>
                        
                                                             
                        
                                                               <label class="control-label"><b>Tyer 4</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">
                        
                                                              {{ $obfShow->tyre_no4 ?? 'N/A' }}
                                                               </span>
                        
                                                            
                        
                                                            </td>
                                                         </tr>
                                                         <tr>
                                                             <td>
                        
                                                             
                        
                                                               <label class="control-label"><b>Tyer 5</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">
                        
                                                              {{ $obfShow->tyre_no5 ?? 'N/A' }}
                                                               </span>
                        
                                                            
                        
                                                            </td>
                                                            <td>
                        
                                                             
                        
                                                               <label class="control-label"><b>Remarks</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $data->step3_remarks ?? 'N/A' }}</span>
                        
                                                            </td>
                                                         </tr>
                        
                                                      </tbody>
                        
                                                   </table>
                        
                                                </div>
                        
                                             </div>
                        
                                          </div>
                           </div>
                        </div>
                        <div class="col-lg-12 ">
                           <div class="col-md-12">
                           <hr style="border: 1px solid grey;">
                        
                                          <div class="row">
                        
                                             <div class="col-lg-12 ">
                        
                                                <div class="col-md-12">
                        
                                                   <h3> RTO Details</h3>
                        
                                                    <hr style="border:1px solid grey;">
                        
                                                   <!--<div class="row">-->
                        
                                                   <table style="width:100%;">
                        
                                                   
                        
                                                      <tbody>
                        
                                                         <tr>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>RTO Type</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">
                        
                                                                {{ucwords(str_replace('_', ' ', $obfShow->rto_type))}}
                        
                                                              <!--  @if($obfShow->rto_type == 'sales_rto') Sales RTO @endif
                        
                                                               @if($obfShow->rto_type == 'in_house') In house RTO @endif -->
                        
                                                               </span>
                        
                                                               <!-- <select name="rto_type" id="rto_type" class="form-control" readonly>
                        
                                                                  <option value="">Select RTO TYPE</option>
                        
                                                                  <option value="sales_rto" @if($obfShow->rto_type == 'sales_rto') selected @endif>Sales RTO</option>
                        
                                                                  <option value="in_house" @if($obfShow->rto_type == 'in_house') selected @endif>In house RTO</option>
                        
                                                                  </select>
                        
                                                                  <span class="kt-form__help error rto_type"></span> -->
                        
                                                            </td>
                        
                                                            <div class="vl5"></div>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Registration Date</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->registration_date ?? 'N/A' }}</span>
                        
                                                               <!-- <input type="date"  name="registration_date" id="registration_date" class="form-control" value="{{ $obfShow->registration_date ?? '' }}" readonly>
                        
                                                                  <span class="kt-form__help error registration_date"></span> -->
                        
                                                            </td>
                        
                                                         </tr>
                        
                                                         <tr>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Application Number</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->application_number ?? 'N/A' }}</span>
                        
                                                               <!-- <input type="text"  name="application_number" id="application_number" class="form-control" placeholder="Application Number" value="{{ $obfShow->application_number ?? '' }}" readonly>
                        
                                                                  <span class="kt-form__help error application_number"></span> -->
                        
                                                            </td>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Temporary Number</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->temporary_number ?? 'N/A' }}</span>
                        
                                                               <!-- <input type="text"  name="temporary_number" id="temporary_number" class="form-control" placeholder="Temporary Number" value="{{ $obfShow->temporary_number ?? '' }}" readonly>
                        
                                                                  <span class="kt-form__help error temporary_number"></span> -->
                        
                                                            </td>
                        
                                                         </tr>
                        
                                                         <tr>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Final amount</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->final_amount ?? 'N/A' }}</span>
                        
                                                               <!-- <input type="text"  name="final_amount" id="final_amount" class="form-control" placeholder="Final Amount" value="{{ $obfShow->final_amount ?? '' }}" readonly>
                        
                                                                  <span class="kt-form__help error final_amount"></span> -->
                        
                                                            </td>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Vehicle Number</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->vehicle_number ?? 'N/A' }}</span>
                        
                                                               <!-- <input type="text"  name="vehicle_number" id="vehicle_number" class="form-control" placeholder="Add Vehicle Number" value="{{ $obfShow->vehicle_number ?? '' }}" readonly>
                        
                                                                  <span class="kt-form__help error vehicle_number"></span> -->
                        
                                                            </td>
                        
                                                         </tr>
                        
                                                         <tr>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Status</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               @if($obfShow->rto_status == '1') Activate @endif
                        
                                                               @if($obfShow->rto_status != '1') Deactivate @endif
                        
                                                               <!-- <select name="rto_status" id="rto_status" class="form-control">
                        
                                                                  <option value="1" @if($obfShow->rto_status == '1') selected @endif>Activate</option>
                        
                                                                  <option value="0" @if($obfShow->rto_status != '1') selected @endif>Deactivate</option>
                        
                                                                  </select>
                        
                                                                  <span class="kt-form__help error rto_type"></span> -->
                        
                                                            </td>
                                                            <td>
                        
                                                               <label class="control-label"><b>Number Plate</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->number_plate ?? '' }}</span>
                                                            </td>
                        
                                                         </tr>
                                                         <tr>
                                                             <td>
                        
                                                               <label class="control-label"><b>Remarks</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->step4_remarks ?? 'N/A' }}</span>
                        
                                                            </td>
                                                         </tr>
                        
                                                      </tbody>
                        
                                                   </table>
                        
                                                </div>
                        
                                             </div>
                        
                                          </div>
                           </div>
                        </div>
                        <div class="col-lg-12 ">
                           <div class="col-md-12">
                           <hr style="border: 1px solid grey;">
                        
                                          <div class="row">
                        
                                             <div class="col-lg-12 ">
                        
                                                <div class="col-md-12">
                        
                                                   <h3> Fasttag Details</h3>
                        
                                                   <hr style="border:1px solid grey;">
                        
                                                   <!--<div class="row">-->
                        
                                                   <table style="width:100%;">
                        
                                                    
                        
                                                      <tbody>
                        
                                                         <tr>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Fasttag number</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->fasttag_number ?? 'N/A' }}</span>
                        
                                                               <!-- <input type="text"  name="fasttag_number" id="fasttag_number" class="form-control" placeholder="Fasttag number"value="{{ $obfShow->fasttag_number ?? '' }}" readonly>
                        
                                                                  <span class="kt-form__help error fasttag_number"></span> -->
                        
                                                            </td>
                        
                                                            <div class="vl6"></div>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Brand</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->fasttag_brand ?? 'N/A' }}</span>
                        
                                                               <!-- <input type="text"  name="fasttag_brand" id="fasttag_brand" class="form-control" placeholder="Brand" value="{{ $obfShow->fasttag_brand ?? '' }}" readonly>
                        
                                                                  <span class="kt-form__help error fasttag_brand"></span> -->
                        
                                                            </td>
                        
                                                         </tr>
                        
                                                         <tr>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Date of issue</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ date('d-m-Y',strtotime($obfShow->date_of_issue)) ?? 'N/A' }}</span>
                        
                                                               <!-- <input type="date"  name="date_of_issue" id="date_of_issue" class="form-control" value="{{ $obfShow->date_of_issue ?? '' }}" readonly>
                        
                                                                  <span class="kt-form__help error date_of_issue"></span> -->
                        
                                                            </td>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Amount</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->fasttag_amount ?? 'N/A' }}</span>
                        
                                                               <!-- <input type="number"  name="fasttag_amount" id="fasttag_amount" class="form-control" placeholder="Amount" value="{{ $obfShow->fasttag_amount ?? '' }}" readonly>
                        
                                                                  <span class="kt-form__help error fasttag_amount"></span> -->
                        
                                                            </td>
                        
                                                         </tr>
                        
                                                         <tr>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Opening stock</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->opening_stock ?? 'N/A' }}</span>
                        
                                                               <!-- <input type="number"  name="opening_stock" id="opening_stock" class="form-control" placeholder="Stock" value="{{ $obfShow->opening_stock ?? '' }}" readonly>
                        
                                                                  <span class="kt-form__help error opening_stock"></span> -->
                        
                                                            </td>
                        
                                                            <td>
                        
                                                               <label class="control-label"><b>Status</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               @if($obfShow->fasttag_status == '1') Activate @endif
                        
                                                               @if($obfShow->fasttag_status != '1') Deactivate @endif
                        
                                                               <!-- <select name="fasttag_status" id="fasttag_status" class="form-control">
                        
                                                                  <option value="1" @if($obfShow->fasttag_status == '1') selected @endif>Activate</option>
                        
                                                                  <option value="0" @if($obfShow->fasttag_status != '1') selected @endif>Deactivate</option>
                        
                                                                  </select>
                        
                                                                  <span class="kt-form__help error rto_type"></span> -->
                        
                                                            </td>
                        
                                                         </tr>
                                                         <tr>
                                                             <td>
                        
                                                               <label class="control-label"><b>Remarks</b></label>
                        
                                                            </td>
                        
                                                            <td> :</td>
                        
                                                            <td>
                        
                                                               <span class="form-label">{{ $obfShow->step5_remarks ?? 'N/A' }}</span>
                        
                                                            </td>
                                                         </tr>
                        
                                                      </tbody>
                        
                                                   </table>
                        
                                                   <!--</div>-->
                        
                                                </div>
                        
                                             </div>
                        
                                          </div>
                           </div>
                        </div>
                     <!--<div class="col-lg-12 ">-->
                     <!--   <div class="col-md-12">-->
                     <!--       <hr style="border:1px solid grey;margin-top:50px;">-->
                     <!--      <h3> Transfer Details</h3>-->
                     <!--      <hr style="border:1px solid grey;">-->
                           <!--<div class="row">-->
                     <!--      <table style="width:100%;">-->
                     <!--         <tbody>-->
                     <!--            <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>Vin Number</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->vin_number ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            <tr>-->
                     <!--               <td>-->
                     <!--                  <label class="control-label"><b>From Branch </b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td>-->
                     <!--                  <span class="form-label">{{ $transferShow->from_branch ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            <tr>-->
                     <!--               <td>-->
                     <!--                  <label class="control-label"><b>To Branch</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td>-->
                     <!--                  <span class="form-label">{{ $transferShow->to_branch ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            </tbody>-->
                     <!--      </table>-->
                           <!--</div>-->
                     <!--   </div>-->
                     <!--</div>-->
                     <!--<div class="col-lg-12 ">-->
                     <!--   <div class="col-md-12">-->
                     <!--       <hr style="border:1px solid grey;margin-top:50px;">-->
                     <!--      <h3> Obf Details</h3>-->
                     <!--      <hr style="border:1px solid grey;">-->
                           <!--<div class="row">-->
                     <!--      <table style="width:100%;">-->
                     <!--         <tbody>-->
                     <!--            <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>Vin Number</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->vin_number ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            <tr>-->
                     <!--               <td>-->
                     <!--                  <label class="control-label"><b>Customer Name </b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td>-->
                     <!--                  <span class="form-label">{{ $obfShow->customer_name ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            </tbody>-->
                     <!--      </table>-->
                           <!--</div>-->
                     <!--   </div>-->
                     <!--</div>-->
                     <!--<div class="col-lg-12 ">-->
                     <!--   <div class="col-md-12">-->
                     <!--       <hr style="border:1px solid grey;margin-top:50px;">-->
                     <!--      <h3> Obf Finance Deatils</h3>-->
                     <!--      <hr style="border:1px solid grey;">-->
                           <!--<div class="row">-->
                     <!--      <table style="width:100%;">-->
                     <!--         <tbody>-->
                     <!--            <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>Finance Name</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->finance_name ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>Finance Repo Rate</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->repo_rate ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--             <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>Finance Net Disbusment</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->net_disbusment ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>Finance Processing Fees</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->processing_fee ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>Finance Payout</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->payout ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>Finance Pay Booster</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->pay_booster ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>Finance Required</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->finance_required ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            </tbody>-->
                     <!--      </table>-->
                           <!--</div>-->
                     <!--   </div>-->
                     <!--</div>-->
                     <!-- <div class="col-lg-12 ">-->
                     <!--   <div class="col-md-12">-->
                     <!--       <hr style="border:1px solid grey;margin-top:50px;">-->
                     <!--      <h3> Obf Insurance Deatils</h3>-->
                     <!--      <hr style="border:1px solid grey;">-->
                           <!--<div class="row">-->
                     <!--      <table style="width:100%;">-->
                     <!--         <tbody>-->
                     <!--            <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>Insurance Name</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->insurance ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"></label>-->
                     <!--               </td>-->
                     <!--               <td></td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label"></span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            </tbody>-->
                     <!--      </table>-->
                           <!--</div>-->
                     <!--   </div>-->
                     <!--</div>-->

                     <!--<div class="col-lg-12 ">-->
                     <!--   <div class="col-md-12">-->
                     <!--       <hr style="border:1px solid grey;margin-top:50px;">-->
                     <!--      <h3> Obf RTO Deatils</h3>-->
                     <!--      <hr style="border:1px solid grey;">-->
                           <!--<div class="row">-->
                     <!--      <table style="width:100%;">-->
                     <!--         <tbody>-->
                     <!--            <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>RTO Type</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->rto_type ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>RTO Registration Date</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->registration_date ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--             <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>RTO Application Number</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->application_number ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>RTO Temporary Number</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->temporary_number ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>RTO Final Amount</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->final_amount ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>RTO Vehical Number</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->vehicle_number ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            </tbody>-->
                     <!--      </table>-->
                           <!--</div>-->
                     <!--   </div>-->
                     <!--</div>-->


                     <!--<div class="col-lg-12 " style="page-break-before: always;">-->
                     <!--   <div class="col-md-12">-->
                     <!--       <hr style="border:1px solid grey;margin-top:50px;">-->
                     <!--      <h3> Obf Fasttag Deatils</h3>-->
                     <!--      <hr style="border:1px solid grey;">-->
                           <!--<div class="row">-->
                     <!--      <table style="width:100%;">-->
                     <!--         <tbody>-->
                     <!--            <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>FastTag Number</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->fasttag_numbe ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>FastTag Name</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->fasttag_brand ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--             <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>FastTag Issue Date</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->date_of_issue ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>FastTag Amount</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->fasttag_amount ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>FastTag Opening Stock</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->opening_stock ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>FastTag Status</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->fasttag_status ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            </tbody>-->
                     <!--      </table>-->
                           <!--</div>-->
                     <!--   </div>-->
                     <!--</div>-->



                     <!--<div class="col-lg-12 ">-->
                     <!--   <div class="col-md-12">-->
                     <!--       <hr style="border:1px solid grey;margin-top:50px;">-->
                     <!--      <h3> Obf EW Details</h3>-->
                     <!--      <hr style="border:1px solid grey;">-->
                           <!--<div class="row">-->
                     <!--      <table style="width:100%;">-->
                     <!--         <tbody>-->
                     <!--            <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>Extend Warranty Plan</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->extand_warranties_years ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>Extend Warranty Amount</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->extand_warranties_amount ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            </tbody>-->
                     <!--      </table>-->
                           <!--</div>-->
                     <!--   </div>-->
                     <!--</div>-->
                     <!--<div class="col-lg-12 ">-->
                     <!--   <div class="col-md-12">-->
                     <!--       <hr style="border:1px solid grey;margin-top:50px;">-->
                     <!--      <h3> Obf MCP Details</h3>-->
                     <!--      <hr style="border:1px solid grey;">-->
                           <!--<div class="row">-->
                     <!--      <table style="width:100%;">-->
                     <!--         <tbody>-->
                     <!--            <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>MCP Name</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->carName ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>MCP Amount</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->mcpAmount ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            </tbody>-->
                     <!--      </table>-->
                           <!--</div>-->
                     <!--   </div>-->
                     <!--</div>-->
                     <!--<div class="col-lg-12 ">-->
                     <!--   <div class="col-md-12">-->
                     <!--       <hr style="border:1px solid grey;margin-top:50px;">-->
                     <!--      <h3> Obf RSA Details</h3>-->
                     <!--      <hr style="border:1px solid grey;">-->
                           <!--<div class="row">-->
                     <!--      <table style="width:100%;">-->
                     <!--         <tbody>-->
                     <!--            <tr>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>RSA Name</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->rsaname ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--               <td> -->
                     <!--                  <label class="control-label"><b>RSA Amount</b></label>-->
                     <!--               </td>-->
                     <!--               <td> : </td>-->
                     <!--               <td> -->
                     <!--                  <span class="form-label">{{ $obfShow->rsaamount ?? 'N/A' }}</span>-->
                     <!--               </td>-->
                     <!--            </tr>-->
                     <!--            </tbody>-->
                     <!--      </table>-->
                           <!--</div>-->
                     <!--   </div>-->
                     <!--</div>-->
                     <div class="col-lg-12 ">
                        <div class="col-md-12">
                            <hr style="border:1px solid grey;margin-top:50px;">
                           <h3> Reverse Calculation</h3>
                           <hr style="border:1px solid grey;">
                           <table class="make_deal_table" style="width:100%">
                                <tr class="light_gray">
                                    <td class="text-center"><b>{!! $data->car_model_name ?? '' !!}</b></td>
                                    <td class="text-center"><b>Purchase Price</b></td> 
                                    <td class="text-center"><b>Aging Days</b></td>
                                    <td class="text-center"><b>Remark</b></td>
                                    <td class="text-center"><b>Ex Showroom Price</b></td>
                                    <td class="text-center"><b>Deal</b></td>
                                </tr>
                                <tr>
                                    <td><b>{!! $data->car_varient_name ?? '' !!}</b></td>
                                    <td class="right-align purchase_price">{!! $data->purchase_price ?? '' !!}</td>
                                    <td class="right-align">{!! $data->aging_days ?? '' !!}</td>
                                    <td class="right-align">{!! $data->remark ?? '' !!}</td>
                                    <td class="right-align ex_showroom_price">{!! $price_list_name->basic ?? '' !!}</td>
                                    <td class="right-align">{{ $data->deal_amt ?? '' }}</td>
                                </tr>
                                <tr>
                                    <td><b>GST @ {!! $price_list_name->gst_percentage ?? '' !!}%</b></td>
                                    <td class="right-align">{{ $data->purchase_gst_tax_deal ?? '' }}</td>
                                    <td class="right-align gst_price" colspan="3">{!! $price_list_name->gst_amount ?? '' !!}</td>
                                    <td class="right-align">{{ $data->gst_tax_deal ?? '' }}</td>
                                </tr>
                                <tr>
                                    <td><b>Cess @ {!! $price_list_name->cess_percentage ?? '' !!}%</b></td>
                                    <td class="right-align cess_price" colspan="4">{!! $price_list_name->cess_amount ?? '' !!}</td>
                                    <td class="right-align">{{ $data->cess_tax_deal ?? '' }}</td>
                                </tr>
                                <tr>
                                    <td><b>TCS @ 1%</b></td>
                                    <td class="right-align tcs_price" colspan="4">{!! $data->tcs_tax_id ?? '' !!}</td>
                                    <td class="right-align">{{ $data->tcs_tax_deal ?? '' }}</td>
                                </tr>
                                <tr>
                                    <td><b>Municipal Tax</b></td>
                                    <td class="right-align municipal_price" colspan="4">{!! $data->municipal_tax_id ?? '' !!}</td>
                                    <td class="right-align">{{ $data->municipal_tax_deal ?? '' }}</td>
                                </tr>
                                <tr>
                                    <td><b>RTO</b></td>
                                    <td class="right-align rto_price" colspan="4">{!! $data->registration_tax_id ?? '' !!}</td>
                                    <td class="right-align">{{ $data->rto_deal ?? '' }}</td>
                                </tr>
                                <tr>
                                    <td><b>INSURANCE</b></td>
                                    <td class="right-align insurance_price" colspan="4">{!! $data->insurance_id ?? 0 !!}</td>
                                    <td class="right-align">{{ $data->insurance_deal ?? '' }}</td>
                                </tr>
                                <tr>
                                    <td><b>Fastag</b></td>
                                    <td class="right-align fastage_price" colspan="4">{!! $data->fasttag_amount_new ?? 0 !!}</td>
                                    <td class="right-align fastage_amt_deal">{!! $data->fasttag_amount_new ?? 0 !!}</td>
                                </tr>
                                <tr>
                                    <td><b>EW</b></td>
                                    <td class="right-align extended_warranty" colspan="4">{!! $data->extand_warranties_amount ?? 0!!}</td>
                                    <td class="right-align ew_deal">{!! $data->extand_warranties_amount ?? 0 !!}</td>
                                </tr>
                                <tr>
                                    <td><b>Accessories</b></td>
                                    <td class="right-align accessories_price" colspan="4">{!! $accessory_sum ?? 0 !!}</td>
                                    <td class="right-align accessories_deal">{!! $accessory_sum ?? 0 !!}</td>
                                </tr>
                                <tr>
                                    <td><b>RSA</b></td>
                                    <td class="right-align rsa_price" colspan="4">{!! $data->rsa_master_obf ?? 0 !!}</td>
                                    <td class="right-align rsa_deal">{!! $data->rsa_master_obf ?? 0 !!}</td>
                                </tr>
                                <tr>
                                    <td><b>Other</b></td>
                                    <td class="right-align other_price" colspan="4">{!! $data->other_accesssories_prise ?? 0 !!}</td>
                                    <td class="right-align other_deal">{!! $data->other_accesssories_prise ?? 0 !!}</td>
                                </tr>
                                <tr>
                                    <td colspan="6"> </td>
                                </tr>
                                <tr class="light_gray">
                                    @php
                                        $totalExShowroom = ($price_list_name->basic ?? 0)  + ($price_list_name->gst_amount ?? 0) + ($price_list_name->cess_amount ?? 0) + 
                                            ($data->tcs_tax_id ?? 0) + ($data->municipal_tax_id ?? 0) + ($data->registration_tax_id ?? 0) +
                                            ($data->insurance_id ?? 0) + ($data->fasttag_amount_new ?? 0) + ($data->extand_warranties_amount ?? 0) +
                                            ($accessory_sum ?? 0) + ($data->rsa_master_obf ?? 0) + ($data->other_accesssories_prise ?? 0);
                                        
                                        $totalDeal = ($data->deal_amt ?? 0) + ($data->gst_tax_deal ?? 0) + ($data->cess_tax_deal ?? 0) +
                                            ($data->tcs_tax_deal ?? 0) + ($data->municipal_tax_deal ?? 0) + ($data->rto_deal ?? 0) +
                                            ($data->insurance_deal ?? 0) + ($data->fasttag_amount_new ?? 0) + ($data->extand_warranties_amount ?? 0) +
                                            ($accessory_sum ?? 0) + ($data->rsa_master_obf ?? 0) + ($data->other_accesssories_prise ?? 0);
                                    @endphp
                            
                                    <td><b>Total On Road Price</b></td>
                                    <td class="right-align on_road_price" colspan="4"><b>{{ $totalExShowroom ?? '' }}</b></td>
                                    <td class="right-align on_road_price_deal"><b>{{ $totalDeal ?? '' }}</b></td>
                                </tr>
                            </table>
                        </div>
                     </div>
                  </div>
               </form>

            </div>
         </div>
      </div>
   </div>
</div>
</div>

@endsection

@section('scripts')
    <script>
        function printDiv(divId) {
            // Get the content of the div
            var content = document.getElementById(divId).innerHTML;
            
            // Open a new window
            var printWindow = window.open('', '', 'height=600,width=800');
            
            // Get all stylesheets from the current document
            var stylesheets = document.querySelectorAll('link[rel="stylesheet"], style');

            // Start writing HTML
            printWindow.document.write('<html><head><title>Print Content</title>');

            // Append existing styles
            stylesheets.forEach(function(style) {
                if (style.tagName === 'LINK') {
                    printWindow.document.write('<link rel="stylesheet" href="' + style.href + '" type="text/css">');
                } else {
                    printWindow.document.write('<style>' + style.innerHTML + '</style>');
                }
            });

            printWindow.document.write('</head><body>');
            printWindow.document.write(content);
            printWindow.document.write('</body></html>');

            // Close the document to ensure styles are applied
            printWindow.document.close();

            // Wait for the content to load before printing
            printWindow.onload = function () {
                printWindow.print();
                printWindow.close();
            };
        }
    </script>
@endsection