File "order.php"

Full Path: /home/krishnamexports/public_html/panel/pages/pincode/order.php
File size: 22.04 KB
MIME-type: text/x-php; charset=us-ascii
Charset: utf-8

<?php include("popup/deliveryProcess.php");?>

<div id="newOrder" style="display:none;">

    <a href="javascript:void(0);" data-toggle="modal" data-target="#deliveryProcess"  class="btn btn-primary btn-labeled btn-labeled-left btn-lg orderApproved"><b><i class="icon-printer4 "></i></b> Order Approved</a> 

<br /><br />

</div>



<div id="approvedOrder" style="display:none;">

    <a href="javascript:void(0);" class="btn btn-primary btn-labeled btn-labeled-left btn-lg orderPacked"><b><i class="icon-printer4 "></i></b> Order Packed</a> 

<br /><br />

</div>



<div id="packedOrder" style="display:none;">

    <a href="javascript:void(0);" class="btn btn-primary btn-labeled btn-labeled-left btn-lg orderDispatch"><b><i class="icon-printer4 "></i></b> Order Dispatch</a>             

<br /><br />

</div> 



<div id="dispatchOrder" style="display:none;">

    <a href="javascript:void(0);" class="btn btn-primary btn-labeled btn-labeled-left btn-lg orderPicked"><b><i class="icon-printer4 "></i></b> Order Picked</a>             

<br /><br />

</div>



<div id="deliveredOrder" style="display:none;">

    <a href="javascript:void(0);" class="btn btn-primary btn-labeled btn-labeled-left btn-lg orderDelivered"><b><i class="icon-printer4 "></i></b> Order Delivered</a>             

<br /><br />

</div> 

        

<div class="col-lg-12 grid-margin stretch-card">

  <div class="card">

    <div class="card-body">            	

        <h4 class="card-title">Order List</h4>

        <ul class="nav nav-tabs nav-tabs-solid nav-justified bg-light">

            <li class="nav-item"><a href="#solid-bordered-justified-tab1" class="nav-link active" data-toggle="tab">Placed(<?php echo pendingOrder();?>)</a></li>

            <li class="nav-item"><a href="#solid-bordered-justified-tab2" class="nav-link" data-toggle="tab">Approved(<?php echo approvedOrder();?>)</a></li>

            <li class="nav-item"><a href="#solid-bordered-justified-tab3" class="nav-link" data-toggle="tab">Packed(<?php echo packedOrder();?>)</a></li>

            <li class="nav-item"><a href="#solid-bordered-justified-tab4" class="nav-link" data-toggle="tab">Ready For Dispatch(<?php echo dispatchOrder();?>)</a></li>

            <li class="nav-item"><a href="#solid-bordered-justified-tab5" class="nav-link" data-toggle="tab">Picked(<?php echo pickedOrder();?>)</a></li>

            <li class="nav-item"><a href="#solid-bordered-justified-tab6" class="nav-link" data-toggle="tab">Delivered (<?php echo deliveredOrder();?>)</a></li>                    

        </ul>



        <div class="tab-content">

            <div class="tab-pane fade show active" id="solid-bordered-justified-tab1">

                <div class="table-responsive">

                    <table class="table table-striped">

                      <thead>

                            <tr>

                                <th width="10%">Action</th>

                                <th width="13%">Order Date</th>

                                <th width="13%">Invoice Id</th>                                                               

                                <th width="30%">Product Name</th>

                                <th width="13%">Order Total</th>

                                <th width="15%" >Order Detail</th>                                                    

                            </tr>                                               		

                      </thead>

                      <tbody>

                      <?php						

                        $sqlBusiness = mysqli_query($cn,"select * from `tbl_order` where `status`=0 group by `order_id` order by `date` DESC ");

                        while($sqlBusinessData = mysqli_fetch_array($sqlBusiness))

                        { 														

                            $sqlquery     = mysqli_query($cn,"select * from `tbl_order` where `order_id`='".$sqlBusinessData['order_id']."'");                                                       							

                            $productCount = mysqli_num_rows($sqlquery); 							

                            ?>

                            <tr>

                                <td>                       

                                    <div class="form-check form-check-flat">

                                        <label class="form-check-label">

                                            <input type="checkbox" class="form-check-input newOrder" name="newinvoice_no[]" value="<?php echo $sqlBusinessData['order_id'];?>">

                                        </label>

                                    </div>

                                </td> 

                                <td><?php echo date('d M, Y',strtotime($sqlBusinessData['date']));?></td>

                                <td style="text-align:center;"><a href="javascript:void(0);"><?php echo str_pad($sqlBusinessData['order_id'], 4, "0", STR_PAD_LEFT);?></a></td>                                                                

                                <td>

                                    <a href="javascript:void(0);"><?php echo $sqlBusinessData['product_name'];?></a>

                                    <?php if($productCount>1){?><br /><span>+<?php echo $productCount-1;?> More Product</span><?php }?>

                                </td>                    

                                <td>&#x20B9;<?php echo $sqlBusinessData['order_total'];?></span></td>

                                <td><a href="home.php?pages=orderInvoice&order_id=<?php echo $sqlBusinessData['order_id'];?>" class="btn btn-primary btn-labeled btn-labeled-left btn-lg" target="_blank"><b><i class="icon-printer4 "></i></b> View Detail</a></span></td>                                

                            </tr>

                        <?php }?>

                      </tbody>

                    </table>

          		</div>

            </div>

            

            <div class="tab-pane fade show" id="solid-bordered-justified-tab2">

                <div class="table-responsive">

                	<table class="table table-striped">

                  <thead>

                        <tr>

                            <th width="10%">Action</th>

                            <th width="13%">Order Date</th>

                            <th width="13%">Invoice Id</th>                                                               

                            <th width="30%">Product Name</th>

                            <th width="13%">Order Total</th>

                            <th width="15%" >Order Detail</th>                                                    

                        </tr>                                               		

                  </thead>

                  <tbody>

                  <?php						

                    $sqlBusiness = mysqli_query($cn,"select * from `tbl_order` where `status`=1 group by `order_id` order by `date` DESC ");

                    while($sqlBusinessData = mysqli_fetch_array($sqlBusiness))

                    { 														

                        $sqlquery     = mysqli_query($cn,"select * from `tbl_order` where `order_id`='".$sqlBusinessData['order_id']."'");                                                       							

                        $productCount = mysqli_num_rows($sqlquery); 							

                        ?>

                        <tr>

                            <td>

                                <div class="form-check form-check-flat">

                                    <label class="form-check-label">

                                        <input type="checkbox" class="form-check-input approvedOrder" name="approvedinvoice_no[]" value="<?php echo $sqlBusinessData['order_id'];?>">

                                    </label>

                                </div>

                            </td> 

                            <td><?php echo date('d M, Y',strtotime($sqlBusinessData['date']));?></td>

                            <td style="text-align:center;"><a href="javascript:void(0);"><?php echo str_pad($sqlBusinessData['order_id'], 4, "0", STR_PAD_LEFT);?></a></td>                                                                

                            <td>

                                <a href="javascript:void(0);"><?php echo $sqlBusinessData['product_name'];?></a>

                                <?php if($productCount>1){?><br /><span>+<?php echo $productCount-1;?> More Product</span><?php }?>

                            </td>                    

                            <td>&#x20B9;<?php echo $sqlBusinessData['order_total'];?></span></td>

                            <td><a href="home.php?pages=orderInvoice&order_id=<?php echo $sqlBusinessData['order_id'];?>" class="btn btn-primary btn-labeled btn-labeled-left btn-lg" target="_blank"><b><i class="icon-printer4 "></i></b> View Detail</a></span></td>                                

                        </tr>

                    <?php }?>

                  </tbody>

                </table>

          		</div>

            </div> 

            

            <div class="tab-pane fade show" id="solid-bordered-justified-tab3">

                <div class="table-responsive">

                	<table class="table table-striped">

                  <thead>

                        <tr>

                            <th width="10%">Action</th>

                            <th width="13%">Order Date</th>

                            <th width="13%">Invoice Id</th>                                                               

                            <th width="30%">Product Name</th>

                            <th width="13%">Order Total</th>

                            <th width="15%" >Order Detail</th>                                                    

                        </tr>                                               		

                  </thead>

                  <tbody>

                  <?php						

                    $sqlBusiness = mysqli_query($cn,"select * from `tbl_order` where `status`=2 group by `order_id` order by `date` DESC ");

                    while($sqlBusinessData = mysqli_fetch_array($sqlBusiness))

                    { 														

                        $sqlquery     = mysqli_query($cn,"select * from `tbl_order` where `order_id`='".$sqlBusinessData['order_id']."'");                                                       							

                        $productCount = mysqli_num_rows($sqlquery); 							

                        ?>

                        <tr>

                            <td>

                            	<div class="form-check form-check-flat">

                                    <label class="form-check-label">

                                        <input type="checkbox" class="form-check-input packedOrder" name="packedinvoice_no[]" value="<?php echo $sqlBusinessData['order_id'];?>">

                                    </label>

                                </div>

                            </td> 

                            <td><?php echo date('d M, Y',strtotime($sqlBusinessData['date']));?></td>

                            <td style="text-align:center;"><a href="javascript:void(0);"><?php echo str_pad($sqlBusinessData['order_id'], 4, "0", STR_PAD_LEFT);?></a></td>                                                                

                            <td>

                                <a href="javascript:void(0);"><?php echo $sqlBusinessData['product_name'];?></a>

                                <?php if($productCount>1){?><br /><span>+<?php echo $productCount-1;?> More Product</span><?php }?>

                            </td>                    

                            <td>&#x20B9;<?php echo $sqlBusinessData['order_total'];?></span></td>

                            <td><a href="home.php?pages=orderInvoice&order_id=<?php echo $sqlBusinessData['order_id'];?>" class="btn btn-primary btn-labeled btn-labeled-left btn-lg" target="_blank"><b><i class="icon-printer4 "></i></b> View Detail</a></span></td>                                

                        </tr>

                    <?php }?>

                  </tbody>

                </table>

              	</div>

            </div> 

            

            <div class="tab-pane fade show" id="solid-bordered-justified-tab4">

                <div class="table-responsive">

                <table class="table table-striped">

                  <thead>

                        <tr>

                            <th width="10%">Action</th>

                            <th width="13%">Order Date</th>

                            <th width="13%">Invoice Id</th>                                                               

                            <th width="30%">Product Name</th>

                            <th width="13%">Order Total</th>

                            <th width="15%" >Order Detail</th>                                                    

                        </tr>                                               		

                  </thead>

                  <tbody>

                  <?php						

                    $sqlBusiness = mysqli_query($cn,"select * from `tbl_order` where `status`=3 group by `order_id` order by `date` DESC ");

                    while($sqlBusinessData = mysqli_fetch_array($sqlBusiness))

                    { 														

                        $sqlquery     = mysqli_query($cn,"select * from `tbl_order` where `order_id`='".$sqlBusinessData['order_id']."'");                                                       							

                        $productCount = mysqli_num_rows($sqlquery); 							

                        ?>

                        <tr>

                            <td>

                                <div class="form-check form-check-flat">

                                    <label class="form-check-label">

                                        <input type="checkbox" class="form-check-input dispatchOrder" name="dispatchinvoice_no[]" value="<?php echo $sqlBusinessData['order_id'];?>">

                                    </label>

                                </div>                        

                            </td> 

                            <td><?php echo date('d M, Y',strtotime($sqlBusinessData['date']));?></td>

                            <td style="text-align:center;"><a href="javascript:void(0);"><?php echo str_pad($sqlBusinessData['order_id'], 4, "0", STR_PAD_LEFT);?></a></td>                                                                

                            <td>

                                <a href="javascript:void(0);"><?php echo $sqlBusinessData['product_name'];?></a>

                                <?php if($productCount>1){?><br /><span>+<?php echo $productCount-1;?> More Product</span><?php }?>

                            </td>                    

                            <td>&#x20B9;<?php echo $sqlBusinessData['order_total'];?></span></td>

                            <td><a href="home.php?pages=orderInvoice&order_id=<?php echo $sqlBusinessData['order_id'];?>" class="btn btn-primary btn-labeled btn-labeled-left btn-lg" target="_blank"><b><i class="icon-printer4 "></i></b> View Detail</a></span></td>                                

                        </tr>

                    <?php }?>

                  </tbody>

                </table>

          		</div>

            </div> 

            

            <div class="tab-pane fade show" id="solid-bordered-justified-tab5">

                <div class="table-responsive">

                <table class="table table-striped">

                  <thead>

                        <tr>

                            <th width="10%">Action</th>

                            <th width="13%">Order Date</th>

                            <th width="13%">Invoice Id</th>                                                               

                            <th width="30%">Product Name</th>

                            <th width="13%">Order Total</th>

                            <th width="15%" >Order Detail</th>                                                    

                        </tr>                                               		

                  </thead>

                  <tbody>

                  <?php						

                    $sqlBusiness = mysqli_query($cn,"select * from `tbl_order` where `status`=4 group by `order_id` order by `date` DESC ");

                    while($sqlBusinessData = mysqli_fetch_array($sqlBusiness))

                    { 														

                        $sqlquery     = mysqli_query($cn,"select * from `tbl_order` where `order_id`='".$sqlBusinessData['order_id']."'");                                                       							

                        $productCount = mysqli_num_rows($sqlquery); 							

                        ?>

                        <tr>

                            <td>

                                <div class="form-check form-check-flat">

                                    <label class="form-check-label">

                                        <input type="checkbox" class="form-check-input deliveredOrder" name="deliveredinvoice_no[]" value="<?php echo $sqlBusinessData['order_id'];?>">

                                    </label>

                                </div>                        

                            </td> 

                            <td><?php echo date('d M, Y',strtotime($sqlBusinessData['date']));?></td>

                            <td style="text-align:center;"><a href="javascript:void(0);"><?php echo str_pad($sqlBusinessData['order_id'], 4, "0", STR_PAD_LEFT);?></a></td>                                                                

                            <td>

                                <a href="javascript:void(0);"><?php echo $sqlBusinessData['product_name'];?></a>

                                <?php if($productCount>1){?><br /><span>+<?php echo $productCount-1;?> More Product</span><?php }?>

                            </td>                    

                            <td>&#x20B9;<?php echo $sqlBusinessData['order_total'];?></span></td>

                            <td><a href="home.php?pages=orderInvoice&order_id=<?php echo $sqlBusinessData['order_id'];?>" class="btn btn-primary btn-labeled btn-labeled-left btn-lg" target="_blank"><b><i class="icon-printer4 "></i></b> View Detail</a></span></td>                                

                        </tr>

                    <?php }?>

                  </tbody>

                </table>

          		</div>

            </div>

            

            <div class="tab-pane fade show" id="solid-bordered-justified-tab6">

                <div class="table-responsive">

                <table class="table table-striped">

                  <thead>

                        <tr>                       

                            <th width="13%">Order Date</th>

                            <th width="13%">Invoice Id</th>                                                               

                            <th width="30%">Product Name</th>

                            <th width="13%">Order Total</th>

                            <th width="15%" >Order Detail</th>                                                    

                        </tr>                                               		

                  </thead>

                  <tbody>

                  <?php						

                    $sqlBusiness = mysqli_query($cn,"select * from `tbl_order` where `status`=5 group by `order_id` order by `date` DESC ");

                    while($sqlBusinessData = mysqli_fetch_array($sqlBusiness))

                    { 														

                        $sqlquery     = mysqli_query($cn,"select * from `tbl_order` where `order_id`='".$sqlBusinessData['order_id']."'");                                                       							

                        $productCount = mysqli_num_rows($sqlquery); 							

                        ?>

                        <tr>                        

                            <td><?php echo date('d M, Y',strtotime($sqlBusinessData['date']));?></td>

                            <td style="text-align:center;"><a href="javascript:void(0);"><?php echo str_pad($sqlBusinessData['order_id'], 4, "0", STR_PAD_LEFT);?></a></td>                                                                

                            <td>

                                <a href="javascript:void(0);"><?php echo $sqlBusinessData['product_name'];?></a>

                                <?php if($productCount>1){?><br /><span>+<?php echo $productCount-1;?> More Product</span><?php }?>

                            </td>                    

                            <td>&#x20B9;<?php echo $sqlBusinessData['order_total'];?></span></td>

                            <td><a href="home.php?pages=orderInvoice&order_id=<?php echo $sqlBusinessData['order_id'];?>" class="btn btn-primary btn-labeled btn-labeled-left btn-lg" target="_blank"><b><i class="icon-printer4 "></i></b> View Detail</a></span></td>                                

                        </tr>

                    <?php }?>

                  </tbody>

                </table>

          		</div>

            </div>                 

        </div>

    </div>                

  </div>

</div>

<style>

.nav-tabs .nav-link {

    border: 1px solid transparent;

    border-top-left-radius: 0.15rem;

    border-top-right-radius: 0.15rem;

}

.nav-link {

    display: block;

    padding: 1rem 0.5rem;

}

.form-check .form-check-label {

    font-size: 13px;

    line-height: 1.9;

}

.form-check .form-check-label input:checked + .input-helper::after {

    width: 18px;

    opacity: 1;

    line-height: 0px;

    filter: alpha(opacity=100);

    -webkit-transform: scale(1);

    -ms-transform: scale(1);

    -o-transform: scale(1);

    transform: scale(1);

}

</style>