<?php $__env->startSection('content'); ?>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.23/css/jquery.dataTables.css">
<div class="common-content">
    <div class="page-content">
        <div class="page-heading">
            <div class="headings">
                <h6> Quote status</h6>
            </div>
        </div>
        <div class="boxings">
            <div class="custom-tabs" style="margin-top: 0;">
			
			 <h6><span class="cateory-name" ><b>Quote Id</b></span> : <span><b><?php echo e($quotedetails['quote_unique_id']); ?></b></span></h6>  
			
                <ul class="nav nav-tabs" role="tablist">
                    <li class="nav-item">
					   
                        <a class="nav-link active" data-toggle="tab" href="#home">All Bids</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" data-toggle="tab" href="#menu1">Shortlisted Quote</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" data-toggle="tab" href="#menu2">Rejected Quote</a>
                    </li>
                </ul>
                <!-- nav-tabs End -->
               
                <div class="tab-content">
				
                    <div id="home" class="tab-pane active">
                    
						<div class="tableBox wraper">
                            <table id="table_id1" class="display">
								<thead>
									<tr>
										<th>SI No:</th>
										<th>Bid Id</th>
										<th>Vendor/Manufacturer Name</th>
										<th>Product Name</th>
										<th>Quoted Price</th>
										<th>Expected date of delivery</th>
										<th>Status</th>
										<th>Action</th>
									
									</tr>
								</thead>
							<tbody>
							<?php $i=1;?>
							<?php $__currentLoopData = $all_bids; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $userlist1): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
								<tr>
									<td><?php echo e($i); ?></td>
									<td>
									<?php if($userlist1->bid_unique_id==''): ?>
										--
									<?php else: ?>
										<?php echo e(ucfirst($userlist1->bid_unique_id)); ?>

									<?php endif; ?>
									</td>
									<td>
									<?php echo e(ucfirst($userlist1->name)); ?>

									</td>
									<td>
									<?php if($userlist1->product_name==''): ?>
										--
									<?php else: ?>
										<?php echo e(ucfirst($userlist1->product_name)); ?>

									<?php endif; ?>
									
									
									</td>
								    <td>
									<?php if($userlist1->bid_status == '19'): ?>
										--
									
									<?php endif; ?>
									
									
									
									<?php if($userlist1->bid_status != '19'): ?>
									 <?php if($userlist1->bid_price ==''): ?>
										 
									 <?php
										          $amount1 = ($userlist1->quote_price * $userlist1->bid_tax / 100);
												  $totalamount1 = $userlist1->quote_price + $amount1 ;
									 ?>
									  Quoted Price:<?php echo e($totalamount1); ?>(<?php echo e($userlist1->quote_price); ?> INR+<?php echo e($userlist1->bid_tax); ?>% tax)
									 <?php else: ?>
										 <?php
										          $amount1_f = ($userlist1->bid_price * $userlist1->bid_tax / 100);
												  $totalamount1_f = $userlist1->bid_price + $amount1_f ;
										?>
									 
									 
									   Final Price:<?php echo e($totalamount1_f); ?>(<?php echo e($userlist1->bid_price); ?> INR+<?php echo e($userlist1->bid_tax); ?>% tax)
									 <?php endif; ?>
									
									<?php endif; ?>
									</td>
									<td><?php echo e($userlist1->delivery_date); ?></td>
									<td>
									
											<?php if(!empty($userlist1->bid_status)): ?>
												
												
												<?php if($userlist1->bid_status == '3'): ?>
												<button class="status green">Confirmed</button>
												<?php elseif($userlist1->bid_status == '4'): ?>
												<button class="status green">Order Placed</button>
												<?php elseif($userlist1->bid_status == '1'): ?>
												    <?php if($userlist1->bid_shortlisted ==1): ?>
													<button class="status green">Bid Short listed</button>
													<?php else: ?>
													<button class="status green">Bid Placed</button>
															
												    <?php endif; ?>
												 
												<?php elseif($userlist1->bid_status == '5'): ?>
												<button class="status green">Dispatched</button>
												<?php elseif($userlist1->bid_status == '11'): ?>
												<button class="status grey">Requested for Demo <?php if(!empty($userlist1->demo_date)): ?><p style="color:#02b5b8">at <?php echo e(date('d-m-Y H:i',strtotime($userlist1->demo_date))); ?></p><?php endif; ?></button>
												<?php elseif($userlist1->bid_status == '12'): ?>
												<button class="status green">Accepted Final Amount</button>
												<?php elseif($userlist1->bid_status == '13'): ?>
												<button class="status orange">In Production</button>
												<?php elseif($userlist1->bid_status == '14'): ?>
												<button class="status green">In Packing</button>
												<?php elseif($userlist1->bid_status == '15'): ?>
												<button class="status red">Rejected Final Amount</button>
											   <?php elseif($userlist1->bid_status == '16'): ?>
											   <button class="status green">Demo Request Accepted</button>
											   <?php elseif($userlist1->bid_status == '17'): ?>
											   <button class="status red">Demo amendment requested</button>
											   <?php elseif($userlist1->bid_status == '19'): ?>
											   <button class="status grey">Not Interested</button>
											   <?php elseif($userlist1->bid_status == '20'): ?>
											   <button class="status red">Rejected</button>
											    <?php elseif($userlist1->bid_status == '18'): ?>
												<button class="status green"> Demo Completed on <?php if(!empty($userlist1->demo_finished_date)): ?><p style="color:#02b5b8"><?php echo e(date('d-m-Y H:i',strtotime($userlist1->demo_finished_date))); ?></p><?php endif; ?></button>
												<?php endif; ?>
												
											<?php elseif($userlist1->bid_status == '0'): ?>
											<button class="status red">Rejected</button>
											<?php else: ?>
											   <button class="status orange">Pending</button>
											<?php endif; ?>
												
									</td>
									 
									<td>
									 <?php if($userlist1->bid_status == '19'): ?>
									
									
									<?php else: ?>
										 <a style="font-size: 14px;display: flex;flex-direction: row;align-items: center;width: 90px;" class="eye" href="<?php echo e(url('buyers/bid_details/'.$userlist1->id)); ?>"><i class="fa fa-eye" aria-hidden="true"></i> View</a>
									<?php endif; ?>
									 </td>
								</tr>
								<?php $i++;?>
							<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>	
							</tbody>
						</table>
                        </div>
						
                     </div>  
                    <!-- All Bids< End -->
					
					<div id="menu1" class="tab-pane">
                     
						<div class="tableBox wraper">
                            <table id="table_id2" class="display">
								<thead>
									<tr>
										<th>SI No:</th>
										<th>Bid Id</th>
										<th>Vendor Name</th>
										<th>Vendor Product Name</th>
										<th>Quoted Price</th>
										<th>Expected date of delivery</th>
										<th>Status</th>
										<th>Action</th>
										
										
										
									</tr>
								</thead>
							<tbody>
							<?php $i=1;?>
							<?php $__currentLoopData = $all_shortlist; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $userlist2): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
								<tr>
									<td><?php echo e($i); ?></td>
									<td><?php echo e(ucfirst($userlist2->bid_unique_id)); ?></td>
									<td><?php echo e(ucfirst($userlist2->name)); ?></td>
									<td><?php echo e(ucfirst($userlist2->product_name)); ?></td>
									<td>
								<?php if($userlist2->bid_status != '19'): ?>
									 <?php if($userlist2->bid_price ==''): ?>
										 <?php
										  $amount2 = ($userlist2->quote_price * $userlist2->bid_tax / 100);
										  $totalamount2 = $userlist2->quote_price + $amount2 ;
									     ?>
									 
									   Quoted Price:<?php echo e($totalamount2); ?>(<?php echo e($userlist2->quote_price); ?> INR+<?php echo e($userlist2->bid_tax); ?>% tax)
									 <?php else: ?>
										 
									   <?php
										          $amount2_f = ($userlist2->bid_price * $userlist2->bid_tax / 100);
												  $totalamount2_f = $userlist2->bid_price + $amount2_f ;
										?>
									  Final Price:<?php echo e($totalamount2_f); ?>(<?php echo e($userlist2->bid_price); ?> INR+<?php echo e($userlist2->bid_tax); ?>% tax)
									 <?php endif; ?>
								<?php endif; ?>
									 </td>
									 <td><?php echo e($userlist2->delivery_date); ?></td>
									<td>
									
									<?php if(!empty($userlist2->bid_status)): ?>
												<?php if($userlist2->bid_status == '3'): ?>
												   <h6 ><p style="color:#02b5b8">Confirmed</p></h6>
											   <?php elseif($userlist2->bid_status == '1'): ?>
												    <?php if($userlist2->bid_shortlisted ==1): ?>
															<h6 ><p style="color:#02b5b8">Bid Short listed</p></h6>
													<?php else: ?>
														<h6 ><p style="color:#02b5b8">Bid Placed</p></h6>
															
												    <?php endif; ?>
												<?php elseif($userlist2->bid_status == '4'): ?>
												   <h6 ><p style="color:#02b5b8">OrderPlaced</p></h6>
												<?php elseif($userlist2->bid_status == '5'): ?>
												   <h6 ><p style="color:#02b5b8">Dispatched</p></h6>
												<?php elseif($userlist2->bid_status == '11'): ?>
												   <h6 ><p style="color:#02b5b8">Requested for Demo</p> <?php if(!empty($userlist2->demo_date)): ?><p style="color:#02b5b8">at <?php echo e(date('d-m-Y H:i',strtotime($userlist2->demo_date))); ?></p><?php endif; ?></h6>
												<?php elseif($userlist2->bid_status == '12'): ?>
												   <h6 ><p style="color:#02b5b8">Accepted Final Amount</p></h6>
												<?php elseif($userlist2->bid_status == '13'): ?>
												   <h6 ><p style="color:#02b5b8">In Production</p></h6>
												<?php elseif($userlist2->bid_status == '14'): ?>
												   <h6 ><p style="color:v">In Packing</p></h6>
												<?php elseif($userlist2->bid_status == '15'): ?>
												   <h6 ><p style="color:red"> Rejected Final Amount</p></h6>
											   <?php elseif($userlist2->bid_status == '16'): ?>
												   <h6 ><p style="color:#02b5b8"> Demo Request Accepted</p></h6>
											   <?php elseif($userlist2->bid_status == '19'): ?>
												   <h6 ><p style="color:#02b5b8">Not Interested</p></h6>
											   <?php elseif($userlist2->bid_status == '17'): ?>
												   <h6 ><p style="color:red"> Demo Request Rejected</p></h6>
											   <?php elseif($userlist2->bid_status == '18'): ?>
												   <h6 ><p style="color:#02b5b8"> Demo Completed </p><?php if(!empty($userlist2->demo_finished_date)): ?><p style="color:#02b5b8">at <?php echo e(date('d-m-Y H:i',strtotime($userlist2->demo_finished_date))); ?></p><?php endif; ?></h6>
												<?php endif; ?>
												
											<?php elseif($userlist2->bid_status == '0'): ?>
											   <h6 ><p style="color:red">Rejected</p></h6>
											<?php else: ?>
											   <h6 ><p style="color:orange">Pending</p></h6>
											<?php endif; ?>
											
									
									</td>
									
									<td>
									
									 <?php if($userlist2->bid_status == '19'): ?>
									 
									 <?php else: ?>
										 <a  class="eye" href="<?php echo e(url('buyers/bid_details/'.$userlist2->id)); ?>"><i class="fa fa-eye" aria-hidden="true"></i> View</a>
									 <?php endif; ?>
									 </td>
									
								</tr>
								<?php $i++;?>
							<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>	
							</tbody>
						</table>
                        </div>
						
                     </div>  
                    <!-- Shortlisted Quote End -->
					
					<div id="menu2" class="tab-pane">
                     
						<div class="tableBox wraper">
                            <table id="table_id3" class="display">
								<thead>
									<tr>
										<th>SI No:</th>
										<th>Bid Id</th>
										<th>Vendor Name</th>
										<th>Vendor Product Name</th>
										<th>Quoted Price</th>
										<th>Expected date of delivery</th>
										<th>Status</th>
										<th>Action</th>
									
										
									</tr>
								</thead>
							<tbody>
							<?php $i=1;?>
							<?php $__currentLoopData = $all_reject; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $userlist3): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
								<tr>
									<td><?php echo e($i); ?></td>
									<td>
									<?php if($userlist3->bid_unique_id==''): ?>
										--
									<?php else: ?>
										<?php echo e(ucfirst($userlist3->bid_unique_id)); ?>

									<?php endif; ?>
									
									
									</td>
									<td><?php echo e(ucfirst($userlist3->name)); ?></td>
									<td>
									<?php if($userlist3->bid_unique_id==''): ?>
										--
									<?php else: ?>
										<?php echo e(ucfirst($userlist3->product_name)); ?>

									<?php endif; ?>
									
									</td>
									 <td><?php echo e($userlist3->delivery_date); ?></td>
									<td>
									<?php if($userlist3->bid_status != '19'): ?>
									 <?php if($userlist3->bid_price ==''): ?>
										<?php
										          $amount3 = ($userlist3->quote_price * $userlist3->bid_tax / 100);
												  $totalamount3 = $userlist3->quote_price + $amount3 ;
									 ?> 
									 

									  Quoted Price: <?php echo e($totalamount3); ?><?php echo e($userlist3->quote_price); ?> INR+<?php echo e($userlist3->bid_tax); ?>% tax
									 <?php else: ?>
										  <?php
										          $amount3_f = ($userlist3->bid_price * $userlist3->bid_tax / 100);
												  $totalamount3_f = $userlist3->bid_price + $amount3_f ;
										?>
									 
									 
									  Final Price:<?php echo e($totalamount3_f); ?><?php echo e($userlist3->bid_price); ?> INR+<?php echo e($userlist3->bid_tax); ?>% tax
									 <?php endif; ?>
									<?php endif; ?>
									</td>
									<td><h6 ><p style="color:red">Rejected</p></h6>
										
									</td>
									
									<td>
									 <?php if($userlist3->bid_status == '19'): ?>
									
									 
									<?php else: ?>
										 <a  class="eye" href="<?php echo e(url('buyers/bid_details/'.$userlist3->id)); ?>"><i class="fa fa-eye" aria-hidden="true"></i> View</a>
								    <?php endif; ?>


									  </td>
								</tr>
								<?php $i++;?>
							<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>	
							</tbody>
						</table>
                        </div>
					
                     </div>  
                    <!--Rejected Quote End -->
                 
                     
                    <div class="clear"></div>
                </div>
                <!--tab-content End -->
            </div>
            <!--custom-tabs End -->
        </div>
        <!--boxings End -->
    </div>
    <!--page-content End -->
    
    
<!--</div>-->
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.23/js/jquery.dataTables.js"></script>
<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: "error",
            showCancelButton: false,
            dangerMode: true,
            confirmButtonText: 'OK',

        });
    <?php endif; ?>

$(document).ready( function () {
    $('#table_id1').DataTable();
	$('#table_id2').DataTable();
	$('#table_id3').DataTable();
} );
</script>  
<?php $__env->stopSection(); ?>

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