<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal">&times;</button>
    <h4 class="modal-title">Invoice</h4>
</div>
<div class="modal-body  widthpersent100 pull-left">
    <div class="widthpersent100 pull-left">
        <div class="box-body table-responsive" id="invoice printTable">
            <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
                <tr>
                    <td colspan="0">
                        <table border="1" align="center" cellpadding="0" cellspacing="0" width="100%">
                            <tr>

                                <td align="left" class="paddinT5R0L5B5" colspan="2">
                                    <table width="100%" cellpadding="0" cellspacing="0">

                                        <tr>
                                            <td class="invoice-td-class">
                                                <div class="col-sm-3 no-padding vertical-align-top">
                                                    <!--<img src="images/logo.png" />-->
                                                </div>

                                                <div class="col-sm-4 no-padding pull-right new1" >
                                                    <strong>Invoice No. :</strong> <?php echo $invoice_no; ?><br />
                                                    <strong>Date :</strong> <?php echo date('d-M-Y H:i:s A'); ?><br />
                                                </div>
                                            </td>


                                        </tr>
                                    </table>


                                    <div class="col-sm6 no-padding ">

                                    </div>
                                    <div class="col-sm3 pull-right ">

                                    </div>
                                </td>

                            </tr>
                            <tr>
                                <td colspan="2">
                                    <table width="100%" cellpadding="0" cellspacing="0">

                                        <tr>
                                            <td class="tdclass1">
                                                <div class="col-sm-6 no-padding vertical-align-top">
                                                    <strong><?php echo $compData['com_name']; ?><br />
                                                        <?php echo $compData['comp_address']; ?>
                                                    </strong>
                                                    <br><br>

                                                    Phone:  <?php echo $compData['phone']; ?><br>
                                                    Fax:    <?php echo $compData['fax_no']; ?><br />
                                                    Email: <?php echo $compData['global_email']; ?>
                                                    <br>
                                                    <br>

                                                    PAN No.: <?php echo $compData['pan_no']; ?><br>
                                                    GST No.:<?php echo $compData['gst_no']; ?><br>
                                                </div>



                                                <div class="col-sm-4 no-padding pull-right new1" >

                                                    <strong> <?php echo isset($billListing[0]['username'])?$billListing[0]['username']:''; ?><br>
                                                        <?php echo isset($billListing[0]['address'])?$billListing[0]['address']:''; ?></strong>
                                                    <br><br>
                                                    Mobile:  <?php echo (isset($billListing[0]['mobile']))?$billListing[0]['mobile']:''; ?><br>
                                                    Phone No: <?php echo (isset($billListing[0]['landline_number']))?$billListing[0]['landline_number']:''; ?><br />
                                                    Email: <?php echo $billListing[0]['email']; ?>
                                                    <br>
                                                    <br>
                                                    <?php echo ($billListing[0]['pancard_no']) ? 'PAN No: ' . $billListing[0]['pancard_no'] . '<br/>' : ''; ?>
                                                    <?php echo ($billListing[0]['gst_registration_number']) ? 'GST No.: ' . $billListing[0]['gst_registration_number'] : ''; ?><br>
                                                </div>
                                            </td>


                                        </tr>
                                    </table>
                                </td>
                            </tr>

                            <?php //echo '<pre>';print_r($billListing);//die();?>
                            <tr>
                                <td colspan="2">
                                    <div class="box-body table-responsive min-hieght250px">
                                        <table id="example1" class="table table-bordered table-striped">
                                            <thead>
                                                <tr>
                                                    <th>S.No</th>
                                                    <th>Date</th>
                                                    <th>Ref.No.</th>
                                                    <th>Client Name</th>
                                                    <th>Book By</th>
                                                    <th>Particulars</th>
                                                    <th>Vehicle</th>
                                                    <th>Booking</th>
                                                    <th>Total Hrs</th>
                                                    <th>KMs</th>
                                                    <th>Rate</th>
                                                    <th>Net Amount</th>
                                                </tr>
                                            </thead>

                                            <tbody>
                                                <!--<tr>
                                                    <td>01</td>
                                                    <td>06-01-2018</td>
                                                    <td>Mr Mihir </td>
                                                    <td>Mohit </td>
                                                    <td>Karol Bagh - AIG Airport</td>
                                                    <td>Prime</td>
                                                    <td>Airport Transfer</td>
                                                    <td>2:15 hrs</td>
                                                    <td>40 KM</td>
                                                    <td > <i class="fa fa-inr"></i> 12/km</td>
                                                    <td align="right"><i class="fa fa-inr"></i> 350</td>
                                                </tr>-->

                                                <?php
                                                //echo '<pre>';print_r($billListing);//die();
                                                if ($billListing > 0) {
                                                    $i = 1;
                                                    foreach ($billListing as $listing) {
                                                        ?>
                                                        <tr>

                                                            <td><?php echo $i; ?><input type="hidden" class="booking-ids" value="<?php echo $listing['id']; ?>"></td>
                                                            <td><?php echo date('Y-m-d H:i:s', strtotime($listing['AddedTime'])); ?></td>
                                                            <td><?php echo $listing['reference_number']; ?></td>
                                                            <td><?php echo $listing['client_name']; ?></td>
                                                            <td><?php echo $listing['username']; ?></td>
                                                            <td></td>
                                                            <td><?php echo $listing['vehicle_type']; ?></td>
                                                            <td><?php echo $listing['package_name']; ?></td>
                                                            <td><?php echo $listing['actual_time']; ?> Hrs</td>
                                                            <td><?php echo $listing['actual_distance']; ?></td>
                                                            <td><i class="fa fa-inr"></i> <?php echo $listing['approx_distance_charge']; ?>/km</td>
                                                            <td><i class="fa fa-inr"></i><?php echo $listing['booking_amt_balance']; ?> </td>
                                                        </tr>
                                                        <?php
                                                        $i++;
                                                    }
                                                } else {
                                                    ?>
                                                    <tr><td colspan="11" style="text-align: center;">No Records Found</td></tr>
                                                <?php } ?>

                                            </tbody>

                                        </table>
                                    </div>
                                </td>
                            </tr>

                            <tr>
                                <td class="widthpersent100 vertical-align-top" colspan="2">

                                    <table width="100%" border="0" cellpadding="0" cellspacing="1">
                                        <tr>
                                            <td  class="padding-left5px" align="right">
                                                <div class="col-sm-5 pull-right">

                                                    <div class="col-sm-6 no-padding" align="right">	Total Amt: </div>
                                                    <div class="col-sm-6 no-padding" align="right"><i class="fa fa-inr"></i> 700</div>

                                                    <div class="col-sm-6 no-padding" align="right">	SGST on (2.50% of 700): </div>
                                                    <div class="col-sm-6 no-padding" align="right"><i class="fa fa-inr"></i> 15</div>

                                                    <div class="col-sm-6 no-padding" align="right">	CGST on (2.50% of 700): </div>
                                                    <div class="col-sm-6 no-padding" align="right"><i class="fa fa-inr"></i> 15</div>
                                                    <div class="border-bottom border-top margintop5 padding-top5px pull-right widthpersent100">
                                                        <div class="col-sm-6 no-padding" align="right" >	Net Amount: </div>
                                                        <div class="col-sm-6 no-padding" align="right" ><i class="fa fa-inr"></i> 730</div>
                                                    </div>

                                                    <div class="col-sm-12 no-padding paddingTB10px" align="right">For <?php echo $compData['com_name']; ?></div>

                                                </div>
                                            </td>

                                        </tr>





                                    </table>

                                </td>

                            </tr>

                        </table>
                    </td>
                </tr>


                </td>
                </tr>
            </table>

            <table border="1" align="center" width="100%" style="margin-top:10px;">
                <tr>
                    <td>
                        <table class="widthpersent99" align="center">
                            <tr>
                                <td>
                                    <strong>Fair Details:</strong>
                                    <ol>
                                        <li>Perday extra charge:</li>
                                        <li> Pe KM extra charge:</li>
                                        <li>Per day Driver Allowance:</li>
                                        <li> If the vehicle will come after 2400 hrs then one extra charge will be applicable with Driver Allowance</li>
                                    </ol>

                                    <strong>Note:</strong>
                                    <ol>
                                        <li>Parking, waiting & Toll Charges to be paid extra</li>
                                        <li> Final Fair will depend upon actual distance (in KM) Travelled+Service Tax</li>

                                    </ol>

                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>




        </div>

        <a class="publish_all btn btn-success display-none margin-top10px" id="email-invoice" href="#">
            <i class="fa ion-ios-email"></i>
            Email Invoice
        </a>

        <a class="publish_all btn btn-unapublish" href="#" id="invoice-ok">
            <i class="fa fa-check"></i>
            Ok
        </a>

        <a class="publish_all btn btn-success" href="#" id="invoice-cancel">
            <i class="fa fa-remove"></i>
            Cancel
        </a>

        <a class="publish_all btn btn-unapublish display-none margin-l-5"  href="javascript:void(0);" id="invoice-print">
            <i class="fa fa-remove"></i>
            Print
        </a>
    </div>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>