            <div class="row profile">
                <div class="col-md-12">
                    <!--BEGIN TABS-->
                    <div class="tabbable tabbable-custom tabbable-full-width">
                        
                        <div id="add_previous_debts" class="modal fade" tabindex="-1" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                                        <h4 class="modal-title">Add Previous Debts for <?php echo $customer_details->customer_name; ?></h4>
                                    </div>
                                    <form id="save_add_previous_debts_24k_sale" class="form-horizontal" method="post">
                                        <input type="hidden" id="customer_id" name="customer_id" value="<?php echo $customer_details->id; ?>">
                                        <div class="modal-body">
                                            <div id="response_msg_modal"></div>
                                            <div class="scroller" style="height:300px" data-always-visible="1" data-rail-visible1="1">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="form-body">
                                                            <div class="row form-group">
                                                                <label class="col-md-3 control-label pull-left">Date</label>
                                                                <div class="col-md-6">
                                                                    <input class="form-control form-control-inline input-medium date-picker" size="16" type="text" data-date-format=dd-mm-yyyy name="bill_date" value="<?php echo date('d-m-Y') ?>"/>
                                                                </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <label class="control-label col-md-3">Invoice Number</label>
                                                                <div class="col-md-3">
                                                                    <input type="text" class="form-control input-medium" name="invoice_number"/>
                                                                </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <label class="control-label col-md-3">Sale Type</label>
                                                                <div class="col-md-3">
                                                                    <select class="form-control input-medium" name="sale_type" id="sale_type">
                                                                        <option value="24K DXB Sale">24K DXB Sale</option>
                                                                        <option value="24K BOX Sale">24K BOX Sale</option>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                            <div class="row form-group">
                                                                <label class="col-md-3 control-label pull-left">24K Rate</label>
                                                                <div class="col-md-6">
                                                                    <div class="input-group input-small">
                                                                        <span class="input-group-addon">
                                                                            Rs.
                                                                        </span>
                                                                        <input type="number" maxlength="15" class="form-control input-small" id="24k_customer_sale_24k_rate" name="twofourk_customer_sale_24k_rate"/>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="row form-group">
                                                                <label class="col-md-3 control-label pull-left">24K Sale Grams</label>
                                                                <div class="col-md-6">
                                                                    <div class="input-group input-small">
                                                                        <input type="number" maxlength="15" class="form-control input-small" id="24k_customer_sale_grams" name="twofourk_customer_sale_grams"/>
                                                                        <span class="input-group-addon">
                                                                            g
                                                                        </span>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="row form-group">
                                                                <label class="col-md-3 control-label pull-left">Total Credit</label>
                                                                <div class="col-md-6">
                                                                    <div class="input-group input-small">
                                                                        <div id="24k_customer_sale_total_amount">Rs. 0.00</div>
                                                                        <input type="hidden" id="txt_24k_customer_sale_total_amount" name="total_amount">
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="row form-group">
                                                                <label class="control-label col-md-3">Description</label>
                                                                <div class="col-md-6">
                                                                    <textarea name="description" class="form-control input-large"></textarea>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" data-dismiss="modal" class="btn default">Close</button>
                                            <button type="submit" class="btn green">Save changes</button>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>

                        <div class="modal fade" id="24k_customer_success_modal" tabindex="-1" role="basic" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                                        <h4 class="modal-title">Success!</h4>
                                    </div>
                                    <div class="modal-body">
                                        24K Customer Details Edited Successfully
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn green" data-dismiss="modal" onclick="window.location.reload()">Ok</button>
                                    </div>
                                </div>
                                <!-- /.modal-content -->
                            </div>
                            <!-- /.modal-dialog -->
                        </div>

                        <div class="modal fade" id="previous_debts_success_modal" tabindex="-1" role="basic" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                                        <h4 class="modal-title">Success!</h4>
                                    </div>
                                    <div class="modal-body">
                                        Previous Debt Added Successfully
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn green" data-dismiss="modal" onclick="window.location.reload()">Ok</button>
                                    </div>
                                </div>
                                <!-- /.modal-content -->
                            </div>
                            <!-- /.modal-dialog -->
                        </div>
                        
                        <div class="pull-right">
                            <a class="btn default green-stripe"  data-toggle="modal" href="#add_previous_debts"> Add Previous Debts</a>
                        </div>
                        <ul class="nav nav-tabs">
                            <li class="active">
                                <a href="#tab_1_1" data-toggle="tab"> Overview </a>
                            </li>
                            <li>
                                <a href="#tab_1_2" data-toggle="tab"> Overall Sales </a>
                            </li>
                            <li>
                                <a href="#tab_1_3" data-toggle="tab"> Overall Payments </a>
                            </li>
                            <li>
                                <a href="#tab_1_4" data-toggle="tab"> Account </a>
                            </li>
                        </ul>
                        <div class="tab-content">
                            <div class="tab-pane active" id="tab_1_1">
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="row">
                                            <div class="col-md-offset-1 col-md-10">
                                                <table class="table table-hover table-bordered table-striped">
                                                    <tr>
                                                        <td>
                                                            <strong>Customer Number</strong>
                                                        </td>
                                                        <td>
                                                            <?php echo $customer_details->id; ?>
                                                        </td>
                                                        <td>
                                                            <strong>Customer Name</strong>
                                                        </td>
                                                        <td>
                                                            <?php echo $customer_details->customer_name; ?>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <strong>Mobile Number</strong>
                                                        </td>
                                                        <td>
                                                            <?php echo $customer_details->contact_number; ?>
                                                        </td>
                                                        <td>
                                                            <strong>Telephone Number</strong>
                                                        </td>
                                                        <td>
                                                            <?php echo $customer_details->tel_number; ?>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <strong>Supplier Status</strong>
                                                        </td>
                                                        <td>
                                                            <?php
                                                            if($customer_details->status == 1){
                                                                echo '<span class="label label-success">Active</span>';
                                                            }else if($customer_details->status == 2){
                                                                echo '<span class="label label-warning">Inactive</span>';
                                                            }else if($customer_details->status == 3){
                                                                echo '<span class="label label-danger">Deleted</span>';
                                                            }
                                                            ?>
                                                        </td>
                                                        <td>
                                                            <strong>Created On</strong>
                                                        </td>
                                                        <td>
                                                            <?php echo $customer_details->added_on; ?>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <!--end col-md-10-->
                                        </div>
                                        <!--end row-->  
                                        
                                        <h4>Account Details</h4>
                                        <hr>
                                        
                                        <div class="row">
                                            <div class="col-md-offset-2 col-md-8">
                                                <table class="table table-hover table-bordered table-striped" style="font-size: initial;">
                                                    <tr>
                                                        <td>
                                                            <strong>Total DXB Gold Sale</strong>
                                                        </td>
                                                        <td>
                                                            <strong><?php echo number_format($customer_details->dxb_gold_tot_amount,3,'.',',').' g'; ?></strong>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <strong>Total DXB Gold Sale in Rupees</strong>
                                                        </td>
                                                        <td>
                                                            <strong><?php echo 'Rs. '.number_format($customer_details->dxb_cash_tot_amount,2,'.',','); ?></strong>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <strong>Total DXB Paid Amount</strong>
                                                        </td>
                                                        <td>
                                                            <strong><?php echo 'Rs. '.number_format($customer_details->dxb_paid_amount,2,'.',','); ?></strong>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <strong>Total DXB Balance Amount</strong>
                                                        </td>
                                                        <td>
                                                            <strong><?php echo 'Rs. '.number_format($customer_details->dxb_balance_amount,2,'.',','); ?></strong>
                                                        </td>
                                                    </tr>
                                                </table>
                                                <table class="table table-hover table-bordered table-striped" style="font-size: initial;">
                                                    <tr>
                                                        <td>
                                                            <strong>Total BOX Gold Sale</strong>
                                                        </td>
                                                        <td>
                                                            <strong><?php echo number_format($customer_details->box_gold_tot_amount,3,'.',',').' g'; ?></strong>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <strong>Total BOX Gold Sale in Rupees</strong>
                                                        </td>
                                                        <td>
                                                            <strong><?php echo 'Rs. '.number_format($customer_details->box_cash_tot_amount,2,'.',','); ?></strong>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <strong>Total BOX Paid Amount</strong>
                                                        </td>
                                                        <td>
                                                            <strong><?php echo 'Rs. '.number_format($customer_details->box_paid_amount,2,'.',','); ?></strong>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <strong>Total BOX Balance Amount</strong>
                                                        </td>
                                                        <td>
                                                            <strong><?php echo 'Rs. '.number_format($customer_details->box_balance_amount,2,'.',','); ?></strong>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </div>
                                        <!--end row-->
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane" id="tab_1_2">
                                <script type="text/javascript" language="javascript" >
                                    $(document).ready(function () {
                                        var dataTable = $('#24k_customer_sales').DataTable({
                                            order: [[ 0, "desc" ]],
                                            select: true,
                                            pageLength: 10,
                                            processing: true,
                                            serverSide: true,
                                            ajax: {
                                                url: "Json_data/json_data_records?json_type=24k_customer_sales&customer_id=<?php echo $customer_details->id; ?>", // json datasource
                                                type: "post", // method  , by default get
                                                error: function () {  // error handling
                                                    $(".employee-grid-error").html("");
                                                    $("#employee-grid").append('<tbody class="employee-grid-error"><tr><th colspan="6">No data found in the server</th></tr></tbody>');
                                                    $("#employee-grid_processing").css("display", "none");

                                                }
                                            }, "aoColumns": [
                                                {"sTitle": "", "sClass": "hidden"},
                                                {"sTitle": "Invoice No."},
                                                {"sTitle": "Date"},
                                                {"sTitle": "Sale Category"},
                                                {"sTitle": "Sale Status"},
                                                {"sTitle": "Total Amount"},
                                                {"sTitle": "Actions", "sClass": "actionWidthMembers"}
                                            ], "fnCreatedRow": function (nRow, aData, iDataIndex) {
                                                $(nRow).attr('id', '' + aData[0]);

                                            }
                                        });

                                    });
                                </script>
                                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                                <div class="portlet box grey-cascade">
                                    <div class="portlet-title">
                                        <div class="caption">
                                            <i class="fa fa-money"></i> Overall Sales
                                        </div>
                                    </div>
                                    <div class="portlet-body">
                                        <table id="24k_customer_sales" class="table table-striped table-bordered table-hover"></table>
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane" id="tab_1_3">
                                <script type="text/javascript" language="javascript" >
                                    $(document).ready(function () {
                                        var dataTable = $('#24k_customer_payments').DataTable({
                                            select: true,
                                            pageLength: 10,
                                            processing: true,
                                            serverSide: true,
                                            ajax: {
                                                url: "Json_data/json_data_records?json_type=24k_customer_payments&customer_id=<?php echo $customer_details->id; ?>", // json datasource
                                                type: "post", // method  , by default get
                                                error: function () {  // error handling
                                                    $(".employee-grid-error").html("");
                                                    $("#employee-grid").append('<tbody class="employee-grid-error"><tr><th colspan="6">No data found in the server</th></tr></tbody>');
                                                    $("#employee-grid_processing").css("display", "none");

                                                }
                                            }, "aoColumns": [
                                                {"sTitle": "", "sClass": "hidden"},
                                                {"sTitle": "ID"},
                                                {"sTitle": "Date"},
                                                {"sTitle": "Payment Method"},
                                                {"sTitle": "Total Amount"},
                                                {"sTitle": "Actions", "sClass": "actionWidthMembers"}
                                            ], "fnCreatedRow": function (nRow, aData, iDataIndex) {
                                                $(nRow).attr('id', '' + aData[0]);

                                            }
                                        });

                                    });
                                </script>
                                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                                <div class="portlet box grey-cascade">
                                    <div class="portlet-title">
                                        <div class="caption">
                                            <i class="fa fa-money"></i> Overall Payments
                                        </div>
                                    </div>
                                    <div class="portlet-body">
                                        <table id="24k_customer_payments" class="table table-striped table-bordered table-hover"></table>
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane" id="tab_1_4">
                                <div class="row profile-account">
                                    <div class="col-md-3">
                                        <ul class="ver-inline-menu tabbable margin-bottom-10">
                                            <li class="active">
                                                <a data-toggle="tab" href="#tab_1-1">
                                                <i class="fa fa-cog"></i> 24K Customer info </a>
                                                <span class="after">
                                                </span>
                                            </li>
                                        </ul>
                                    </div>
                                        <div class="col-md-9">
                                            <div class="tab-content">
                                                <div id="tab_1-1" class="tab-pane active">
                                                    <form id="edit_24k_customer" class="form-horizontal" method="post" enctype="multipart/form-data"  novalidate="novalidate">
                                                        <input type="hidden" name="customer_id" id="customer_id" class="form-control" value="<?php echo $customer_details->id; ?>"/>
                                                        <div class="form-body">
                                                            <div class="form-group">
                                                                <label class="col-md-3 control-label pull-left">24K Customer Name</label>
                                                                <div class="col-md-6">
                                                                    <input type="text" name="customer_name" id="customer_name" class="form-control" value="<?php echo $customer_details->customer_name; ?>"/>
                                                                </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <label class="col-md-3 control-label pull-left">Mobile Number</label>
                                                                <div class="col-md-6">
                                                                    <input type="number" name="contact_num" id="contact_num" class="form-control" value="<?php echo $customer_details->contact_number; ?>"/>
                                                                </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <label class="col-md-3 control-label pull-left">Telephone Number</label>
                                                                <div class="col-md-6">
                                                                    <input type="number" name="tel_number" id="tel_number" class="form-control" value="<?php echo $customer_details->tel_number; ?>"/>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="form-actions fluid">
                                                            <div class="col-md-3"></div>
                                                            <div class="col-md-6">
                                                                <button type="submit" class="btn green" id="save_edit_user_details"> Submit </button>
                                                            </div>
                                                        </div>
                                                    </form>
                                                </div>
                                            </div>
                                        </div>
                                        <!--end col-md-9-->
                                </div>
                            </div>
                            <!--end tab-pane-->
                        </div>
                    </div>
                    <!--END TABS-->
                </div>
            </div>
            <!-- END PAGE CONTENT-->
        </div>
    </div>
    <!-- END CONTENT -->
<!-- END QUICK SIDEBAR -->
</div>