<?php $__env->startSection('content'); ?>
<style>
label.error{
	color:red;
}
#error_status{
	color:red;
}
.form-inputs .green-button.add, .form-inputs .green-button.rem {
    margin: 10px 0;
    text-align: left;
}
.form-inputs .green-button.add button, .form-inputs .green-button.rem button {
    width: auto;
    margin-top: 0;
    background: #0298d5;
    border-radius: 35px;
    padding: 6px 15px;
    display: inline-block;
    min-width: 105px;
    margin: 0;
}
.check{
	border:1px solid red !important;
}
sup{
	color:red;
}

</style>
<div class="common-content">
          <div class="page-content">
                <div class="page-heading">
                    <div class="headings">
                        <h6>REGISTER SOLD PRODUCT</h6>

						<input type="hidden" name="dispatch_to" id="dispatch_to" value="<?php echo e($dispatch_to); ?>">
						


						<?php 
						$time = strtotime(date("Y-m-d"));
						
						 $final = date("Y-m-d", strtotime("+12 month", $time));?>
                    </div>
                </div>
				
			<!----Edit--->
		<?php if($soldstatus==1): ?>
            <div class="boxings">
			 <span id="error_status"></span>
             <form method="POST" id="reg_sold_edit" action="<?php echo e(url('vendors/update_sold_po')); ?>" enctype="multipart/form-data">
				<input type="hidden" name="soldid" id="soldid" value="<?php echo e($solddetails['id']); ?>">
				<input type="hidden" name="po_id" id="po_id" value="<?php echo e($solddetails['order_id']); ?>">
				
				<input type="hidden" name="validation_date_status" id="validation_date_status" value="<?php echo e($solddetails['validation_date_status']); ?>">
				<input type="hidden" name="validation_date_prev" id="validation_date_prev" value="<?php echo e($solddetails['validation_date']); ?>">
			 
			 
				<input type="hidden" name="activated_certificate_prev" id="activated_certificate_prev" value="<?php echo e($solddetails['activated_certificate']); ?>">
				<input type="hidden" name="activated_startdate_prev" id="activated_startdate_prev" value="<?php echo e($solddetails['activated_startdate']); ?>">
				<input type="hidden" name="activated_enddate_prev" id="activated_enddate_prev" value="<?php echo e($solddetails['activated_enddate']); ?>">
				<input type="hidden" name="activated_price_prev" id="activated_price_prev" value="<?php echo e($solddetails['activated_price']); ?>">


				<input type="hidden" name="amc_price_edit" id="amc_price_edit" value="<?php echo e($solddetails['amc_price']); ?>">
				<input type="hidden" name="cmc_price_edit" id="cmc_price_edit" value="<?php echo e($solddetails['cmc_price']); ?>">

			  
			
				<?php if($solddetails['activate_status']==''): ?>
					<input  type="hidden" class="form-control" id="activestatus" name="activestatus" value="0" >
				<?php else: ?>
					<input  type="hidden" class="form-control" id="activestatus" name="activestatus" value="<?php echo e($solddetails['activate_status']); ?>" >
				<?php endif; ?>
			 
				<?php
				if($registercount==0){
   
				   $rstatus='';
   
				}
				else{
   
				   $rstatus='readonly';
				}
				?>
			 
			  <input  type="hidden" class="form-control" id="activated_val" name="activated_val" value="<?php echo e($solddetails['activate_val']); ?>" >
			 <?php echo csrf_field(); ?>
			     <input type="hidden" name="uncheck_status" id="uncheck_status" value="<?php echo e($solddetails['uncheck_status']); ?>">
				 <input type="hidden" name="buyer_id" id="buyer_id" value="<?php echo e($solddetails['buyer_id']); ?>">
				 <input type="hidden" name="prdid" id="prdid" value="<?php echo e($solddetails['product_id']); ?>">
			
			      <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>Product Name</label>
                                <input  type="text" class="form-control"  id="product_name" name="product_name" value="<?php echo e(ucfirst($productdetails['product_name'])); ?>" readonly >
                              </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>Model No</label>
								<input  type="text" class="form-control" id="model_no" name="model_no" value="<?php echo e(ucfirst($productdetails['product_code'])); ?>" readonly >
                              </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>Serial No <?php if($dispatch_to==1): ?><sup>*</sup> <?php endif; ?></label>
                                <input  type="text" class="form-control" id="prd_serial_no_edit" name="prd_serial_no_edit" value="<?php echo e(ucfirst($solddetails['product_serial_no'])); ?>" <?php if($solddetails['product_serial_no']!=null): ?> readonly <?php endif; ?> >
                              </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>Buyer Name</label>
                                <input  type="text" class="form-control" name="buyer_name" id="buyer_name" value="<?php echo e(ucfirst($buyerdetails['name'])); ?>" readonly>
                              </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>Warranty Date<sup>*</sup></label>
								
								<?php
									if($approvecheck==1){
										
										 if($approvedata->product_warranty==0){
											 
											 $warranty ='check';
										 }
										 else{
											 $warranty ='';
										 }
										
									}
									else{
										$warranty ='';
									}
									
								
								?>
								
								<input id="warrenty_edit" type="text" class="form-control <?php echo $warranty;?>" data-zdp_readonly_element="true" name="warrenty_edit"  value="<?php echo e($solddetails['warrenty']); ?>">
							
                            </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>Validation Date<sup>*</sup></label>
					
								<?php
									if($approvecheck==1){
										
										 if($approvedata->validation_date_check==0){
											 
											 $validation_date_check ='check';
										 }
										 else{
											 $validation_date_check ='';
										 }
										
									}
									else{
										$validation_date_check ='';
									}
									
									$readvalidation='';
								
								 
									 
								 
								 ?>

								 <?php if($registercount==0): ?>
									<input id="validation_date_edit_disable" data-zdp_readonly_element="true" type="text" class="form-control <?php echo $validation_date_check;?>"  name="validation_date_edit" value="<?php echo e($solddetails['validation_date']); ?>" <?php echo $rstatus;?>>
								 <?php else: ?>
									<input id="validation_date_edit_disable1" type="text" class="form-control <?php echo $validation_date_check;?>"  name="validation_date_edit" value="<?php echo e($solddetails['validation_date']); ?>" <?php echo $rstatus;?>>
								 <?php endif; ?>
								
                              </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>Product Discard Date<sup>*</sup></label>
								
								<?php
									if($approvecheck==1){
										
										 if($approvedata->product_discard_date==0){
											 
											 $dis ='check';
										 }
										 else{
											 $dis ='';
										 }
										
									}
									else{
										$dis ='';
									}
									
								
								?>
								<input id="product_discard_edit" type="text" class="form-control <?php echo $dis;?>" data-zdp_readonly_element="true" name="product_discard_edit"  value="<?php echo e($solddetails['product_discard_years']); ?>">
							</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>Invoice Number<sup>*</sup></label>
								
								<?php
									if($approvecheck==1){
										
										 if($approvedata->invoice_number==0){
											 
											 $in ='check';
										 }
										 else{
											 $in ='';
										 }
										
									}
									else{
										$in ='';
									}
									
								
								?>
								
								
                                <input id="invoice_number_edit"  type="text" class="form-control <?php echo $in;?>" data-zdp_readonly_element="false" name="invoice_number_edit"  value="<?php echo e($solddetails['invoice_number']); ?>">
							</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>No. of days  can be used in a month<sup>*</sup></label>
								<input id="equipment_month_approve_edit" type="number" class="form-control"   name="equipment_month_approve_edit"  value="<?php echo e($solddetails['equipment_month']); ?>" >
                                
							</div>
                        </div>
                    </div>

					<div class="col-lg-12 col-md-6 col-sm-12 col-xs-12">
						<div class="d-flex-max">
                            <div class="form-inputs">
							 <div class="form-group">
								<label>No. of Hours  can be used in a day<sup>*</sup></label>
								<input id="equipment_day_approve_edit" type="radio" class="form-control" name="equipment_approve_edit"  value="hours" <?php if($solddetails['equipment_default']=='hours'){?> checked <?php }?>>
								
							</div>
						</div>
                        <div class="form-inputs">
						 <div class="form-group">
							<label>No. of Test  can be used<sup>*</sup></label>
							<input id="equipment_test_approve_edit" type="radio" class="form-control"  name="equipment_approve_edit"  value="test" <?php if($solddetails['equipment_default']=='test'){?> checked <?php }?>>
							
						</div>
					</div>
                        </div>
					</div>

					<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="equipmentlink_edit" style="display:block;">
						<div class="form-inputs">
							<div class="form-group">
								<span id="eval_edit"><?php if($solddetails['equipment_default']=='hours'): ?><label>No. of Hours  can be used in a day<sup>*</sup></label><?php else: ?><label>No. of Test Equipment can be used<sup>*</sup></label><?php endif; ?></span>
								<input id="equipment_approve_default_edit"  type="number" class="form-control"  name="equipment_approve_default_edit"  value="<?php echo e($solddetails['equipment_val']); ?>">
								
							</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>Preventive Maintenance Frequency<sup>*</sup></label>
								
								<?php
									if($approvecheck==1){
										
										 if($approvedata->preventive_frequency==0){
											 
											 $pr ='check';
										 }
										 else{
											 $pr ='';
										 }
										
									}
									else{
										 $pr ='';
									}
									
								
								?>
								
                             <select class="form-control selectmanufacturer <?php echo $pr;?>" id="preventive_maintenance_edit" name="preventive_maintenance_edit">
								  <option value="">Select</option>
								  <option value="Monthly" <?php if($solddetails['preventive_maintenance']=='Monthly'){echo "selected";} ?> >Monthly</option>
								  <option value="Quarterly" <?php if($solddetails['preventive_maintenance']=='Quarterly'){echo "selected";} ?>>Quarterly</option>
								  <option value="Half Yearly" <?php if($solddetails['preventive_maintenance']=='Half Yearly'){echo "selected";} ?>>Half Yearly</option>
								  <option value="Yearly" <?php if($solddetails['preventive_maintenance']=='Yearly'){echo "selected";} ?>>Yearly</option>

							</select>
							</div>
                        </div>
                      </div>
					  <?php if($solddetails['govmt_permission']==1): ?>
					  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:block;" id="renewaleditdiv">
                        <div class="form-inputs">
                             <div class="form-group">
                                <label>Renewal Date(Government Document)<sup>*</sup></label>
                                <input id="renewal_date_edit" type="text" class="form-control" data-zdp_readonly_element="true" name="renewal_date_edit"  value="<?php echo e($solddetails['renewal_date']); ?>">
							</div>
                        </div>
					</div>
					<?php endif; ?>
					  <?php if($solddetails['govmt_permission']==1): ?>
						   <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
								<div class="form-inputs">
									 <div class="form-group">
                                         <label>Permission</label>
										<div class="form-control">
                                            <label>Government Permission Required</label>
										      <input type="checkbox" id="permission_edit" name="permission_edit" value="1" checked>
                                         </div>
									</div>
								</div>
							</div>
                       
						
					<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:block;" id="documenteditdiv">
                        <div class="form-inputs">
                             <div class="form-group doc-view">
                                <label>Registration Document<sup>*</sup></label>
                                <input type="file" id="document_edit" name="document_edit">
								<input type="hidden" id="check_upload_orig" name="check_upload_orig" value="<?php echo e($solddetails['document']); ?>"  />
									<?php echo e($solddetails['document']); ?>

									
								<?php if($solddetails['document'] !=''): ?>
								  <a target="_blank" class="eye" href="<?php echo e(url('uploads/document/'.$solddetails['document'])); ?>"><i class="fa fa-eye" aria-hidden="true"></i> View</a>
								<?php endif; ?>
							</div>
                        </div>
                      </div>
					  <?php else: ?>
						  
							<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
								<div class="form-inputs">
									 <div class="form-group">
                                         <label>Permission</label>
                                         <div class="form-control">
                                             <input type="checkbox" id="permission_edit" name="permission_edit" value="1">
										<label>Government Permission Required</label>
										
                                             
									       </div>
									</div>
								</div>
							</div>

							 <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:none;" id="documenteditdiv">
								<div class="form-inputs">
									 <div class="form-group">
										<label>Document</label>
										<input type="file" id="document_edit" name="document_edit">
										<input type="hidden" id="check_upload_orig" name="check_upload_orig" value="<?php echo e($solddetails['document']); ?>"  />
									</div>
								</div>
							</div>
					  
						   <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:none;" id="renewaleditdiv">
							<div class="form-inputs">
								 <div class="form-group">
									<label>Renewal Date(Government Document)</label>
									<input id="renewal_date_edit" type="text" class="form-control" data-zdp_readonly_element="true" name="renewal_date_edit"  value="">
								</div>
							</div>
						  </div>

						  <div class="col-lg-12 col-md-6 col-sm-12 col-xs-12">
							<div class="form-inputs">
								 <div class="form-group">
									<label>Additional Information<sup>*</sup></label>
									<textarea id="additional_information_edit" type="text" class="form-control" data-zdp_readonly_element="false" name="additional_information_edit"><?php echo e($solddetails['additional_info']); ?></textarea>
									
								</div>
							</div>
						  </div>
					  <?php endif; ?>
								  
					 </div>
					 
				
					 
				<div class="amc">
				  AMC FOR PRODUCT
                 </div>
				<?php
				
				
									if($approvecheck==1){
										
										 if($approvedata->amc_check==0){
											 
											 $am ='check';
										 }
										 else{
											 $am ='';
										 }
										
									}
									else{
										 $am ='';
									}
									
								
								?>
				<?php if($am =='check'): ?>
				  <span style="color:red">Buyer disagreed AMC details</span>
				<?php endif; ?>			
				 
						 <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>AMC Validity</label>
										<input type="text" class="form-control" id="amc_validity_edit" name="amc_validity_edit" value="Yearly" readonly="" fdprocessedid="lnonhs">
										
									</div>
								</div>
							</div>
							<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 <?php echo $am;?>" style="display:block;">
								<div class="form-inputs">
									 <div class="form-group">
										<label>Price<sup>*</sup></label>
										<input  type="text" class="form-control <?php echo $am;?>" id="amc_price_edit" name="amc_price_edit" value="<?php echo e($solddetails['amc_price']); ?>" <?php echo $rstatus;?> >
									</div>
								</div>
							</div>	
						 </div>
						
			
				
				
				 <div class="amc">
				  CMC FOR PRODUCT
                 </div>
				 
				 <?php
									if($approvecheck==1){
										
										 if($approvedata->cmc_check==0){
											 
											 $cm ='check';
										 }
										 else{
											 $cm ='';
										 }
										
									}
									else{
										 $cm ='';
									}
									
								
								?>
				 <?php if($cm =='check'): ?>
				  <span style="color:red">Buyer disagreed CMC details</span>
				 <?php endif; ?>
				
				  <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>CMC Validity</label>
										<input type="text" class="form-control mt-0" id="cmc_validity_edit" name="cmc_validity_edit" value="Yearly" readonly="" fdprocessedid="lnonhs">


									</div>
								</div>
							</div>
							<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 <?php echo $cm;?>" style="display:block;">
								<div class="form-inputs">
									 <div class="form-group">
										<label>Price<sup>*</sup></label>
										<input  type="text" class="form-control <?php echo $cm;?>" id="cmc_price_edit" name="cmc_price_edit" value="<?php echo e($solddetails['cmc_price']); ?>" <?php echo $rstatus;?> >
									</div>
								</div>
							</div>	
				    
					<?php
					$today = date("Y-m-d");
					//out of warranty
					?>
					<?php if(strtotime($today) > strtotime($solddetails['warrenty'])): ?>

					<?php else: ?>
					
							<div class="col-lg-4" style="    margin-top: 24px;    align-items: center;    display: flex;">
                                <div class="d-flex">
                                <?php if(($solddetails['activate_status']==0)&&($solddetails['sendproposal']==1)): ?>
								<button style="margin: 0 auto;" type="button" class="newGreenbtn barcodeBtn"  onclick="send_proposal()">
									Send proposal
								</button>
							<?php endif; ?>
						
							<?php if(($solddetails['activate_status']==1)||($solddetails['activate_status']==4)||($solddetails['activate_status']==3)): ?>
								<button style="margin: 0 auto;" type="button" class="newGreenbtn barcodeBtn"  onclick="amc_cmc_updation('<?php echo e($solddetails['activate_val']); ?>',<?php echo e($solddetails['id']); ?>)">
									<?php echo e('Update'.' '.strtoupper($solddetails['activate_val'])); ?>

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

					<?php endif; ?>

					<?php
						$historydetails  			= App\Helpers\CustomHelper::regsoldhistory($solddetails['id']);
					?>

				<?php if(count($historydetails )!=0): ?>
                 </div></div>
				<hr>
				<h6><?php echo e(strtoupper($solddetails['activate_val']).' '.'details'); ?></h6>
					<?php $__currentLoopData = $historydetails; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $historydetailsnew): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>	   
						<div id="cmitems_edit"> 
						
									<div class="row cmcs_edit">
											<div class="col-lg-3 col-md-6 col-sm-12 col-xs-12">
												<div class="form-inputs">
													<div class="form-group">
														<label>Start Date</label>
														<input  type="text" class="form-control"  value="<?php echo e($historydetailsnew['start_date']); ?>" readonly>
													</div>
												</div>
											</div>
									
											<div class="col-lg-3 col-md-6 col-sm-12 col-xs-12">
											<div class="form-inputs">
												<div class="form-group">
													<label>End Date</label>
													<input  type="text" class="form-control"  value="<?php echo e($historydetailsnew['end_date']); ?>" readonly>
												</div>
											</div>
										</div>
										<div class="col-lg-3 col-md-6 col-sm-12 col-xs-12">
											<div class="form-inputs">
												<div class="form-group">
													<label>Price(INR)</label>
													<input  type="text" class="form-control" id="priceitem" name="priceitem" value="<?php echo e($historydetailsnew['price']); ?>" readonly>
													
												</div>
											</div>
										</div>
										
										<div class="col-lg-3 col-md-6 col-sm-12 col-xs-12">
											<div class="form-inputs">
												<div class="form-group">
													<label>Certificate</label>
													<a target="_blank" class="eye" href="<?php echo e(url('uploads/document/'.$historydetailsnew['certificate'])); ?>"><i class="fa fa-eye" aria-hidden="true"></i> View Certificate</a>
													
												</div>
											</div>
										</div>
									
									</div>
					
						</div>
				
				
					<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>   
				
				<?php endif; ?>

				
				<?php if($solddetails['uncheck_status']==0): ?>
				<div class="row w-100">
                     <div class="col-12">
                        <div class="green-button">
                            <button class="product-submit" id="sold">Submit</button>
                         </div> 
                     </div>
				</div>
			   <?php endif; ?>


				</form>
              </div>

			 <!---add section--> 
			
			<?php else: ?>
			<!----add--->
            <div class="boxings">
			  <input name="_token" type="hidden" id="token_vendor" value="<?php echo e(csrf_token()); ?>">
			  <span id="error_status"></span>
             <form method="POST" id="reg_sold" action="<?php echo e(url('vendors/register_po_save')); ?>" enctype="multipart/form-data">
               
			  <?php echo csrf_field(); ?>
			  <input type="hidden" name="order_id" value="<?php echo e($order_id); ?>">
			  <input type="hidden" name="po_product_itemsid" id="po_product_itemsid" value="<?php echo e($po_products_itemsid); ?>">
                  <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>Product Name</label>
                                <input  type="text" class="form-control"  id="product_name" name="product_name" value="<?php echo e(ucfirst($productdetails['product_name'])); ?>" readonly >
                              </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>Model No</label>
                                <input  type="text" class="form-control" id="model_no" name="model_no" value="<?php echo e(ucfirst($productdetails['product_code'])); ?>" readonly >
                              </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>Serial No   <?php if($dispatch_to==1): ?><sup>*</sup> <?php endif; ?></label>
								
                                <input  type="text" class="form-control" id="prd_serial_no" name="prd_serial_no" 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">
                                <label>Buyer Name</label>
                                <input  type="text" class="form-control" name="buyer_name" id="buyer_name" value="<?php echo e(ucfirst($buyerdetails['name'])); ?>" readonly>
                              </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>Warranty Date<sup>*</sup></label>
								
								 <input id="warrenty"   type="text" class="form-control" data-zdp_readonly_element="true" name="warrenty"  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">
                                <label>Validation Date<sup>*</sup></label>
                                <input id="validation_date" type="text" class="form-control" data-zdp_readonly_element="true" name="validation_date">
								
                              </div>
                        </div>
                      </div>
					  <input id="prdid" type="hidden" class="form-control" data-zdp_readonly_element="false" name="prdid" value="<?php echo e($prdid); ?>">
								<input id="buyer_id" type="hidden" class="form-control" data-zdp_readonly_element="false" name="buyer_id" value="<?php echo e($buyer_id); ?>">
					  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                             <div class="form-group">
                                <label>Product Discard Date<sup>*</sup></label>
                                <input id="product_discard" type="text" class="form-control" data-zdp_readonly_element="true" name="product_discard"  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">
                                <label>Invoice Number<sup>*</sup></label>
                                <input id="invoice_number" type="text" class="form-control" data-zdp_readonly_element="false" name="invoice_number"  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">
                                <label>Preventive Maintenance Frequency<sup>*</sup></label>
                                <select class="form-control selectmanufacturer" id="preventive_maintenance" name="preventive_maintenance">

								  <option value="">Select</option>

								  <option value="Monthly">Monthly</option>

								  <option value="Quarterly">Quarterly</option>

								  <option value="Half Yearly">Half Yearly</option>

								  <option value="Yearly">Yearly</option>

							</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>No. of Days  can be used in a month<sup>*</sup></label>
								<input id="equipment_month_approve"  type="number" class="form-control"  name="equipment_month_approve"  value="">
								
							</div>
						</div>
					  </div>
					  

					  

					  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 py-3">

                          <div class="form-check form-check-inline pt-4">
                              <input class="form-check-input mt-0" type="radio" name="equipment_approve"  value="hours" id="equipment_day_approve">
                              <label class="form-check-label" for="inlineRadio1">No. of Hours  can be used in a day<sup>*</sup></label>
                            </div>
                           
					</div>

					<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 py-3">
					
												  
													<div class="form-check form-check-inline pt-4">
													  <input class="form-check-input mt-0" type="radio" name="equipment_approve"  value="test" id="equipment_test_approve" >
													  <label class="form-check-label" for="inlineRadio2">No. of Test  can be used in a day<sup>*</sup></label>
													</div>
											</div>



					
				 

				  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="equipmentlink" style="display:none;">
					<div class="form-inputs">
						 <div class="form-group">
							<span id="eval"></span>
							<input id="equipment_approve_default"  type="number" class="form-control"  name="equipment_approve_default"  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">
                               <label>Permission</label>
                               <div class="form-control">
                                 <input type="checkbox" id="permission" name="permission" value="1">
                                 <label>Government Permission Required</label>
							   </div>
							</div>
                        </div>
                      </div>
					   
					   <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:none;" id="documentdiv">
                        <div class="form-inputs">
                             <div class="form-group">
                                <label>Registration Document<sup>*</sup></label>
                                <input type="file" id="document" name="document">
							</div>
                        </div>
                      </div>
					  
					   <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:none;" id="renewaldiv">
                        <div class="form-inputs">
                             <div class="form-group">
                                <label>Renewal Date(Government Document)<sup>*</sup></label>
                                <input id="renewal_date" type="text" class="form-control" data-zdp_readonly_element="true" name="renewal_date"  >
							</div>
                        </div>
                      </div>

					  <div class="col-lg-12 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                             <div class="form-group">
                                <label>Additional Information<sup>*</sup></label>
								<textarea id="additional_information" type="text" class="form-control" data-zdp_readonly_element="false" name="additional_information"></textarea>
                                
							</div>
                        </div>
                      </div>
					
					 </div>
                 <div class="amc">
				  AMC FOR PRODUCT
                 </div>
				
				
				 <div id="amitems"> 
				  <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>AMC Validity</label>

									<input type="text" class="form-control" id="amc_validity" name="amc_validity" value="Yearly" readonly="" fdprocessedid="lnonhs">
									
								  </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>Price(INR)<sup>*</sup></label>
                                <input  type="number" class="form-control" id="amc_price" name="amc_price" value="" >
                              </div>
                        </div>
                      </div>
                 
                     <!-- <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                             <div class="green-button add">
                                 <button class=""onclick="addamc()">ADD<i class="fa fa-plus" aria-hidden="true"></i></button>
                              </div>
                        </div>
                      </div>-->
                   </div>
				</div>  
                 <div class="amc">
				CMC FOR PRODUCT
                 </div>
				
				 <div id="cmitems"> 
				  <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>CMC Validity</label>

								 <input type="text" class="form-control" id="amc_validity" name="amc_validity" value="Yearly" readonly="" fdprocessedid="lnonhs">
                                 
                              </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>Price(INR)<sup>*</sup></label>
                                <input  type="number" class="form-control" id="cmc_price" name="cmc_price" value="" >
                              </div>
                        </div>
                      </div>
                 
                    <!--  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                             <div class="green-button add">
                                 
                                 <button class="product-submit"onclick="addcmc()">ADD<i class="fa fa-plus" aria-hidden="true"></i></button>
                              </div>
                        </div>
                      </div>-->
					  
                   </div>
				</div> 
				<div class="row">
                     <div class="col-12">
                        <div class="green-button">
                            <button class="product-submit" id="sold">Submit</button>
                         </div> 
                     </div>
                  </div>
				  </form>
              </div>
			  <?php endif; ?>
			  
			
<!-- Modal AMC/CMC Updation start -->
<div class="modal fade" id="amc_cmc_updation" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
	<div class="modal-dialog"> 
	  <div class="modal-content">
		<div class="modal-header">
		  <h5 class="modal-title" id="amc_cmc_updation_title"></h5>
		  <button type="button" class="close" data-dismiss="modal" aria-label="Close">
			<span aria-hidden="true">&times;</span>
		  </button>
		</div>
  
		<div class="modal-body imageArea" id="demo1">
		   
			<form name="update_amc_cmc" id="update_amc_cmc" method="POST" action="<?php echo e(url('vendors/update_amc_cmc')); ?>"  enctype="multipart/form-data">
				 <?php echo csrf_field(); ?>
				 <input type="hidden" name="soldid_amc_cmc" id="soldid_amc_cmc" value="">
				

			   <div class="row manufacturerlist manufacturerlist-rs">
				  <div class="col-sm-12 col-xs-12">
					  <div class="form-inputs">
						<div class="form-group">
						   <label>Start Date<sup>*</sup> </label>
						  
						   <input id="start_date" type="text" class="form-control" data-zdp_readonly_element="false" name="start_date" value="">
						 
						</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>End Date<sup>*</sup> </label>
						  
						   <input id="end_date" type="text" class="form-control" data-zdp_readonly_element="false" name="end_date"  value="">
						   
						</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<sup>*</sup></label>
						  
						   <input id="price" type="number" class="form-control" data-zdp_readonly_element="false" name="price"  value="">
						  
						  
						</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>Upload Certificate<sup>*</sup></label>
							<input id="certificate" name="certificate" type="file" class="form-control">
						   
						</div>
						</div>
					  </div>
				  </div>
			</div>
				<div class="modal-footer">
				  <button type="button" class="btn btn-secondary closemessage" data-dismiss="modal" id="closebar">Close</button>
				  <button type="submit" class="btn btn-primary sendmessage" id="sendobservation">
								<?php echo e(__('Send')); ?>

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

	  </div>
	</div>
<!-- Modal AMC/CMC Updation end -->
<!-- Modal Send Proposal start -->
<div class="modal fade" id="myModalsendproposal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
	<div class="modal-dialog"> 
	  <div class="modal-content">
		<div class="modal-header">
		  <h5 class="modal-title" id="amc_cmc_updation_title">Send Proposal</h5>
		  <button type="button" class="close" data-dismiss="modal" aria-label="Close">
			<span aria-hidden="true">&times;</span>
		  </button>
		</div>

		<div class="modal-body imageArea" id="demo1">
		   
			<form name="sendproposal_regsold" id="sendproposal_regsold" method="POST" action="<?php echo e(url('vendors/sendproposal_regsold')); ?>"  enctype="multipart/form-data">
				 <?php echo csrf_field(); ?>
				<h6>AMC FOR PRODUCT(Yearly charges)</h6>

				<input type="hidden" name="soldid_proposal" id="soldid_proposal" value="">
				
				 
			   <div class="row manufacturerlist manufacturerlist-rs">
				  <div class="col-sm-12 col-xs-12">
					  <div class="form-inputs">
						<div class="form-group">
						   <label>Price </label>
						  
						   <input id="price_amc_proposal" value="" type="number" class="form-control" name="price_amc_proposal">
						
						</div>
						</div>
					  </div>
				  </div>
				  <hr>
				  <h6>CMC FOR PRODUCT(Yearly charges)</h6>
				  <div class="row manufacturerlist manufacturerlist-rs">
					<div class="col-sm-12 col-xs-12">
						<div class="form-inputs">
						  <div class="form-group">
							 <label>Price </label>
							
							 <input id="price_cmc_proposal" value="" type="number" class="form-control" name="price_cmc_proposal">
						  
						  </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>Document </label>
								
								 <input id="regdoc" value="" type="file" class="form-control" name="regdoc">
							  
							  </div>
							  </div>
							</div>
						</div>





			
			</div>
				<div class="modal-footer">
				  <button type="button" class="btn btn-secondary closemessage" data-dismiss="modal" id="closebar">Close</button>
				  <button type="submit" class="btn btn-primary sendmessage" id="sendobservation">
								<?php echo e(__('Send')); ?>

							 </button>
				</div>
			</form>
		
		</div>
  
	  </div>
	</div>
  <!-- Modal Send Proposal end -->
 
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<script>

<?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: "warning",
        showCancelButton: false,
        dangerMode: false,
        confirmButtonText: 'OK',

    });
<?php endif; ?>







$(document).ready( function () {
    $('#table_id').DataTable();
	//$('#warrenty').Zebra_DatePicker();
	$('#product_discard').Zebra_DatePicker({
    format: 'd-m-Y',
	direction:1
    });
	$('#product_discard_edit').Zebra_DatePicker({
    format: 'd-m-Y',
	direction:1
    });
	
	$('#start_date').Zebra_DatePicker({
    format: 'd-m-Y',
	direction: 1
    });
	
	$('#end_date').Zebra_DatePicker({
    format: 'd-m-Y',
	direction: 1
    });
	
	
	
	
	$('#validation_date').Zebra_DatePicker({
    format: 'd-m-Y',
	direction: 1
    });
	
	
	$('#validation_date_edit').Zebra_DatePicker({
    format: 'd-m-Y',
	direction: 1
    });
	
	
	$('#warrenty').Zebra_DatePicker({
    format: 'd-m-Y',
	direction: 1
    });
	
	
	
	
	$('#warrenty_edit').Zebra_DatePicker({
    format: 'd-m-Y',
	direction: 1
    });

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

	
	
	$("#renewal_date").Zebra_DatePicker({
    format: 'd-m-Y'
    });
	$("#renewal_date_edit").Zebra_DatePicker({
    format: 'd-m-Y'
    });
	
	$('#document_edit').change(function(){
		var input = this;
		var url = $(this).val();
		$("#check_upload_orig").val(url);
		
  });
	
	$('input[type="checkbox"]').click(function(){
	
	    if($(this).prop("checked") == true){
			console.log("Checkbox is checked.");
			$("#documentdiv").css("display","block");			
			$("#renewaldiv").css("display","block");

			$("#documenteditdiv").css("display","block");			
			$("#renewaleditdiv").css("display","block");				
			
		}
		else if($(this).prop("checked") == false){
		   console.log("Checkbox is unchecked.");
		   $("#documenteditdiv").css("display","none");			
		   $("#renewaleditdiv").css("display","none");
		   
		   $("#documentdiv").css("display","none");			
		   $("#renewaldiv").css("display","none");
		}
     });
	
} );
</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/register_po.blade.php ENDPATH**/ ?>