\!/ KyuuKazami \!/

Path : /home/kohli/public_html/application/views/admin/reports/
Upload :
Current File : /home/kohli/public_html/application/views/admin/reports/inventory_ordered.php

<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-midnightblue">
                <div class="panel-heading">
                    <h4>Search By</h4>
                </div>
                <div class="panel-body">
                    <div class="row">
                        <?php echo $this->load->view("admin/reports/_report_search",$search_data); ?>
                    </div>
                </div>
            </div>
            <div class="panel panel-midnightblue">
                <div class="panel-heading">
                    <h4>Order Reports</h4>
                </div>
                <div class="panel-body">
                    <?php
                    $this->load->view("admin/messages");
                    
                    $this->common_lib->render_modal_window("Add Vendor Order","vendor_order_modal");                                        
                    ?>
                    <script type="text/javascript">
                        $(function(){
                            $(".open-vendor-order").on("click",function(e){                                
                                e.preventDefault();
                                var uid = $(this).data('id');
                                $.getJSON('<?php echo site_url("admin/ajax/vendor_order_form") ?>',{token:uid}, function(response){                                    
                                    $('#vendor_order_modal').modal('show', {backdrop: 'static'});                            
                                    $('#vendor_order_modal .modal-body').html(response.html);
                                });
                            });
                        });
                    </script>
                    <div class="row">
                        <div class="col-md-12">
                            <form class="form-horizontal">
                                <div class="table-responsive">
                                    <table class="table table-condensed" id="inventory-list">
                                        <thead>
                                            <tr>
                                                <th>Order ID</th>                                                  
                                                <th>Item Name</th>
                                                <th>Order Date</th>
                                                <th>Price</th>
                                                <?php
                                                $general_settings = $this->common_lib->get_product_setting("show_required_date",true);
                                                if($general_settings->show_required_date == 1){
                                                    ?>
                                                    <th>Required / Promising / Performance Date</th>
                                                    <?php
                                                }
                                                ?>                                                
                                                <th>Total Shipped</th>
                                                <th>Item Ordered</th>
                                                <th>Item on Hand</th>
                                                <th>Request from V.</th>
                                                <th>Available</th>                                                
                                            </tr>
                                        </thead>                                        
                                        <tbody>
                                            <?php          
                                            $total_sub_total = 0;         
                                            foreach($inventory_reports as $row){             
                                                $total_sub_total += $this->common_lib->fSafeNum($row->price);           
                                                $this->load->view("admin/reports/_order_item_row",array("row" => $row));
                                            }
                                            ?>
                                            <tr class="warning">
                                                <th colspan="3" class="text-right">TOTAL</th>
                                                <th><?php echo $this->common_lib->currency_price($total_sub_total); ?></th>                                                    
                                                <th colspan="7"></th>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>                                
                            </form>
                        </div>
                    </div>                    
                </div>
            </div>
        </div>
    </div>
</div>

@KyuuKazami