<?php $__env->startSection('content'); ?>
<link rel="stylesheet" href="<?php echo e(url('assets/timepicki/timepicki.css')); ?>">
<link rel="stylesheet" href="<?php echo e(url('assets/css/TimeSelect.css')); ?>">
<style>
   label.error{
      color:red;
   }
   #error_status{
      color:red;
   }
   .specifications p {
      font-size: 15px;
      font-weight: 500;
      text-align: justify;
      line-height: 32px;
   }

   .d-flex.f2.justify-content-between a, .compalintBox .justify-content-between .btns.common-btn, .compalintBox .card  .justify-content-between span.view-msg {
      padding: 8px 10px;
      font-size: 13px;
      font-weight: 600;
      height: 34px;
      margin-right: 3px;
      margin-top: 0;
   }

   .user-rating {
      direction: rtl;
      font-size: 20px;
      unicode-bidi: bidi-override;
      padding: 10px 30px;
      display: inline-block;
   }
   .user-rating input {
      opacity: 0;
      position: relative;
      left: -15px;
      z-index: 2;
      cursor: pointer;
   }
   .user-rating span.star:before {
      color: #777777;
      content:"ï€†";
      /*padding-right: 5px;*/
   }
   .user-rating span.star {
      display: inline-block;
      font-family: FontAwesome;
      font-style: normal;
      font-weight: normal;
      position: relative;
      z-index: 1;
   }
   .user-rating span {
      margin-left: -15px;
   }
   .user-rating span.star:before {
      color: #777777;
      content:"\f006";
      /*padding-right: 5px;*/
   }
   .user-rating input:hover + span.star:before, .user-rating input:hover + span.star ~ span.star:before, .user-rating input:checked + span.star:before, .user-rating input:checked + span.star ~ span.star:before {
      color: #ffd100;
      content:"\f005";
   }

   .selected-rating{
      color: #ffd100;
      font-weight: bold;
      font-size: 3em;
   }

   label.error{
      color:red;
   }
   .user i:before {
      display: inline-block;
      font: normal normal normal 14px/1 FontAwesome;
      font-size: inherit;
      text-rendering: auto;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      content: "\f2c0";
   }

   .btnAlign{ display: flex; width: 100%; justify-content: space-between; }

   .quote-order.spacePadd{ padding: 5px 0; }

   span.Collon {  margin: 0px 4px; }
   
   .serviceBG{
      border-top: 1px solid #ddd;
      margin: 10px 0 0 0;
   }
   #assignserviceengg {
      float: left;
      width: 100%;
   }

   #sendquotation {  width: 100%; }

   #sendquotation .btn-primary {
      color: #fff;
      background-color: #0498d5;
      border-color: #0498d5;
      font-size: 15px;
      padding: 7px 25px;
   }
   sup{
      color:red;
   }

 .pro-des {
    display: flex;
    flex-wrap: wrap;
}  
    label.Tittle{
        font-size: 14px;
    font-weight: 600;
    min-width: 276px !important;
    }
    .right-panel {
    width: 100%;
}
    
  .right-panel.main-lft {
    height: 100% !important;
}  
 .right-panel.mb-2 {
    margin-bottom: 3px !important;
}   
 h6.asdf.quote-status-hd {
    border-bottom: 0px;
}   
    
 .updated-img img {
    width: 276px !important;
    object-fit: cover !important;
}   
  .right-panel.main-lft {
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}  
 .right-panel.main-lft span.Tittle {
    height: 34px !important;
    margin-bottom: 3px;
}  
  .green-button .custom-dr {
    flex-direction: row !important;
}
   .green-button.custom-dr  .row.w-100.werxzs {
    order: 2;
}
      .green-button.custom-dr  .pro-des {
    justify-content: flex-end !important;
}
</style>
<div class="common-content">
<div class="page-content">
   <div class="page-heading">
      <div class="headings">
         <h6>View Complaint</h6>
      </div>
   </div>
   <div id="accordion" style="display: block;  width: 100%;margin: 0 0 10px;">
      <input name="_token" type="hidden" id="token_vendor" value="<?php echo e(csrf_token()); ?>">
      <input  type="hidden" class="form-control"  id="complaint_id" name="complaint_id" value="<?php echo e($complaintdetails['id']); ?>" >
      <input  type="hidden" class="form-control"  id="product_type" name="product_type" value="<?php echo e($complaintdetails['type']); ?>" >
      <input  type="hidden" class="form-control"  id="reg_sold_id" name="reg_sold_id" value="<?php echo e($complaintdetails['register_sold']); ?>" >
      <input  type="hidden" class="form-control"  id="buyer_id" name="buyer_id" value="<?php echo e($complaintdetails['buyer_id']); ?>" >
      <input  type="hidden" class="form-control"  id="department_id" name="department_id" value="<?php echo e($complaintdetails['department_id']); ?>" >
      <input  type="hidden" class="form-control"  id="vendor_id" name="vendor_id" value="<?php echo e($complaintdetails['complaint_user_id']); ?>" >
               <?php if($complaintdetails['type']=='approve'): ?>
                  <input  type="hidden" class="form-control"  id="product_id" name="product_id" value="<?php echo e($complaintdetails['productid']); ?>" >
               <?php else: ?>
                  <input  type="hidden" class="form-control"  id="product_id" name="product_id" value="<?php echo e($complaintdetails['existing_product_id']); ?>" >
               <?php endif; ?>
               <?php
               $res  			= App\Helpers\CustomHelper::ratingaveragecomplaint($complaintdetails['product_id'],$complaintdetails['id']);
               ?>
         
   <div class="boxings card">
       <div class="card-header">
          <h6 class="card-link" data-toggle="collapse" href="#collapseTwo">VIEW COMPLAINT</h6>
       </div>
       <div class="bxNew collapse show" id="collapseTwo" data-parent="#accordion">
           <div class="product-order quote-order spacePadd wraper">
        
               <div class="pro-des view-comp" style="padding: 0;">
                  <h6 style=" margin: 0px 0 7px;">Product Details</h6>

                  <?php
                  $current_date 	      = date('d-m-Y');
                  $product_warranty    = $complaintdetails['warrentysold'];
                  ?>
                
                      <?php if($complaintdetails['type']=='approve'): ?>
                         <?php
                         $pname  			= App\Helpers\CustomHelper::product_name($complaintdetails['productid']);
                         ?>
                         
                         <?php
                         $pdetails  			= App\Helpers\CustomHelper::vendorproduct_details($complaintdetails['productid']);
                         $modelno 			= $pdetails->product_code;
                         ?>
                         
                       <?php else: ?>
                          <?php
                            $pname  			= App\Helpers\CustomHelper::product_existing_name($complaintdetails['existing_product_id']);
                           ?>
                           <?php
                           $modelno 			= $complaintdetails['product_code_existing'];
                          ?>
                       <?php endif; ?>
                         
                     <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;">
                        Model No </label>  <span><?php echo e($modelno); ?></span>
                     </p>

                     <?php if($complaintdetails['product_serial_no']!=""): ?>
                     <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;">
                        Serial Number </label>  <span><?php echo e($complaintdetails['product_serial_no']); ?></span>
                     </p>
                     <?php endif; ?>
                     <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;">
                        Additional Information </label>  <span><?php echo e($complaintdetails['additional_info']); ?></span>
                     </p>
                     <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;">
                        Product Discard Date </label>  <span><?php echo e($complaintdetails['product_discard_years']); ?></span>
                     </p>
                     <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;">
                        Validation Date </label>  <span><?php echo e($complaintdetails['validation_date']); ?></span>
                     </p>
                     
                     <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;">
                        Product Warranty Date </label>  <span><?php echo e($complaintdetails['productwarrenty']); ?></span>
                        <?php if(strtotime($product_warranty) < strtotime($current_date)): ?>
                         <span style="color:red; font-weight:bold; font-size:15px;"> Out of warranty</span>
                        <?php endif; ?>
                     </p>
                     <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;">
                        Invoice Number </label>  <span><?php echo e($complaintdetails['invoice_number']); ?></span>
                     </p>
                     
                     <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;">
                        Preventive Maintenance Frequency </label>  <span><?php echo e($complaintdetails['preventive_maintenance']); ?></span>
                     </p>
                     <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;">
                        Criticality Rating of the Product </label>  <span><?php echo e($complaintdetails['current_value']); ?></span>
                     </p>

                    <?php if($complaintdetails['complaint_type']!='inspection_request'): ?>
                     <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;">
                        Department Name </label><span><?php echo e($complaintdetails['departmentname']); ?></span>
                     </p>
                    <?php endif; ?>

                     <?php if($complaintdetails['govmt_permission']==1): ?>
                        <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;">
                           Registration Document </label>  <span><?php echo e($complaintdetails['document']); ?></span><Span class="Value"> <a target="_blank" class="eye" href="<?php echo e(url('uploads/document/'.$complaintdetails['document'])); ?>"><i class="fa fa-file" aria-hidden="true"></i> View</a></Span>
                        </p>

                        <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;">
                           Registration Renewal Date </label>  <span><?php echo e($complaintdetails['renewal_date']); ?></span>
                        </p>
                     <?php endif; ?>

                     <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;"> 
                        Customer Name </label>  <span><?php echo e(ucfirst($complaintdetails['customername'])); ?></span>
                     </p>

                     <?php if(($complaintdetails['complaint_type']=='validation_date')||($complaintdetails['complaint_type']=='amc_cmc_rene')||($complaintdetails['complaint_type']=='amc_cmc_activation')): ?>

                                 <h6 style=" margin: 0px 0 7px;">Buyer Contact  Details</h6>
                                 <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;"> 
                                    Name </label>  <span><?php echo e(ucfirst($complaintdetails['name'])); ?></span>
                                 </p>
                                 <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;"> 
                                    Phone Number </label>  <span><?php echo e(ucfirst($complaintdetails['phone'])); ?></span>
                                 </p>
                                 <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;"><label style="margin-bottom: 0;min-width: 195px;"> 
                                    Email Id </label>  <span><?php echo e(ucfirst($complaintdetails['email'])); ?></span>
                                 </p>
                         <?php endif; ?>                   
                

          </div>
       </div>
       
       <div class="pro-des view-comp specifications wraper" style="padding:10px 0;">
          <h6 style=" margin: 0px 0 7px;">Complaint Details</h6>
          <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;line-height: inherit;">
             <label style="margin-bottom: 0;min-width: 195px;">Complaint</label>  <span><?php echo e(ucfirst($complaintdetails['complaint'])); ?></span> <?php if(($complaintdetails['quotation_request'] ==2)): ?> <span style="color:orange;font-weight:bold;"> The service technician is unable to resolve this complaint; they require parts to fix this problem</span> <?php endif; ?>
          </p>

               <?php if($complaintdetails['text_type']=='voice'): ?>
               <audio controls>
               <source src="https://www.meddbot.com/uploads/voice/<?php echo e($complaintdetails['complaint']); ?>" type="audio/mpeg">
                  Audio tag is not supported in this browser.
               </audio>
               <?php endif; ?>
          <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;line-height: inherit;">
             <label style="margin-bottom: 0;min-width: 195px;">Complaint Id</label>  <span><?php echo e(ucfirst($complaintdetails['id'])); ?></span>
          </p>

      <?php if($complaintdetails['quotation_request']==2): ?>
          <h6 style=" margin: 0px 0 7px;">Previous Complaint Details</h6>
          <?php
          $olddetails  			= App\Helpers\CustomHelper::oldcomplint($complaintdetails['oldcomplaint_id']);

          ?>

          <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;line-height: inherit;">
            <label style="margin-bottom: 0;min-width: 195px;">Complaint id</label>  <span><?php echo e($complaintdetails['oldcomplaint_id']); ?></span>
         </p>

         <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;line-height: inherit;">
            <label style="margin-bottom: 0;min-width: 195px;">Complaint</label>  <span><?php echo e(ucfirst($olddetails['complaintdetails']['complaint'])); ?></span>
         </p>
         <p style="margin: 0 0 3px;font-weight: 500;color: #222;font-size: 15px;line-height: inherit;">
            <label style="margin-bottom: 0;min-width: 195px;">Complaint posted date</label>  <span><?php echo e(date('d-m-Y', strtotime($olddetails['complaintdetails']['date']))); ?></span>
         </p>

      <?php endif; ?>
      <!----basic info end--->

<!--charge details-->
      <?php if(strtotime($product_warranty) < strtotime($current_date)): ?>
             <?php if($servicecharge=='yes'): ?>
                                 <div class="right-panel">
                                       <span class="Tittle">Service Charge</span><span class="Collon">:</span>
                                       <span class="Value"><?php echo e($servicechargedetails['charge']+($servicechargedetails['charge']*($servicechargedetails['tax']/100))); ?> INR ( Tax <?php echo e($servicechargedetails['tax']); ?> %)</span>
                                 </div>
                                 <div class="right-panel">
                                    <span class="Tittle">Collect charge by service engineer?</span><span class="Collon">:</span>
                                    <span class="Value"><?php if($servicechargedetails['collect_yes_not']==1): ?> Yes <?php else: ?> No <?php endif; ?></span>
                              </div>
                                 <?php if($complaintdetails['quotation_request']!=1): ?>
                                    <div class="right-panel mb-2 doc-view">
                                          <span class="Tittle">Receipt</span><span class="Collon">:</span>
                                          <span class="Value"><a target="_blank" class="eye" href="<?php echo e(url('uploads/document/'.$complaintdetails['charge_doc'])); ?>"><i class="fa fa-file" aria-hidden="true"></i> View</a></span>
                                    </div>
                                 <?php endif; ?>
                                 <?php if($complaintdetails['update_doc']!=''): ?>
                                 <div class="right-panel main-lft">
                                 <span class="Tittle">Collected Service charge </span><span class="Collon">:</span>
                                 <div class="updated-img">
                                    <img id="myImg1"  src="<?php echo e(url('uploads/complaint/'.$complaintdetails['update_doc'])); ?>" style=" width: 144px; height: 127px; margin-bottom: 0px; margin-top: 0px; border: 3px solid #02bcb1;object-fit: fill;">
                                 </div>
                                 </div>
                                 <?php endif; ?>
             <?php endif; ?>
          <?php endif; ?>
 <!----charge details end--->
      </div>
<!---Sevice engg details start--->

<?php if(($complaintdetails['complaint_type']=='manual')||($complaintdetails['complaint_type']=='amc_cmc_rene')||($complaintdetails['complaint_type']=='validation_date')||($complaintdetails['complaint_type']=='amc_cmc_activation')||($complaintdetails['complaint_type']=='installation_date')||($complaintdetails['complaint_type']=='preventive_contract')||($complaintdetails['complaint_type']=='inspection_request')): ?>
<?php if(!empty($assigneddetails)): ?>
<?php if($complaintdetails['status'] ==15 || $complaintdetails['status'] ==16 || $complaintdetails['status'] ==17 || $complaintdetails['status'] ==12 || $complaintdetails['status'] ==13 || $complaintdetails['status'] ==8 || $complaintdetails['status'] ==9 ||$complaintdetails['status'] ==4 || $complaintdetails['status'] ==5|| $complaintdetails['status'] ==30): ?>
      <div class="pro-des view-comp   wraper serviceBG" >
               
         <h6 style="margin:0px 0 7px;font-size:18px;line-height: inherit;min-height: inherit;font-weight: 600;">Schedule</h6>
         
         <div class="wraper">
            <input name="_token" type="hidden" id="token_vendor" value="<?php echo e(csrf_token()); ?>">
            <span id="error_status"></span>
         
               
                  <div class="right-panel">
                        <span class="Tittle">Service Engg Name</span><span class="Collon">:</span>
                        <span class="Value">
                           <?php echo e(ucfirst($assigneddetails['first_name'].' '.$assigneddetails['last_name'])); ?>

                        </span>
                  </div>
                  <div class="right-panel">
                        <span class="Tittle">Date</span><span class="Collon">:</span><span class="Value"><?php echo e($assigneddetails['date']); ?></span>
                  </div>
                  <div class="right-panel">
                        <span class="Tittle">Time</span><span class="Collon">:</span>
                        <span class="Value"><?php echo e($assigneddetails['time']); ?></span>
                  </div>
            
         </div>
         </div>
   <?php endif; ?>
   <?php endif; ?> 
   <?php endif; ?>
<!---Sevice engg details end--->

<!----Rejected reason start--->

<?php if(($complaintdetails['complaint_type']=='manual')||($complaintdetails['complaint_type']=='amc_cmc_rene')||($complaintdetails['complaint_type']=='validation_date')||($complaintdetails['complaint_type']=='amc_cmc_activation')||($complaintdetails['complaint_type']=='installation_date')||($complaintdetails['complaint_type']=='preventive_contract')||($complaintdetails['complaint_type']=='inspection_request')): ?>

            <?php if($complaintdetails['reject_reason_type'] ==1): ?>

            <h6 style="margin:0px 0 7px;font-size:18px;line-height: inherit;min-height: inherit;font-weight: 600;">Reason for Rejection</h6>

            <div class="wraper">
                  <div class="right-panel">
                        
                        <p class="Value">
                           <?php echo e(ucfirst($complaintdetails['reject_reason'])); ?>

                        </p>
                  </div>
            </div>
            <?php endif; ?>

<?php endif; ?>

<!----Rejected reason end-->

<?php

$activate_status       = $complaintdetails['activate_status'];
$activate_val          = $complaintdetails['activate_val'];

$activated_enddate     = $complaintdetails['activated_enddate'];


?>


<!--Warrenty out start-->



<?php if(strtotime($product_warranty) < strtotime($current_date)): ?>

   <?php if(($activate_status ==2)&&($activate_val =='amc')&&(strtotime($activated_enddate) >= strtotime($current_date))): ?>

   <?php if($complaintdetails['quotation_request'] ==2): ?>


      
   <?php if((($complaintdetails['status'] ==17)||($complaintdetails['status'] ==14))): ?>
   <form method="POST" id="assignserviceengg" action="#">
      <?php echo csrf_field(); ?>
      <div class="row">
         <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
            <div class="form-inputs">
               <div class="form-group">
                  <label>ASSIGN SERVICE ENGINEER</label>
                  
         <select class="form-control selectmanufacturer" id="service_engg" name="service_engg">
            <option value="">Select</option>
            
            <?php $__currentLoopData = $servicengg; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $engg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

         
               <option value="<?php echo e($engg->id); ?>"><?php echo e(ucfirst($engg->first_name.' '.$engg->last_name)); ?></option>

            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
         
               </div>
            </div>
         </div>
         <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
            <div class="form-inputs">
               <div class="form-group">
                  <label>DATE</label>
                  <input  type="tax" class="form-control"  id="schedule_date" name="schedule_date" value="" >
               </div>
            </div>
         </div>
         <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
            <div class="form-inputs">
               <div class="form-group timeschedule">
                  <label>TIME</label>
                  <div class="clock">
                  <i class="far fa-clock"></i>
                  </div>
                  <input class="time_element form-control"  name="timepicker" 
         id="timepicker" />
               </div>
            </div>
         </div>
      
      </div>
      <input  type="hidden" type="hidden" name="complaint_relation" id="complaint_relation" value="<?php echo e($complaintdetails['complaint_relation']); ?>" />
            <div class="green-button custom-dr">
   <div class="row w-100 werxzs">
      <div class="col-lg-12 col-md-6 col-sm-12">
            <div class="green-button center-btn">
               <button style="float: left;margin: 9px 0 0 0;" class="product-submit">Schedule</button>
            </div>
         </div>
   </div>
   </form>

<?php endif; ?>

   <?php else: ?>
                     <?php if($complaintdetails['status'] ==0 || $complaintdetails['status'] ==14): ?>
                        
                        <form method="POST" id="assignserviceengg" action="#">
                              <?php echo csrf_field(); ?>
                              <div class="row">
                                 <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                    <div class="form-inputs">
                                       <div class="form-group">
                                          <label>ASSIGN SERVICE ENGINEER</label>
                                          
                                          <select class="form-control selectmanufacturer" id="service_engg" name="service_engg">
                                             <option value="">Select</option>
                                             
                                             <?php $__currentLoopData = $servicengg; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $engg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        
                                          
                                                <option value="<?php echo e($engg->id); ?>"><?php echo e(ucfirst($engg->first_name.' '.$engg->last_name)); ?></option>
                        
                                             <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                             </select>
                                 
                                       </div>
                                    </div>
                                 </div>
                                 <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                    <div class="form-inputs">
                                       <div class="form-group">
                                          <label>DATE</label>
                                          <input  type="tax" class="form-control"  id="schedule_date" name="schedule_date" value="" >
                                       </div>
                                    </div>
                                 </div>
                                 <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                    <div class="form-inputs">
                                       <div class="form-group timeschedule">
                                          <label>TIME</label>
                                          <div class="clock">
                                          <i class="far fa-clock"></i>
                                          </div>
                                          <input class="time_element form-control"  name="timepicker" 
                                 id="timepicker" />
                                       </div>
                                    </div>
                                 </div>
                              
                              </div>
                              <input  type="hidden" type="hidden" name="complaint_relation" id="complaint_relation" value="<?php echo e($complaintdetails['complaint_relation']); ?>" />
                                    <div class="green-button custom-dr">
                           <div class="row w-100 werxzs">
                              <div class="col-lg-12 col-md-6 col-sm-12">
                                    <div class="green-button center-btn">
                                       <button style="float: left;margin: 9px 0 0 0;" class="product-submit">Schedule</button>
                                    </div>
                                 </div>
                           </div>
                        </form>

                     <?php endif; ?>

             <?php endif; ?>


            <?php elseif(($activate_status ==2)&&($activate_val =='cmc')&&(strtotime($activated_enddate) >= strtotime($current_date))): ?> 

            <?php if($complaintdetails['status'] ==0 || $complaintdetails['status'] ==14): ?>

            <form method="POST" id="assignserviceengg" action="#">
               <?php echo csrf_field(); ?>
               <div class="row">
                  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                     <div class="form-inputs">
                        <div class="form-group">
                           <label>ASSIGN SERVICE ENGINEER </label>
                           
                           <select class="form-control selectmanufacturer" id="service_engg" name="service_engg">
                              <option value="">Select</option>
                              
                              <?php $__currentLoopData = $servicengg; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $engg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
         
                           
                                 <option value="<?php echo e($engg->id); ?>"><?php echo e(ucfirst($engg->first_name.' '.$engg->last_name)); ?></option>
         
                              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                              </select>
                  
                        </div>
                     </div>
                  </div>
                  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                     <div class="form-inputs">
                        <div class="form-group">
                           <label>DATE</label>
                           <input  type="tax" class="form-control"  id="schedule_date" name="schedule_date" value="" >
                        </div>
                     </div>
                  </div>
                  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                     <div class="form-inputs">
                        <div class="form-group timeschedule">
                           <label>TIME</label>
                           <div class="clock">
                           <i class="far fa-clock"></i>
                           </div>
                           <input class="time_element form-control"  name="timepicker" 
                  id="timepicker" />
                        </div>
                     </div>
                  </div>
               
               </div>
               <input  type="hidden" type="hidden" name="complaint_relation" id="complaint_relation" value="<?php echo e($complaintdetails['complaint_relation']); ?>" />
                     <div class="green-button custom-dr">
            <div class="row w-100 werxzs">
               <div class="col-lg-12 col-md-6 col-sm-12">
                     <div class="green-button center-btn">
                        <button style="float: left;margin: 9px 0 0 0;" class="product-submit">Schedule</button>
                     </div>
                  </div>
            </div>
         </form>

       <?php endif; ?>

   <?php else: ?>
 <!--outwarranty normal flow start-->

<?php if($complaintdetails['quotation_request']==2): ?>
<!--quotation req start-->


            <?php if((($complaintdetails['status'] ==17)||($complaintdetails['status'] ==14))): ?>
            <form method="POST" id="assignserviceengg" action="#">
               <?php echo csrf_field(); ?>
               <div class="row">
                  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                     <div class="form-inputs">
                        <div class="form-group">
                           <label>ASSIGN SERVICE ENGINEER </label>
                           
                  <select class="form-control selectmanufacturer" id="service_engg" name="service_engg">
                     <option value="">Select</option>
                     
                     <?php $__currentLoopData = $servicengg; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $engg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                  
                        <option value="<?php echo e($engg->id); ?>"><?php echo e(ucfirst($engg->first_name.' '.$engg->last_name)); ?></option>

                     <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                     </select>
                  
                        </div>
                     </div>
                  </div>
                  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                     <div class="form-inputs">
                        <div class="form-group">
                           <label>DATE</label>
                           <input  type="tax" class="form-control"  id="schedule_date" name="schedule_date" value="" >
                        </div>
                     </div>
                  </div>
                  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                     <div class="form-inputs">
                        <div class="form-group timeschedule">
                           <label>TIME</label>
                           <div class="clock">
                           <i class="far fa-clock"></i>
                           </div>
                           <input class="time_element form-control"  name="timepicker" 
                  id="timepicker" />
                        </div>
                     </div>
                  </div>
               
               </div>
               <input  type="hidden" type="hidden" name="complaint_relation" id="complaint_relation" value="<?php echo e($complaintdetails['complaint_relation']); ?>" />
                     <div class="green-button custom-dr">
            <div class="row w-100 werxzs">
               <div class="col-lg-12 col-md-6 col-sm-12">
                     <div class="green-button center-btn">
                        <button style="float: left;margin: 9px 0 0 0;" class="product-submit">Schedule</button>
                     </div>
                  </div>
            </div>
            </form>

      <?php endif; ?>

<!--quotation req end-->
<?php else: ?>

<?php if($complaintdetails['status'] ==0 || $complaintdetails['status'] ==2): ?>       
   <div class="wraper">
     
      <span id="error_status"></span>
      <form method="POST" id="addservice_charge" action="<?php echo e(url('vendors/addService_charge')); ?>" enctype='multipart/form-data'>
         <?php echo csrf_field(); ?>
         <div class="row">
            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
            <div class="form-inputs" style="margin: 0 0 10px;">
                  <div class="form-group">
                     <label style="font-size: 15px;color: #222;font-weight: 500;">PRICE(INR)<sup>*</sup></label>
                     <?php if($servicecharge=='yes'): ?>
                        <input  type="number" class="form-control"  id="price" name="price" value="<?php echo e($servicechargedetails['charge']); ?>" >
                     <?php else: ?>
                        <input  type="number" class="form-control"  id="price" name="price" value="" >
                     <?php endif; ?>
              
                  </div>
               </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
               <div class="form-inputs" style="margin: 0 0 10px;">
                  <div class="form-group">
                  <label style="font-size: 15px;color: #222;font-weight: 500;">TAX%<sup>*</sup></label>
                     <?php if($servicecharge=='yes'): ?>
                              <input  type="tax" class="form-control"  id="tax" name="tax" value="<?php echo e($servicechargedetails['tax']); ?>" >
                     <?php else: ?>
                        <input  type="tax" class="form-control"  id="tax" name="tax" value="12" >
                        
                     <?php endif; ?>
                        
                  </div>
               </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
               <div class="form-inputs" style="margin: 0 0 10px;">
                  <div class="form-group">
                  <label style="font-size: 15px;color: #222;font-weight: 500;">Attach  Receipt<sup>*</sup></label>
                     
                        <input  type="file" class="form-control"  id="chargedoc" name="chargedoc"  >
                    </div>
               </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
               <div class="form-inputs" style="margin: 0 0 10px;">
                  <div class="form-group">
                  <label style="font-size: 15px;color: #222;font-weight: 500;">Do you want to collect the charge by the  service engineer?</label>
                      <div class="radio-main-cu">
                          <div class="d-flex mai"> <span>Yes </span><input  type="radio" class="form-control"  id="collect_charge" name="collect_charge" checked value="1"></div>
                          <div class="d-flex mai"><span>No</span> <input  type="radio" class="form-control"  id="collect_charge1" name="collect_charge" value="0"></div>
                      </div>
                 <input  type="hidden" class="form-control"  id="buyer_id_charge" name="buyer_id_charge" value="<?php echo e($complaintdetails['buyer_id']); ?>">
                 <input  type="hidden" class="form-control"  id="complaint_id_charge" name="complaint_id_charge" value="<?php echo e($complaintdetails['id']); ?>">
                  
                 <?php if($complaintdetails['type']=='approve'): ?>
                  <input  type="hidden" class="form-control"  id="product_id_charge" name="product_id_charge" value="<?php echo e($complaintdetails['productid']); ?>" >
                  <?php else: ?>
                  <input  type="hidden" class="form-control"  id="product_id_charge" name="product_id_charge" value="<?php echo e($complaintdetails['existing_product_id']); ?>" >
                  <?php endif; ?>
                  <input  type="hidden" class="form-control"  id="product_type_charge" name="product_type_charge"  value="<?php echo e($complaintdetails['type']); ?>" >
                 <input  type="hidden" class="form-control"  id="reg_sold_id_charge" name="reg_sold_id_charge" value="<?php echo e($complaintdetails['register_sold']); ?>">
                  
               </div>
               </div>
            </div>

            <div class="col-lg-12 col-md-6 col-sm-12">
               <div class="green-button">
                  <button type="submit" class="btn btn-primary" id="regnew">
                     <?php echo e(__('Send Charges')); ?>

                  </button>
                  
               </div>
            </div>
         </div>
      </form>
   </div>
   <?php endif; ?>

   <?php if(($complaintdetails['status'] ==1)||($complaintdetails['status'] ==14)): ?>

   <form method="POST" id="assignserviceengg" action="#">
      <?php echo csrf_field(); ?>
      <div class="row">
         <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
            <div class="form-inputs">
               <div class="form-group">
                  <label>ASSIGN SERVICE ENGINEER </label>
                  
         <select class="form-control selectmanufacturer" id="service_engg" name="service_engg">
            <option value="">Select</option>
            
            <?php $__currentLoopData = $servicengg; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $engg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
               <option value="<?php echo e($engg->id); ?>"><?php echo e(ucfirst($engg->first_name.' '.$engg->last_name)); ?></option>

            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
         
               </div>
            </div>
         </div>
         <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
            <div class="form-inputs">
               <div class="form-group">
                  <label>DATE</label>
                  <input  type="tax" class="form-control"  id="schedule_date" name="schedule_date" value="" >
               </div>
            </div>
         </div>
         <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
            <div class="form-inputs">
               <div class="form-group timeschedule">
                  <label>TIME</label>
                   <div class="time-picker-wrapper">
                        <input type="text" class="form-control time_element" id="timePicker" placeholder="Select Time">
                        <span class="clock-icon">&#128339;</span> <!-- Clock emoji as icon -->
                    </div>
                   
<!--
                  <div class="clock">
                  <i class="far fa-clock"></i>
                  </div>
                  <input class="time_element form-control"  name="timepicker" 
         id="timepicker" />
-->
               </div>
            </div>
         </div>
      
      </div>
   <div class="row">
      <div class="col-lg-12 col-md-6 col-sm-12">
         <input  type="hidden" type="hidden" name="complaint_relation" id="complaint_relation" value="<?php echo e($complaintdetails['complaint_relation']); ?>" />
            <div class="green-button">
               <button style="float: left;margin: 9px 0 0 0;" class="product-submit">Schedule</button>
            </div>
         </div>
   </div>
</form>
<?php endif; ?>

  <?php endif; ?>   
<?php endif; ?>
   <!--normal end-->
<!--Warrenty out end-->
<?php else: ?>
<!--Inwarranty start-->
<?php if($complaintdetails['status'] ==0 || $complaintdetails['status'] ==14): ?>

<form method="POST" id="assignserviceengg" action="#">
   <?php echo csrf_field(); ?>
   <div class="row">
      <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
         <div class="form-inputs">
            <div class="form-group">
               <label>ASSIGN SERVICE ENGINEER </label>
               
               <select class="form-control selectmanufacturer" id="service_engg" name="service_engg">
                  <option value="">Select</option>
                  
                  <?php $__currentLoopData = $servicengg; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $engg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

               
                     <option value="<?php echo e($engg->id); ?>"><?php echo e(ucfirst($engg->first_name.' '.$engg->last_name)); ?></option>

                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                  </select>
      
            </div>
         </div>
      </div>
      <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
         <div class="form-inputs">
            <div class="form-group">
               <label>DATE</label>
               <input  type="tax" class="form-control"  id="schedule_date" name="schedule_date" value="" >
            </div>
         </div>
      </div>
      <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
         <div class="form-inputs">
            <div class="form-group timeschedule">
               <label>TIME</label>
               <div class="clock">
               <i class="far fa-clock"></i>
               </div>
               <input  class="form-control"  name="timepicker" 
      id="timepicker" />
            </div>
         </div>
      </div>
   
   </div>
   <input  type="hidden" type="hidden" name="complaint_relation" id="complaint_relation" value="<?php echo e($complaintdetails['complaint_relation']); ?>" />
         <div class="green-button custom-dr minsz">
<div class="row w-100 werxzs">
   <div class="col-lg-12 col-md-6 col-sm-12">

         <div class="buttons-comp d-flex align-items-center mb-2 justify-content-center">
         
            <button class="green-button newGreenbtn mr-2">Schedule</button>
         </div>
      </div>
</div>
</form>

<?php endif; ?>

<?php endif; ?>

<!----information from upadtion--->

<?php if(($complaintdetails['complaint_type']=='manual')||($complaintdetails['complaint_type']=='amc_cmc_rene')||($complaintdetails['complaint_type']=='validation_date')||($complaintdetails['complaint_type']=='amc_cmc_activation')||($complaintdetails['complaint_type']=='installation_date')||($complaintdetails['complaint_type']=='preventive_contract')||($complaintdetails['complaint_type']=='inspection_request')): ?>

                     <?php if($cupdates==1): ?>
                           
                           <div class="pro-des  wraper serviceBG">
                              <h6 style="margin:15px 0 10px;font-size:18px;line-height: inherit;min-height: inherit;font-weight: 600;">Updates</h6>
                           
                           <p class="update-rs" ><?php echo e($complaintupdates['description']); ?></p></br>
                           
                              <?php if($complaintupdates['filename'] !=''): ?>
                                 <div class="updated-img my-2">
                                       <img id="myImg"  src="<?php echo e(url('uploads/complaint')); ?>/<?php echo e($complaintupdates['filename']); ?>" style=" width: 144px; height: 127px; margin-bottom: 0px; margin-top: 0px; border: 3px solid #02bcb1;object-fit: fill;">
                                 </div>
                              <?php endif; ?>
                     </div>

                           <div id="myModal" class="modal-img">
                              <span class="close">&times;</span>
                              <img class="modal-content-img" id="img01">
                              <div id="caption"></div>
                           </div>				
                        
                        <?php endif; ?>


                  <?php if($complaintdetails['status'] ==7): ?>
                                       <?php if($complaintdetails['quotation_request']!=1): ?>
                                          
                                          </br><div class="right-panel"><span class="Tittle">Completed on</span><span class="Collon">:</span><span class="Value"><?php echo e(date('d-m-Y', strtotime($complaintdetails['completed_date']))); ?></span></div>
                                       <?php endif; ?>
                  <?php endif; ?>

               <div class="pro-des specifications wraper " style="padding:-4px 5px 15px;">
                  
                  <div class="wraper" style="margin-left: -23px;">
                  <?php if($complaintdetails['status'] ==7): ?>
                     <div class="right-panel">
                           <span class="Tittle">Closed on</span><span class="Collon">:</span><span class="Value"><?php echo e(date('d-m-Y', strtotime($complaintdetails['closed_date']))); ?></span>
                     </div>
               <?php endif; ?>
              
               <?php if(($complaintdetails['status'] ==6)): ?>
               <span class="Tittle">Observation period</span><span class="Collon">:</span><span class="Value"><?php echo e(date('d-m-Y', strtotime($complaintdetails['underobservation_from']))); ?><?php echo e('  '. 'to' .'  '); ?><?php echo e(date('d-m-Y', strtotime($complaintdetails['underobservation_to']))); ?></span>
         
               <?php endif; ?>
                     
               </div>
               </div>

            <?php if($res['count_ratingstatus']==1): ?>
               <h6 class="asdf quote-status-hd" >Customer rating for the service</h6>           
                                    
                                    <div class="col-md-12 defaultz">
                                                <p class="Product-id wraper">
                                                      <span class="quote-status-hd">Professionalism</span> : 
                                          <span class="user-rating" disabled>
                                             <input type="radio" name="rating1" <?php if($complaintdetails['rate_professionalism']==5){echo"checked";}?>  value="5" disabled><span class="star"></span>
                                             <input type="radio" name="rating1" <?php if($complaintdetails['rate_professionalism']==4){echo"checked";}?> value="4" disabled><span class="star"></span>
                                             <input type="radio" name="rating1" <?php if($complaintdetails['rate_professionalism']==3){echo"checked";}?> value="3" disabled><span class="star"></span>
                                             <input type="radio" name="rating1" <?php if($complaintdetails['rate_professionalism']==2){echo"checked";}?> value="2" disabled><span class="star"></span>
                                             <input type="radio" name="rating1" <?php if($complaintdetails['rate_professionalism']==1){echo"checked";}?>  value="1" disabled><span class="star"></span>
                                          </span>
                                                      
                                                </p>
                                             </div>
                                    
                                    <div class="col-md-12 defaultz">
                                                <p class="Product-id wraper">
                                                      <span class="quote-status-hd">Knowledge of product</span> : 
                                          <span class="user-rating" disabled>
                                             <input type="radio" name="rating2" <?php if($complaintdetails['rate_knowledge']==5){echo"checked";}?>  value="5" disabled><span class="star"></span>
                                             <input type="radio" name="rating2" <?php if($complaintdetails['rate_knowledge']==4){echo"checked";}?> value="4" disabled><span class="star"></span>
                                             <input type="radio" name="rating2" <?php if($complaintdetails['rate_knowledge']==3){echo"checked";}?>  value="3" disabled><span class="star"></span>
                                             <input type="radio" name="rating2" <?php if($complaintdetails['rate_knowledge']==2){echo"checked";}?> value="2" disabled><span class="star"></span>
                                             <input type="radio" name="rating2" <?php if($complaintdetails['rate_knowledge']==1){echo"checked";}?>  value="1" disabled><span class="star"></span>
                                          </span>
                                                      
                                                </p>
                                             </div>
                                    
                                    <div class="col-md-12 defaultz">
                                                <p class="Product-id wraper">
                                                      <span class="quote-status-hd">Timely attending complaint</span> : 
                                          <span class="user-rating" disabled>
                                             <input type="radio" name="rating3" <?php if($complaintdetails['rate_timely']==5){echo"checked";}?>  value="5" disabled><span class="star"></span>
                                             <input type="radio" name="rating3"  <?php if($complaintdetails['rate_timely']==4){echo"checked";}?> value="4" disabled><span class="star"></span>
                                             <input type="radio" name="rating3"  <?php if($complaintdetails['rate_timely']==3){echo"checked";}?> value="3" disabled><span class="star"></span>
                                             <input type="radio" name="rating3"  <?php if($complaintdetails['rate_timely']==2){echo"checked";}?> value="2" disabled><span class="star"></span>
                                             <input type="radio" name="rating3"  <?php if($complaintdetails['rate_timely']==1){echo"checked";}?> value="1" disabled><span class="star"></span>
                                          </span>
                                                      
                                                </p>
                                             </div>
                                    <div class="col-md-12 defaultz">
                                                <p class="Product-id wraper">
                                                      <span class="quote-status-hd">Overall satisfaction</span> : 
                                                      <span class="user-rating" disabled>
                                                         <input type="radio" name="rating4" <?php if($complaintdetails['rate_overall']==5){echo"checked";}?>  value="5" disabled><span class="star"></span>
                                                         <input type="radio" name="rating4" <?php if($complaintdetails['rate_overall']==4){echo"checked";}?> value="4" disabled><span class="star"></span>
                                                         <input type="radio" name="rating4" <?php if($complaintdetails['rate_overall']==3){echo"checked";}?> value="3" disabled><span class="star"></span>
                                                         <input type="radio" name="rating4" <?php if($complaintdetails['rate_overall']==2){echo"checked";}?> value="2" disabled><span class="star"></span>
                                                         <input type="radio" name="rating4" <?php if($complaintdetails['rate_overall']==1){echo"checked";}?> value="1" disabled><span class="star"></span>
                                                      </span>
                                                      
                                                </p>
                                    </div>


                                    <div class="col-md-12 defaultz feeds">
                                       <p class="Product-id wraper">
                                          <span class="quote-status-hd">Feedback</span> : 
                              <span class="feedback">
                              <?php echo e(ucfirst($complaintdetails['feedback'])); ?>

                              </span>
                                             
                                       </p>
                        </div>


                     <?php endif; ?>
                  <?php endif; ?>
                     <?php //  Manual complaint end ?>






<!-- Modal view quotation -->

<div class="modal fade" id="myModalactionview" role="dialog"  >
   <div class="modal-dialog modal-dialog-centered">
  
      <input  type="hidden" class="form-control"  id="complaint_id_quotation" name="complaint_id_quotation" value="<?php echo e($complaintdetails['id']); ?>" >
    
      <!-- Modal content-->

      <div class="modal-content">
         <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">View Quotation</h5>
                <button type="button" class="close close_message" data-dismiss="modal" aria-label="Close">
                  <span aria-hidden="true">&times;</span>
                </button>
            </div>
        <div class="modal-body">
                          <div class="col-sm-12 col-xs-12">
                              <div class="right-panel vendor">
                                <Span class="Tittle">Parts need to be replace</Span>
                                <Span class="Collon">:</Span>
                                <Span class="Value vendorval"><?php echo e($complaintdetails['parts_replace']); ?></Span>
                              </div>
                              <div class="right-panel vendor">
                                 <Span class="Tittle">Price</Span>
                                 <Span class="Collon">:</Span>
                                 <Span class="Value vendorval"><?php echo e($complaintdetails['price'].' '.'INR'); ?></Span>
                               </div>
                               <div class="right-panel vendor">
                                 <Span class="Tittle">Document</Span>
                                 <Span class="Collon">:</Span>
                                 <Span class="Value"> <a target="_blank" class="eye" href="<?php echo e(url('uploads/document/'.$complaintdetails['quotation_doc'])); ?>"><i class="fa fa-file" aria-hidden="true"></i> View</a></Span>
                               </div>
                              
                        
                         </div>
                      
        </div>

     </div>

</div>
</div>
<!-- Modal -->

<!-- Modal send quotation -->

<div class="modal fade" id="myModalaction" role="dialog"  >
   <div class="modal-dialog modal-dialog-centered">
   <form name="sendquotation" id="sendquotation" enctype="multipart/form-data" method="POST" action="<?php echo e(url('vendors/sendquotation')); ?>">
      <?php echo csrf_field(); ?>
      <input  type="hidden" class="form-control"  id="complaint_id_quotation" name="complaint_id_quotation" value="<?php echo e($complaintdetails['id']); ?>" >
    
      <!-- Modal content-->
      <div class="modal-content">
          <div class="modal-header">
                 <h5 class="modal-title" id="exampleModalLabel">Send Quotation</h5>
                 <button type="button" class="close close_message" data-dismiss="modal" aria-label="Close">
                   <span aria-hidden="true">&times;</span>
                 </button>
             </div>
         <div class="modal-body">
            <div class="row manufacturerlist manufacturerlist-rs">
               <div class="col-sm-12 col-xs-12">
                  <div class="form-inputs">
                    <div class="form-group">
                      <label>Parts need to be replace<sup>*</sup></label>
                      <input id="parts_quotation" name="parts_quotation"  type="text" class="form-control" value="<?php echo e($complaintdetails['parts_replace']); ?>">
                      <input  type="hidden" class="form-control"  id="product_type_quotation" name="product_type_quotation" value="<?php echo e($complaintdetails['type']); ?>" >
                      <input  type="hidden" class="form-control"  id="buyer_id_quotation" name="buyer_id_quotation" value="<?php echo e($complaintdetails['buyer_id']); ?>" >
                      <input  type="hidden" class="form-control"  id="department_id_quotation" name="department_id_quotation" value="<?php echo e($complaintdetails['department_id']); ?>" >
                      <?php if($complaintdetails['type']=='approve'): ?>
                        <input  type="hidden" class="form-control"  id="product_id_quotation" name="product_id_quotation" value="<?php echo e($complaintdetails['productid']); ?>" >
                     <?php else: ?>
                      <input  type="hidden" class="form-control"  id="product_id_quotation" name="product_id_quotation" value="<?php echo e($complaintdetails['existing_product_id']); ?>" >
                     <?php endif; ?>
                    </div>
                    </div>
                  </div>
               </div>
               <div class="row manufacturerlist manufacturerlist-rs">
               <div class="col-sm-12 col-xs-12">
                  <div class="form-inputs">
                    <div class="form-group">
                      <label>Price(INR)<sup>*</sup></label>
                      <input id="price_quotation" name="price_quotation"  type="number" class="form-control" value="<?php echo e($complaintdetails['price']); ?>">
                    </div>
                    </div>
                  </div>
               </div>
               <div class="row manufacturerlist manufacturerlist-rs">
                  <div class="col-sm-12 col-xs-12">
                     <div class="form-inputs">
                       <div class="form-group">
                         <label>Attach Quotation<sup>*</sup></label>
                         <input id="document_quotation" name="document_quotation"  type="file" class="form-control">
                       </div>
                       </div>
                     </div>
                  </div>

               <div class="modal-footer">
                 <button type="submit" class="btn btn-primary sendmessage" id="sendobservation">
                             <?php echo e(__('Send')); ?>

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

      </div>
   </form>
</div>
</div>
<!-- Modal -->




</div>
                
                
                
                <div class="buttons-comp d-flex align-items-center mb-5 justify-content-center w-100 justify-content-center">

                  <!---Reschedule button start-->

          <?php if(($complaintdetails['complaint_type']=='manual')||($complaintdetails['complaint_type']=='amc_cmc_rene')||($complaintdetails['complaint_type']=='validation_date')||($complaintdetails['complaint_type']=='amc_cmc_activation')||($complaintdetails['complaint_type']=='installation_date')||($complaintdetails['complaint_type']=='preventive_contract')||($complaintdetails['complaint_type']=='inspection_request')): ?>
        
              <?php if(($complaintdetails['quotation_request'] !=2)): ?>

                        <?php if(($complaintdetails['status'] ==13)||($complaintdetails['status'] ==12)||($complaintdetails['status'] ==9)||($complaintdetails['status'] ==10)||($complaintdetails['status'] ==4)||($complaintdetails['status'] ==16)): ?>

                        <button  class="green-button newGreenbtn mr-2" onclick="reschedule(<?php echo e($assigneddetails['assignedid']); ?>,<?php echo e($complaintdetails['id']); ?>)">Reschedule</button>

                        <?php endif; ?>
              <?php endif; ?>


              <?php if(($complaintdetails['quotation_request'] ==2)): ?>

                        <?php if(($complaintdetails['status'] ==13)||($complaintdetails['status'] ==4)||($complaintdetails['status'] ==12)||($complaintdetails['status'] ==9)): ?>

                        <button  class="green-button newGreenbtn mr-2" onclick="reschedule(<?php echo e($assigneddetails['assignedid']); ?>,<?php echo e($complaintdetails['id']); ?>)">Reschedule</button>
                        <?php endif; ?>


                <?php endif; ?>
          <?php endif; ?>
                  <!---Reschedule button end-->


  <!---send quotation start-->
                  
   <?php if(($complaintdetails['quotation_request'] !=2)): ?>
         <?php if(($complaintdetails['status'] ==8)||($complaintdetails['status'] ==16)): ?>

         
               <?php if(strtotime($product_warranty) < strtotime($current_date)): ?>
                        <?php if(($activate_status ==2)&&($activate_val =='cmc')&&(strtotime($activated_enddate) >= strtotime($current_date))): ?> 
                        <?php else: ?>
                     
                        <button  class="green-button newGreenbtn mr-2" onclick="send_quotation()">Send Quotation</button>
                     
                        <?php endif; ?>   
               
               <?php endif; ?>
         
         <?php endif; ?>
<?php endif; ?>

  <!---send quotation end-->

   <?php if(($complaintdetails['quotation_request'] ==2)): ?>

         <?php if(($complaintdetails['status'] ==0)||($complaintdetails['status'] ==16)): ?>
      
         <button  class="green-button newGreenbtn mr-2"  onclick="send_quotation()">Send Quotation</button>
      
         <?php endif; ?>

   <?php endif; ?>


   <?php if(($complaintdetails['price'] !='')): ?>
      
         <button class="green-button newGreenbtn mr-2" onclick="view_quotation()">View quotation</button>
     
  <?php endif; ?>






                    <!--<button class="green-button newGreenbtn mr-2" >View quotation </button>
                    <button class="green-button newGreenbtn mr-2" >Send quotation </button>
                    <button class="green-button newGreenbtn mr-2" >View quotation </button>
                    <button class="green-button newGreenbtn" >View quotation </button>-->
                </div>









   </div>
   </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<script src="<?php echo e(url('assets/timepicki/timepicki.js')); ?>"></script>
<script src="<?php echo e(url('assets/js/TimeSelect.js')); ?>"></script>
<script>
    $(document).ready(function() {
        $('#timePicker').ptTimeSelect();
        $('#timepicker').ptTimeSelect();
    });
</script>
<script>
   function play() {
     var audio = new Audio('https://www.meddbot.com/uploads/voice/38239.mp3');
     audio.play();
   }
   </script>



<script>
// Get the modal
var modal = document.getElementById("myModal");

// Get the image and insert it inside the modal - use its "alt" text as a caption
var img = document.getElementById("myImg");
var modalImg = document.getElementById("img01");
var captionText = document.getElementById("caption");
img.onclick = function(){
  modal.style.display = "block";
  modalImg.src = this.src;
  captionText.innerHTML = this.alt;
}

// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];

// When the user clicks on <span> (x), close the modal
span.onclick = function() { 
  modal.style.display = "none";
}
</script>
<script>    
window.baseurl = 'https://www.meddbot.com/';


function completed(complaintid){
			var data1 = {
					_token: $('#token_vendor').val(),
					complaintid:complaintid,
					vendor_id:$("#vendor_id").val(),
					buyer_id:$("#buyer_id").val(),
					product_id:$("#product_id").val()
					
					
				}
				$.ajax({
					url: baseurl + 'complaint_completed',
					type: "POST",
					data: data1,
					success: function(res) {
						
						if(res==1){
							
							swal({
								title: "",
								text: "Successfully  Completed!",
								type: "success",
								showCancelButton: false,
								dangerMode: false,
								confirmButtonText: 'OK'
							},function () {
								window.location = baseurl + 'vendors/quality_manage';
							})
						
						}
						
					}
				});
		
		
}

function reschedule(assignedid,complaint_id){
	swal({
  title: "Are you sure?",
  text: "Once rescheduled, you will not be able to recover scheduled details!",
  icon: "warning",
  buttons: true,
  dangerMode: true,
  showCancelButton: true,
},function () {
		
		var data1 = {
					_token: $('#token_vendor').val(),
					scheduleid:assignedid,
					complaint_id:complaint_id
					
					
					
				}
				$.ajax({
					url: baseurl + 'schedule_delete',
					type: "POST",
					data: data1,
					success: function(res) {
						
						if(res==1){
							location.reload();
							
						}
						
					}
				});
		
		});
	
}
$(document).ready( function () {
    $(".time_element").timepicki();
	

   $('#schedule_date').Zebra_DatePicker({
            format: 'd-m-Y',
            direction: 1
            });

    $('input.timepicker').timepicker({
        timeFormat: 'HH:mm:ss p',
        // year, month, day and seconds are not important
        minTime: new Date(0, 0, 0, 8, 0, 0),
        maxTime: new Date(0, 0, 0, 15, 0, 0),
        // time entries start being generated at 6AM but the plugin 
        // shows only those within the [minTime, maxTime] interval
        startHour: 6,
        // the value of the first item in the dropdown, when the input
        // field is empty. This overrides the startHour and startMinute 
        // options
        startTime: new Date(0, 0, 0, 8, 20, 0),
        // items in the dropdown are separated by at interval minutes
        interval: 10
    });
    
    $('input.change-format').click(function() {
        // change timeFormat option here
        $('input.timepicker').data('TimePicker').options.timeFormat = 'HH:mm:ss p';
        // since v1.1.2 does not support changing most of the options, we need
        // to trick the plugin into thinking the next time the dropdown needs
        // to be displayed is the first time, so it re-generates the items, 
        // using the new format
        $('input.timepicker').data('TimePicker').items = null;
        $('input.timepicker').data('TimePicker').widget.instance = null;
    });
});

document.getElementById("timeButton").addEventListener("click", function () {
    document.getElementById("timeInput").focus(); // Triggers the time picker
});
document.querySelector(".clock").addEventListener("click", () => {
    document.getElementById("timepicker").focus(); // Triggers the time picker
});
   <?php if(Session::has('message')): ?>
         swal({
           title: "",
           text: "<?php echo e(Session::get('message')); ?>",
           type: "success",
           showCancelButton: false,
           dangerMode: false,
           confirmButtonText: 'OK',
   
       });
   <?php endif; ?>
   <?php if(Session::has('errormessage')): ?>
         swal({
           title: "",
           text: "<?php echo e(Session::get('errormessage')); ?>",
           type: "error",
           showCancelButton: false,
           dangerMode: true,
           confirmButtonText: 'OK',
   
       });
   <?php endif; ?>
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.main_service', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/meddbot/public_html/resources/views/vendors/view_complaint.blade.php ENDPATH**/ ?>