<br>
<div id="content" class="clearfix sales_content_minibar">
    <div class="col-md-2"></div>
    <table cellpadding="10px"  border="0" align="center" width="720px" height="1024" style="margin-left: 20px; right:5px;" class="col-md-6">
        <tr height="80px">
            <td colspan="3" height="80px">
                <table border="0" width="100%" height="100%">
                    <tr>
                        <td width="">
                            <img src="<?php echo "http://localhost/bm_industry/"; ?>public/pos/images/logo.png" alt="logo" width="120" height="70">
                        </td>
                        <td colspan="2">
                            <div style="font-size: 30px; color: #ff6600; float:right;">Mozammel Steel Pipe Industries Ltd.</div>
                        </td>
                    </tr>

                    <tr valign="bottom">
                        <td colspan="2">
                            <div style="color:red; font-size: 25px;"><b>Invoice</b></div> 
                            <div>Invoice No.: <?php echo '00101';?></div> 
                            <div>Date: <?php echo date('d-m-Y');?></div> 
                        </td>
                        <td style="width: 350px; height: 100px; float: right;" colspan="">
                            <div id="address" style="text-align: right">
                                Nekrojbag, Keraniganj Model,Dhaka-1310<br>
                                Phone :+88-02-7166530,+88-02-7115373
                                Mobile:+8801967809649<br>
                                Email :info@mspsteelbd.com
                                http://www.mspsteelbd.com
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <br>
                            <table border="1" width="700px" height="">
                                <tr><td colspan="3" style="color:#333333; "><b>Customer Information</b></td></tr>

                                <tr>
                                    <td width="">Name:</td>
                                    <td colspan="2"><?php echo $customer_info->first_name.' '. $customer_info->last_name;?></td>
                                </tr>

                                <tr>
                                    <td width="">Address:</td>
                                    <td colspan="2" width="400px"><i><?php echo $customer_info->address_1;?></i></td>
                                </tr>
                                <tr>
                                    <td width="">Mobile Number:</td>
                                    <td colspan="2"><?php echo $customer_info->phone_number;?></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>



        <tr >

            <td valign="top" >
                <table border="1" width="100%" height="" style="font-size: 12px; text-align: center">
                    <thead style="font-weight:bold; ">
                        <tr height="20px">
                            <td>Sl</td>
                            <td style="text-align: left;">Item</td>
                            <td style="text-align: left;">Particulers</td>
                            <td>Unit Price</td>
                            <td>Quantity</td>
                            <td>Total</td>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $cart_items = $this->cart->contents();
                        foreach ($cart_items as $v_item) {
                            $item_real_price = ($v_item['price'] * $v_item['qty']);
                            $total_discount = $item_real_price * $v_item['discount'];
                            $item_total = $item_real_price - $total_discount;
                            ?>
                            <tr height="40px">
                                <td width="25px">12</td>
                                <td style="text-align: left;" width="200px"><?php echo $v_item['name']; ?></td>
                                <td style="text-align: left;" width="300px"><?php echo  '( '.$v_item['options']['diameter'].', '.$v_item['options']['thickness'].', '.$v_item['options']['length'].')'; ?>, 10mm, 123</td>
                                <td style="text-align: left;" width="70px"><?php echo $v_item['price'].'TK'; ?></td>
                                <td><?php echo $v_item['qty']; ?></td>
                                <td style="text-align: left; font-size: 12px;"><b>
                                        <?php
                                        echo $item_total.' TK';
                                        ?>
                                </td>
                            </tr>
                            <?php
                        }

                        $total_item = $this->cart->total_items();
                        $total = $this->cart->total();
                        $total_tax = $total * (0 / 100);
                        $tax_and_total = $total + $total_tax;
                        $discount = ($discount * $total) / 100;
                        $grand_total = $tax_and_total - $discount;
                        ?>
                    <tr height="40px">
                        <td width="25px"></td>
                        <td style="text-align: left;" width="200px"></td>
                        <td style="text-align: left;" width="300px"></td>
                        <td style="text-align: left;" width="70px"></td>
                        <td></td>
                        <td style="text-align: left; font-size: 12px;"><b></b></td>
                    </tr>

                    <tr style="font-size: 15px;">
                        <td colspan="4" style="text-align: left;"><b>Total in Word:</b></td>
                        <td colspan="2">
                            <table border="0" width="100%" height="" style="font-size: 15px; text-align: right">
                                <tr>
                                    <td width="46%">Grand Total:</td>
                                    <td width="50%"><b><?php echo $grand_total.' TK'; ?></b></td>
                                </tr>
                                <tr>
                                    <td width="46%">Paid: </td>
                                    <td><b><?php echo $payment.' TK';?></b></td>
                                </tr>
                                <tr>
                                    <td>Due:</td>
                                    <td><b><?php echo ($grand_total-$payment).' TK';?></b></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr style="font-size: 15px;">
                        <td colspan="2">Customer Previous Balance:<br><?php echo "<b>". $customer_balance.'000000 TK'."</b>";?> </td>
                        <td colspan="2">Customer Total Due:<br> <?php echo "<b>". $customer_balance + ($grand_total-$payment)." TK</b>"; ?></td>
                        <td colspan="1"><?php echo ''; ?></td>
                        <td colspan="1"><?php echo ''; ?></td>
                    </tr>

                    <tr height="120px">
                        <td colspan="3" style="text-align: left;">Comment: <?php echo $comment;?></td>
                        <td colspan="3" valign="bottom" style="padding:25px; " >Reciepient Signature</td>
                    </tr>
                    </tbody>
                </table>
            </td>

        </tr>
        <tr>
            <td colspan="3" height="40px" style="text-align: center">Received The Goods detail avobe in satisfectory condition</td>
        </tr>
    </table>
</div>