<style>
    .mouse-cursor{

    }
</style>  
<div class="wrapper">
    <div class="container">
        <!-- Page-Title -->
        <div class="row">
            <div class="col-sm-12">
                <h4 class="page-title">Dispatch Note</h4>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                
                <div class="panel panel-default">
                    <div class="panel-head">
                        <div class="row">
                            <div class="col-md-12">
                                
                            </div>
                        </div>
                    </div>
                    <?php if(sizeof($dispatch_note)>0){?>
                    <div class="panel-body">
                        <div class="row">
                           <div class="pull-left">
                                    <h3 class="logo invoice-logo"><?php if (isset($business)) {
                                        echo "<img src='" . base_url() . 'assets/images/business/' . $business[0]['business_logo'] . "' alt='" . $business[0]['business_name'] . "' class='img-responsive' />";
                                    } else {
                                        echo 'Skedwise';
                                    } ?></h3>
                                </div>
                            <div class="pull-right">
                                <h4 >
                                    <strong id="Dispatch Note ID">  <?php echo $dispatch_note[0]->id_dispatch_note; ?></strong>
                                </h4>

                                <table class="table" style="border:1px solid #fff;">
                                    <tr>
                                        <td>Branch</td>
                                        <td><?php echo $this->session->userdata('business'); ?></td>
                                    </tr>
                                    <tr>
                                        <td>Print Date:</td>

                                        <td><b> <?php echo date('d-m-Y H:i:s'); ?></b></td>
                                    </tr>
                                    <tr>
                                        <td>For:</td>
                                        <td><b><?php echo $dispatch_note[0]->customer_name; ?></b></td>
                                    </tr>
                               

                                </table>
                            </div>
                        </div>
                        
                        <div class="row" style="color:#000 !important">
                            <div class="col-md-12">
                                <div class="row">
                                    <table class="table">
                                        <thead>
                                            <tr>
                                                <th>DN ID</th>
                                                <th>Visit ID</th>
                                                <th>Customer</th>
                                                <th>Service</th>                                                    
                                                <th>Staff</th>  
                                                <th>Product</th>  
                                                <th>Dispatch Qty</th>
                                                <th>Unit Type</th>
                                                <th>Measure</th>
                                                <th></th>
                                                <th>On</th>
                                                <th>By</th>
                                                <th>Status</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php foreach($dispatch_note as $dn){?>
                                            <tr>
                                                <td>
                                                    <?php echo $dn->id_dispatch_note;?>
                                                </td>
                                                <td>
                                                    <?php echo $dn->id_customer_visits;?>
                                                </td>
                                                <td>
                                                    <?php echo $dn->customer_name;?>
                                                </td>
                                                <td>
                                                    <?php echo $dn->service_name;?>
                                                </td>
                                                <td>
                                                    <?php echo $dn->staff_fullname;?>
                                                </td>
                                                <td>
                                                    <?php echo $dn->product;?>
                                                </td>
                                                <td>
                                                    <?php echo $dn->dispatch_qty;?>
                                                </td>
                                                <td>
                                                    <?php echo $dn->unit_type;?>
                                                </td>
                                                <td>
                                                    <b>
                                                    <?php echo $dn->dispatch_measure;?>
                                                    </b>
                                                </td>
                                                <td>
                                                    <b>
                                                    <?php echo $dn->measure_unit;?>
                                                    </b>
                                                </td>
                                                <td>                                                
                                                    <?php echo date_format(date_create($dn->dispatch_date), 'd-m-Y H:i:s'); ?>
                                                </td>
                                                <td>
                                                    <?php echo $dn->created_by;?>
                                                </td>
                                                <td class="text-danger"><b><?php echo $dn->status; ?></b></td>
                                            </tr>
                                            <?php } ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                        
                    
                    <!-- end row -->
               
                        <div class="row m-t-40" style="color:#000 !important">

                            <div class="col-md-12 col-sm-12 col-xs-12 m-t-40">
                                <table class='' style='border:none !important; width:100%; text-align: center; color:#000;'>
                                    <tr>
                                        <td>________________________________</td>
                                        <td>________________________________</td>
                                        <td>________________________________</td>
                                        <td>________________________________</td>
                                    </tr>
                                    <tr>
                                        <td>PREPARED BY </td>
                                        <td>CHECKED BY </td>
                                        <td>APPROVED BY </td>
                                        <td>RECEIVED BY </td>
                                    </tr>
                                </table>

                            </div>
                        </div>
                    </div>
                    <div class="panel-footer hidden-print ">
                        <div class="row">
                            <div class="col-md-12">
                            <a href="javascript:window.print()" class="btn btn-inverse waves-effect waves-light pull-right" id="btnprint"><i class="fa fa-print"></i></a>                            
                            </div>
                        </div>
                    </div>
                    <?php } else {?>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-md-12">
                                    <h4>Nothing Dispatched Yet!</h4>
                                </div>
                            </div>
                        </div>
                    <?php } ?>
                </div>  <!--end panel-->
            </div>
        </div>

    </div>
    <!-- end row -->

    <script>






    </script>
