<?php $__env->startSection('content'); ?>
<style>
label.error{
	color:red;
}
</style>
<div class="common-content">
          <div class="page-content">
                <div class="page-heading">
                    <div class="headings">
                        <h6>Product details</h6>
                    </div>
                </div>

                <div class="dashboard-cnts">
				  
					<div class="row">
                        <div class="col-lg-12">
                            <div class="partner-box partner-box2 Register-partner-box">
							<div class="Register-product-logo">
								
								<div class="complaint-img">
                                    <?php if(!empty($productdetails->photo)): ?>
                                        <img src="<?php echo e(url('product_files')); ?>/<?php echo e($productdetails->photo); ?>">
                                    <?php else: ?>
                                        <img src="<?php echo e(url('assets/images/1200px-No-Image-Placeholder.svg.png')); ?>">
                                    <?php endif; ?>
                                </div>
								
							</div>
							
						<div class="partner-details Register-partner-details">
							<h6 style="font-size: 18px; color:#0498d5;"><?php echo e(ucfirst($productdetails->product_name)); ?></h6>
                            <div class="right-panel">
                                <Span class="Tittle">Product Code</Span>
                                <Span class="Collon">:</Span>
                                <Span class="Value"><?php echo e($productdetails->product_code); ?></Span>
                            </div>
							
							
                            
							<div class="right-panel">
                                <Span class="Tittle">Master product</Span>
                                <Span class="Collon">:</Span>
                                <Span class="Value"><?php echo e($productdetails->masterproduct); ?></Span>
                            </div>
							<div class="right-panel">
                                <Span class="Tittle">Category</Span>
                                <Span class="Collon">:</Span>
                                <Span class="Value"><?php echo e($productdetails->categoryname); ?></Span>
                            </div>
							
												<?php if(!empty($productdetails->catalogue)): ?>
													<a target="_blank"  href="https://meddbot.com/product_files/<?php echo e($productdetails->catalogue); ?>"><button style="cursor: pointer;"><i class="far fa-file-word"></i>View product catalogue</button></a>
												<?php endif; ?>
												<?php if(!empty($productdetails->certificate)): ?>
													<a target="_blank"  href="https://meddbot.com/product_files/<?php echo e($productdetails->certificate); ?>"><button style="cursor: pointer;"><i class="far fa-file-word"></i>View Product Certificate</button></a>
												<?php endif; ?>
												<?php if(!empty($productdetails->performancereport)): ?>
													<a target="_blank"  href="https://meddbot.com/product_files/<?php echo e($productdetails->performancereport); ?>"><button style="cursor: pointer;"><i class="far fa-file-word"></i>View Product Performance report</button></a>
												<?php endif; ?>
											
						
						</div>
                                
					</div>
                        </div>
                    </div>


                </div>

	</div>




<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<script>
$(document).ready( function () {
    $('#table_id').DataTable();
} );

<?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; ?>


function generatebarcode(){
	var product =$("#product_existing option:selected").val();
	var Arr = product.split('_');
	var product_id  =Arr[0];
	var vendor_id   =Arr[1];
	$('#exampleModal').modal('show');

	var barcode='54321'+' '+product_id;
	$('#barcode').JsBarcode(barcode, {
	  width: 1,
	  height: 40
	});

	$("#barcode_existing").val(barcode);
}
function generatebarcode_new(product_id){
	
	$('#exampleModal').modal('show');

	var barcode='54321'+' '+product_id;
	$('#barcode').JsBarcode(barcode, {
	  width: 1,
	  height: 40
	});

	$("#barcode_new").val(barcode);
}

$("#printBtn").click(function(){
	var divToPrint=document.getElementById('demo');

  var newWin=window.open('','Print-Window');

  newWin.document.open();

  newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');

  newWin.document.close();

  setTimeout(function(){newWin.close();},10);


});


</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.main_assetmanage', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/meddbot/public_html/resources/views/manufacturers/productdetails.blade.php ENDPATH**/ ?>