<style>
    .details-vendor ul li > div:first-child {
    width: 160px !important;
}
    
    
    .details-vendor {
    margin-bottom: 5px;
}
</style>



<?php $__env->startSection('content'); ?>
<div class="common-content">
          <div class="page-content">
                <div class="page-heading">
                    <div class="headings">
                        <h6>My Orders</h6>
                    </div>
                </div>
              
                <div class="dashboard-cnts">
                    <div class="row">
                        <div class="col-12">
                            <div class="search-bar order-search"> 
                                 <div class="form-group has-search">
                                    <span class="fa fa-search form-control-feedback"></span>
                                    <input type="text" class="form-control search" placeholder="Search">
                                  </div>
                              </div>
                              
                            <?php if(count($my_orders) > 0): ?>
                            <?php $__currentLoopData = $my_orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$myorders): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php if(($myorders->bid_status == '4') || ($myorders->bid_status == '5') || ($myorders->bid_status == '13') || ($myorders->bid_status == '14')): ?>
				<?php  if(date('Y-m-d') == date('Y-m-d',strtotime($myorders->bidCreated))) {?>
                            <div class="boxings recently-add">
				<?php }else{ ?>
				<div class="boxings">
				<?php } ?>
                                <div class="product-order">
                                    <div style="width: 100px; border: 1px solid #ddd;height: 100px;text-align: center;">
                                        <?php $__currentLoopData = $vendorproducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $vproducts): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <?php //print_r($vproducts->photo); ?>
                                                <?php if($vproducts->product_id == $myorders->vendor_product_id): ?>
                                                    <?php if(!empty($vproducts->photo)): ?>
                                                        <img src="<?php echo e(url('product_files')); ?>/<?php echo e($vproducts->photo); ?>">
                                                    <?php else: ?>
                                                        <img src="<?php echo e(url('assets/images/1200px-No-Image-Placeholder.svg.png')); ?>">
                                                    <?php endif; ?>
                                                <?php endif; ?>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </div>
                                    <div>
                                        <div class="new-pro">
                                            <div class="roduct-details-f">
                                                <div class="row">
                                                    <div class="col-md-6">
                                                       <h6 class="master-heading" >Master Product : <span><?php echo e($myorders->product_name); ?></span></h6>
                                                    </div>
                                                    <div class="col-md-6 ">
                                                       <h6 class="text-right" > Product : <span>
                                                     <?php $__currentLoopData = $vendorproducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $vproducts): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                     <?php if($vproducts->product_id == $myorders->vendor_product_id): ?>
                                                     <?php echo e($vproducts->product_name); ?>

                                                     <?php endif; ?>
                                                     <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                     </span></h6>
                                                    </div>
                                                    
                                                </div>
                                            </div>
                                            <div class="w-100  mt-2">
                                                <div class="delivery-date pl-0">
                                                        <span><b>Ordered on <?php echo e(date('d-m-Y',strtotime($myorders->bidCreated))); ?></b></span>
                                                    </div>
                                            </div>
                                            <div class="date-status row" style="margin: 10px -15px;">
                                                <div class="col-md-6">
                                                        <p class="Product-id">ID  <span class="id-m"> <?php $__currentLoopData = $vendorproducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $vproducts): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                     <?php if($vproducts->product_id == $myorders->vendor_product_id): ?>
                                                     <?php echo e($vproducts->product_code); ?>

                                                     <?php endif; ?>
                                                     <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></span></p>
                                                 </div>
                                                <div class="delivery col-md-6">
                                                    <div class="status red">
                                                    
                                                    </div>
<!--
                                                    <div class="delivery-date">
                                                        <span>Ordered on <?php echo e(date('d-m-Y',strtotime($myorders->bidCreated))); ?></span>
                                                    </div>
-->
                                                </div>
                                            </div>
                                        </div>
                                        <div class="product-flex new-pro">
                                            <div>
                                                <div class="details-vendor">
                                                    <ul>
                                                        <!-- <li>
                                                            <div class="specss">
                                                                Specifications
                                                            </div>
                                                            <div>:
                                                            </div>
                                                            <div>
                                                                <span>Angles : 0°, 30°, 45° and 70°<br>Diameters : 2.7 mm and 4 mm</span>
                                                            </div>
                                                        </li> -->
                                                        <li>
                                                            <div class="specss">
                                                               <b> Seller</b>
                                                            </div>
                                                            <div>:
                                                            </div>
                                                            <div>
                                                                <span><?php echo e($myorders->name); ?></span>
                                                            </div>
                                                            
                                                            
                                                        </li>
                                                        <li>
                                                            <div class="specss">
                                                                <b> Product Description</b>
                                                            </div>
                                                            <div>:
                                                            </div>
                                                            <div>
                                                                <span>
                                                                    <?php $__currentLoopData = $vendorproducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $vproducts): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                        <?php if($vproducts->product_id == $myorders->vendor_product_id): ?>
                                                                            <?php echo e($vproducts->product_description); ?>

                                                                        <?php endif; ?>
                                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                </span>
                                                            </div>
                                                            
                                                            
                                                        </li>
                                                    </ul>
                                                </div>
                                               
                                            </div>
                                            
                                        </div>
                                        <div class="product-flex new-pro">
                                         <?php if(!empty($myorders->bid_price)): ?>
						                      <div>
                                                <div class="amount" style="margin: 15px 0;">
                                                    <?php 
                                                    $amount = ($myorders->bid_price * $myorders->bid_tax / 100); 
                                                    $totalamount = $myorders->bid_price + $amount ;
                                                    ?>
                                                    <span><?php echo e($totalamount); ?>(<?php echo e($myorders->bid_price); ?> INR + <?php echo e($myorders->bid_tax); ?>% tax)</span>
                                                </div>
                                            </div>
                                            <?php else: ?>
                                            <div>
                                                <div class="amount" style="margin: 15px 0;">
                                                    <?php 
                                                    $amount = ($myorders->quote_price * $myorders->bid_tax / 100); 
                                                    $totalamount = $myorders->quote_price + $amount ;
                                                    ?>
                                                    <span><?php echo e($totalamount); ?>(<?php echo e($myorders->quote_price); ?> INR + <?php echo e($myorders->bid_tax); ?>% tax)</span>
                                                </div>
                                            </div>
                                          <?php endif; ?>
						                  <div>
                                            <?php if($myorders->bid_status == '3'): ?>
                                                <div class="dispatch-details">
                                                    <span style="color:#0abcb1" class="specss2">Your Order is Confirmed</span>
                                                </div>
                                            <?php elseif( $myorders->bid_status == '4'): ?>
                                                <div class="dispatch-details">
                                                    <span style="color:#0398d5" class="specss2">Placed order to <?php echo e($myorders->name); ?></span>
                                                </div>
                                            <?php elseif( $myorders->bid_status == '13'): ?>
                                                <div class="dispatch-details">
                                                    <span style="color:#0398d5" class="specss2">Your Order is In Production</span>
                                                </div>
                                            <?php elseif( $myorders->bid_status == '14'): ?>
                                                <div class="dispatch-details">
                                                    <span style="color:#0398d5" class="specss2">Your Order is In Packaging</span>
                                                </div>
                                            <?php elseif($myorders->bid_status == '5'): ?>
                                                <div class="dispatch-details">
                                                    <span style="color:#0398d5"><span style="color:#111;" class="specss2">Dispatched From</span><span class="coln" >:</span> <?php echo e($myorders->name); ?></span><br>
                                                   
                                                </div>
                                            <?php endif; ?>
											<div class="dispatch-details">
                                                    <span style="color:#0abcb1"><span style="color:#111;" class="specss2">Expected delivery on</span> <span class="coln" >:</span> <?php echo e($myorders->delivery_date); ?></span>
                                            </div>
											
                                                <div class="ratingss">
                                                    <span class="fa fa-star" aria-hidden="true"></span>
                                                    <span class="fa fa-star" aria-hidden="true"></span>
                                                    <span class="fa fa-star" aria-hidden="true"></span>
                                                    <span class="fa fa-star" aria-hidden="true"></span>
                                                    <span class="fa fa-star" aria-hidden="true"></span>
                                                </div>
                                                
                                                <?php $__currentLoopData = $registersoldlist; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sold): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <?php if($sold->buyer_id == Auth::user()->id && $sold->product_id == $myorders->vendor_product_id && $sold->bid_id == $myorders->bidId): ?>
												<a class="approve-product" href="<?php echo e(url('/buyers/asset_management/1')); ?>">Approve New Product</a>
												<?php endif; ?>
												<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </div>
                                        </div>
                                        
                                    </div>
                                </div>
                                
                            </div>
                            <?php endif; ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php else: ?>
                            <div class="col-lg-12 col-md-6 col-sm-12 col-xs-12">
                            <div class="product-display">
                                <ul>
                                    <li>
                                        <div class="details">
                                            <div>
                                                <h6>
                                                No Orders available
                                                </h6>
                                            </div>
                                            
                                           
                                        </div>
                                    </li>
                                    
                                  
                                </ul>
                            </div>
                        </div>
                        <?php endif; ?>
                            
                        </div>
                    </div>
                </div>
          </div>
<?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: "error",
        showCancelButton: false,
        dangerMode: true,
        confirmButtonText: 'OK',

    });
<?php endif; ?>
</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/order_lists.blade.php ENDPATH**/ ?>