<div class="content-header">
    <div class="container-fluid">
        <div class="row mb-2">
            <div class="col-sm-6">
                <!-- <h1 class="m-0">Deactive Member </h1> -->
            </div>
            <div class="col-sm-6">
                <ol class="breadcrumb float-sm-right">
                    <li class="breadcrumb-item"><a href="#">Books</a></li>
                    <li class="breadcrumb-item active">Create Cash Book</li>
                </ol>
            </div>
        </div>
    </div>
</div>

            <!-----------------------------   Income-Others Credited Amount ------------------>

       
<section class="content">
    <div class="container-fluid">




        <div class="row">

            <section class="col-lg-12 connectedSortable">

                <div class="card">
                    <div class="card-header " style="background-color:#31708e;color:white">
                        <h3 class="card-title">
                        Receipt Details
                        </h3>
                        <div class="card-tools">
                            <ul class="nav nav-pills ml-auto">
                            </ul>
                        </div>
                    </div>
                    <div class="card-body">
                        <div class="tab-content p-0">


                        <div>
                            <a href="" class="btn btn-primary btn-rounded mb-4" data-toggle="modal" data-target="#expense_add">Add Data</a>
                        </div>
                        <br><br>
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="tile">
                                    <div class="tile-body" id="filter_id">
                                        <table id="table_ids1" class="table table-striped table-bordered" style="width:100%">
                                            <thead>
                                                <tr>
                                                    <th class="text-center">S No.</th>
                                                    <th class="text-center">Statements</th>
                                                    <th class="text-center">Amount</th>
                                                    <th class="text-center">To</th>
                                                    <th class="text-center">Date</th>
                                                    <th class="text-center">Action</th>
                                                </tr>
                                            </thead>
                                            <tbody>


                                                <?php $sno = 1; ?>
                                                <?php foreach ($expense as $data) : ?>
                                                    <tr>
                                                        <td class="text-center">
                                                            <?= $sno; ?>
                                                        </td>
                                                        <td class="text-center">
                                                            <div id="statementv<?= $sno; ?>">
                                                                <?= $data['statement'] ?>
                                                            </div>
                                                            <div style="display:none;" id="statement<?= $sno; ?>">
                                                                <input type="text"  readonly class="form-control" name="statement" id="statement1<?= $sno; ?>" value=" <?= $data['statement'] ?>">
                                                            </div>
                                                        </td>
                                                        <td class="text-center">
                                                            <div id="amountv<?= $sno; ?>">
                                                                <?= $data['amount'] ?>
                                                            </div>
                                                            <div style="display:none;" id="amount<?= $sno; ?>">
                                                                <input type="text" class="form-control" name="amount" id="amount1<?= $sno; ?>" value=" <?= $data['amount'] ?>">
                                                            </div>
                                                        </td>
                                                        <td class="text-center">
                                                            <div id="tov<?= $sno; ?>">
                                                                <?= $data['to'] ?>
                                                            </div>
                                                            <div style="display:none;" id="to<?= $sno; ?>">
                                                                <input type="text" readonly class="form-control" name="to" id="to1<?= $sno; ?>" value=" <?= $data['to'] ?>">
                                                            </div>
                                                        </td>
                                                        <td class="text-center">
                                                            <div id="datev<?= $sno; ?>">
                                                                <?= date("d-m-Y", strtotime($data['paid_on'])); ?>
                                                            </div>
                                                            <div style="display:none;" id="date<?= $sno; ?>">
                                                                <input type="date" class="form-control" name="date" id="date1<?= $sno; ?>" value="<?php echo date('Y-m-d', strtotime($data["paid_on"])) ?>">
                                                            </div>
                                                        </td>
                                                        <td class="text-center">
                                                            <button id="edit<?= $sno; ?>" class="btn btn-warning btn-xs" onclick="edit('<?= $sno; ?>');"><span class="fa fa-edit"></span><span class="sr-only"></span><i class="fas fa-paper-plane-o ml-1"></i></button>

                                                            <a href="<?php echo base_url() ?>index.php/Member/delete_expence1/<?php echo $data['id']; ?>" id="delete<?= $sno; ?>" class="btn btn-danger btn-xs"><span class="fas fa-times"></span><span class="sr-only"></span></a>
                                                            <button type="button" style="display:none;" id="save<?= $sno; ?>" class="btn btn-primary" onclick="save('<?= $sno; ?>','<?= $data['id'] ?>');">Save <i class="fas fa-paper-plane-o ml-1"></i></button>

                                                        </td>

                                                    </tr>
                                                    <?php $sno++; ?>
                                                <?php endforeach; ?>
                                            </tbody>

                                        </table>

                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="modal fade" id="expense_add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog" role="document">
                                <div class="modal-content">
                                    <div class="modal-header text-center">
                                        <h4 class="modal-title w-100 font-weight-bold">Add Data</h4>
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close" id="something">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                    <div class="modal-body mx-3">
                                        <form method="post" action="<?php echo base_url(); ?>index.php/Member/insert_expenses" id="member_add_" enctype='multipart/form-data'>
                                            <div class="md-form mb-4">
                                                <label data-error="wrong" data-success="right" for="form2">To</label>
                                                <select name="to" id="expense_category" class="form-control">
                                                    <option value="">Select</option>
                                                    <?php foreach ($expense_category as $caste) { ?>
                                                        <option value="<?php echo $caste['find']; ?>-<?php echo $caste['category']; ?>"><?php echo $caste['category']; ?></option>
                                                    <?php } ?>
                                                </select>
                                            </div>
                                            <br>
                                            <div class="md-form mb-5" id="expense_others_tamil" name="sub_tamil">
                                            </div>
                                            <div class="md-form mb-5">
                                                <label data-error="wrong" data-success="right" for="form3">Statements</label>
                                                <!-- <input type="text" id="statement" class="form-control validate" name="statement"> -->
                                                <select name="statement" id="expense_Statement_category" class="form-control">
                                                    <option value="">Select</option>
                                                    <?php foreach ($expense_Statement_category as $caste) { ?>
                                                        <option value="<?php echo $caste['find']; ?>-<?php echo $caste['category']; ?>"><?php echo $caste['category']; ?></option>
                                                    <?php } ?>
                                                </select>
                                            </div>
                                            <br>
                                            <div class="md-form mb-5">
                                                <label data-error="wrong" data-success="right" for="form3">Amount</label>

                                                <input type="number" id="amount" class="form-control validate" name="amount">
                                            </div>

                                            <br>
                                            <div class="md-form mb-4">
                                                <label data-error="wrong" data-success="right" for="form2">Mode of Transaction</label>
                                                <select name="mode" class="form-control" id="to">
                                                    <option value="">Select</option>
                                                    <option value="Cash">Cash</option>
                                                    <option value="Cheque">Cheque</option>
                                                </select>
                                            </div>
                                            <br>
                                            <div class="md-form mb-5">
                                                <label data-error="wrong" data-success="right" for="form3">Paid Date</label>

                                                <input type="date" id="date" class="form-control validate" name="date">
                                            </div>
                                    </div>
                                    <div class="modal-footer d-flex justify-content-center">
                                        <button class="btn btn-primary" onclick="check();">Add <i class="fas fa-paper-plane-o ml-1"></i></button>
                                    </div>
                                    </form>
                                </div>
                            </div>
                        </div>




                        </div>
                    </div>
                </div>
        </div>




       
  <!-----------------------------  Expense-Other's Credited Amount ------------------>

        


  <div class="card">
                    <div class="card-header " style="background-color:#31708e;color:white">
                        <h3 class="card-title">
                        Receipt-Other's Credited Amount

                        </h3>
                        <div class="card-tools">
                            <ul class="nav nav-pills ml-auto">
                            </ul>
                        </div>
                    </div>
                    <div class="card-body">

                        <div>
                            <a href="" class="btn btn-primary btn-rounded mb-4" data-toggle="modal" data-target="#modalSubscriptionForm3">Add Data</a>
                        </div>
                        <br><br>
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="tile">
                                    <div class="tile-body" id="filter_id">
                                        <table id="table_ids2" class="table table-striped table-bordered" style="width:100%">
                                            <thead>
                                                <tr>
                                                    <th class="text-center">S No.</th>
                                                    <th class="text-center">Title</th>
                                                    <th class="text-center">Sub Title</th>
                                                    <th class="text-center">Current Month Amount</th>
                                                    <th class="text-center">Action</th>
                                                </tr>
                                            </thead>
                                            <tbody>


                                                <?php $sno = 1; ?>
                                                <?php foreach ($other_expense as $data) : ?>
                                                    <tr>
                                                        <td class="text-center">
                                                            <?= $sno; ?>
                                                        </td>
                                                        <td class="text-center">
                                                            <?= $data['list'] ?>
                                                        </td>
                                                        <td class="text-center">
                                                            <?= $data['stitle'] ?>
                                                        </td>
                                                        <td class="text-center">
                                                            <?= $data['camount'] ?>
                                                        </td>
                                                        <td class="text-center">
                                                            <a href="<?php echo base_url() ?>index.php/Member/edit_expense/<?php echo $data['id']; ?>" class="btn btn-warning btn-xs"><span class="fa fa-edit"></span><span class="sr-only"></span></a>
                                                            <a href="<?php echo base_url() ?>index.php/Member/delete_expense/<?php echo $data['id']; ?>" class="btn btn-danger btn-xs"><span class="fas fa-times"></span><span class="sr-only"></span></a>

                                                        </td>
                                                    </tr>
                                                    <?php $sno++; ?>
                                                <?php endforeach; ?>
                                            </tbody>

                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>



                        <div class="modal fade" id="modalSubscriptionForm3" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog" role="document">
                                <div class="modal-content">
                                    <div class="modal-header text-center">
                                        <h4 class="modal-title w-100 font-weight-bold">Add Data</h4>
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close" id="something3">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                    <div class="modal-body mx-3">
                                        <form method="post" action="<?php echo base_url(); ?>index.php/Member/expense_details" id="member_add_" enctype='multipart/form-data'>

                                            <div class="md-form mb-5">
                                                <label data-error="wrong" data-success="right" for="form3">Other's Expense List</label>

                                                <select name="list" id="expense_others1" class="form-control">
                                                    <option value="">Select</option>
                                                    <?php foreach ($expense_others_category as $caste) { ?>
                                                        <option value="<?php echo $caste['find']; ?>-<?php echo $caste['category']; ?>"><?php echo $caste['category']; ?></option>
                                                    <?php } ?>
                                                </select>
                                            </div>
                                            <br>
                                            <div class="md-form mb-5" id="etamil_id1" name="sub_tamil">
                                            </div>
                                            <div class="md-form mb-5">
                                                <label data-error="wrong" data-success="right" for="form3">Sub Title</label>
                                                <select name="stitle" id="expense_others_sub" class="form-control">
                                                    <option value="">Select</option>
                                                    <?php foreach ($expense_others_sub_category as $caste) { ?>
                                                        <option value="<?php echo $caste['find']; ?>-<?php echo $caste['category']; ?>"><?php echo $caste['category']; ?></option>
                                                    <?php } ?>
                                                </select>
                                            </div>
                                            <br>
                                            <div class="md-form mb-5" id="expense_sub_category1" name="sub_tamil1">
                                            </div>
                                            <!-- <div class="md-form mb-5">
                                                <label data-error="wrong" data-success="right" for="form3">Previous Month Amount</label>

                                                <input type="number" id="form3" class="form-control validate" name="pamount">
                                                </div> -->
                                            <div class="md-form mb-4">
                                                <label data-error="wrong" data-success="right" for="form2">Current Month Amount</label>

                                                <input type="number" id="form2" class="form-control validate" name="camount">
                                            </div>
                                            <div class="md-form mb-4">
                                                <label data-error="wrong" data-success="right" for="form2">date</label>

                                                <input type="date" id="form2" class="form-control validate" name="date">
                                            </div>
                                            <div class="modal-footer d-flex justify-content-center">
                                                <button class="btn btn-primary">Insert <i class="fas fa-paper-plane-o ml-1"></i></button>
                                            </div>
                                        </form>
                                    </div>

                                </div>
                            </div>
                        </div>
                        </div>
                    </div>
                </div>


          

                <div class="card">
                    <div class="card-header " style="background-color:#31708e;color:white">
                        <h3 class="card-title">
                        Payment Amount
                        </h3>
                        <div class="card-tools">
                            <ul class="nav nav-pills ml-auto">
                            </ul>
                        </div>
                    </div>
                    <div class="card-body">
                        <div class="tab-content p-0">


                        <?php foreach ($cmt as $data) : ?>
                            <?php $cthrift += $data['thrift_amt'] ?>
                        <?php endforeach; ?>

                        <?php foreach ($pmt as $data) : ?>
                            <?php $pthrift += $data['thrift_amt'] ?>
                        <?php endforeach; ?>
                        <?php foreach ($cms as $data) : ?>
                            <?php $cshare += $data['share_amt'] ?>
                        <?php endforeach; ?>

                        <?php foreach ($pms as $data) : ?>
                            <?php $pshare += $data['share_amt'] ?>
                        <?php endforeach; ?>
                        <?php foreach ($cmp as $data) : ?>
                            <?php $cp += $data['loan_pri_amt'] ?>

                        <?php endforeach; ?>

                        <?php foreach ($pmp as $data) : ?>
                            <?php $pp += $data['loan_pri_amt'] ?>
                        <?php endforeach; ?>
                        <?php foreach ($cmi as $data) : ?>

                            <?php $ci += $data['loan_int_amt'] ?>
                        <?php endforeach; ?>

                        <?php foreach ($pmi as $data) : ?>

                            <?php $pi += $data['loan_int_amt'] ?>
                        <?php endforeach; ?>
                          <!-----------------------------   Income-Others Credited Amount ------------------>
        


                        <div>
                            <a href="" class="btn btn-primary btn-rounded mb-4" data-toggle="modal" data-target="#modalSubscriptioninsert">Add Data</a>
                        </div>
                        <br><br>
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="tile">
                                    <div class="tile-body" id="filter_id">
                                        <table id="table_ids11" class="table table-striped table-bordered" style="width:100%">
                                            <thead>
                                                <tr>
                                                    <th class="text-center">S No.</th>
                                                    <th class="text-center">Income List</th>
                                                    <th class="text-center">Current Month Amount</th>
                                                    <th class="text-center">Action</th>
                                                </tr>
                                            </thead>
                                            <tbody>


                                                <?php $sno = 1; ?>
                                                <?php foreach ($other_income1 as $data) : ?>
                                                    <tr>
                                                        <td class="text-center">
                                                            <?= $sno; ?>
                                                        </td>
                                                        <td class="text-center">
                                                            <?= $data['list'] ?>
                                                        </td>
                                                        <td class="text-center">
                                                            <?= $data['camount'] ?>
                                                        </td>
                                                        <td class="text-center">
                                                            <a href="<?php echo base_url() ?>index.php/Member/edit_income/<?php echo $data['id']; ?>" class="btn btn-warning btn-xs"><span class="fa fa-edit"></span><span class="sr-only"></span></a>
                                                            <a href="<?php echo base_url() ?>index.php/Member/delete_income/<?php echo $data['id']; ?>" class="btn btn-danger btn-xs"><span class="fas fa-times"></span><span class="sr-only"></span></a>

                                                        </td>
                                                    </tr>
                                                    <?php $sno++; ?>
                                                <?php endforeach; ?>
                                            </tbody>

                                        </table>

                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="modal fade" id="modalSubscriptioninsert" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog" role="document">
                                <div class="modal-content">
                                    <div class="modal-header text-center">
                                        <h4 class="modal-title w-100 font-weight-bold">Add Data</h4>
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close" id="something1">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                    <div class="modal-body mx-3">
                                        <form method="post" action="<?php echo base_url(); ?>index.php/Member/income_details" id="member_add_" enctype='multipart/form-data'>

                                            <div class="md-form mb-5">
                                                <label data-error="wrong" data-success="right" for="form3">Income List</label>
                                                <select id="income" name="list" class="form-control" onchange="list();">
                                                    <option value="">Select</option>
                                                    <?php foreach ($income_category as $caste) { ?>
                                                        <option value="<?php echo $caste['find']; ?>-<?php echo $caste['category']; ?>"><?php echo $caste['category']; ?></option>
                                                    <?php } ?>
                                                </select>
                                            </div>
                                            <br>
                                            <div class="md-form mb-5" id="itamil_id" name="sub_tamil">
                                            </div>
                                            <br>
                                            <div class="md-form mb-4">
                                                <label data-error="wrong" data-success="right" for="form2">Current Month Amount</label>
                                                <input type="hidden" id="form3" class="form-control validate" name="income_id" value="1">
                                                <input type="number" id="form2" class="form-control validate" name="camount">
                                            </div>
                                            <!-- <div class="md-form mb-5">
                                                <label data-error="wrong" data-success="right" for="form3">Previous Month Amount</label>

                                                <input type="number" id="form3" class="form-control validate" name="pamount">
                                            </div> -->
                                            <div class="md-form mb-5">
                                                <label data-error="wrong" data-success="right" for="form3">Date</label>

                                                <input type="date" id="form3" class="form-control validate" name="date">
                                            </div>
                                    </div>
                                    <div class="modal-footer d-flex justify-content-center">
                                        <button class="btn btn-primary">Insert <i class="fas fa-paper-plane-o ml-1"></i></button>
                                    </div>
                                    </form>
                                </div>
                            </div>
                        </div>



                        </div>
                    </div>
                </div>
       







        <!-----------------------------  Tally Expense Details ------------------>
      

                <div class="card">
                    <div class="card-header " style="background-color:#31708e;color:white">
                        <h3 class="card-title">
                        Payment-Others Credited Amount

                        </h3>
                        <div class="card-tools">
                            <ul class="nav nav-pills ml-auto">
                            </ul>
                        </div>
                    </div>
                    <div class="card-body">
                        <div class="tab-content p-0">
      
                        <div>
                            <a href="" class="btn btn-primary btn-rounded mb-4" data-toggle="modal" data-target="#modalSubscription1">Add Data</a>
                        </div>
                        <br><br>
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="tile">
                                    <div class="tile-body" id="filter_id">
                                        <table id="table_id12" class="table table-striped table-bordered" style="width:100%">
                                            <thead>
                                                <tr>
                                                    <th class="text-center">S No.</th>
                                                    <th class="text-center">Title</th>
                                                    <th class="text-center">Sub Title</th>
                                                    <th class="text-center">Current Month Amount</th>
                                                    <th class="text-center">Action</th>
                                                </tr>
                                            </thead>
                                            <tbody>


                                                <?php $sno = 1; ?>
                                                <?php foreach ($other_income as $data) : ?>
                                                    <tr>
                                                        <td class="text-center">
                                                            <?= $sno; ?>
                                                        </td>
                                                        <td class="text-center">
                                                            <?= $data['list'] ?>
                                                        </td>

                                                        <td class="text-center">
                                                            <?= $data['stitle'] ?>
                                                        </td>
                                                        <td class="text-center">
                                                            <?= $data['camount'] ?>
                                                        </td>
                                                        <td class="text-center">
                                                            <a href="<?php echo base_url() ?>index.php/Member/edit_income/<?php echo $data['id']; ?>" class="btn btn-warning btn-xs"><span class="fa fa-edit"></span><span class="sr-only"></span></a>
                                                            <a href="<?php echo base_url() ?>index.php/Member/delete_income/<?php echo $data['id']; ?>" class="btn btn-danger btn-xs"><span class="fas fa-times"></span><span class="sr-only"></span></a>

                                                        </td>
                                                    </tr>
                                                    <?php $sno++; ?>
                                                <?php endforeach; ?>
                                            </tbody>

                                        </table>

                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="modal fade" id="modalSubscription1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog" role="document">
                                <div class="modal-content">
                                    <div class="modal-header text-center">
                                        <h4 class="modal-title w-100 font-weight-bold">Add Data</h4>
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close" id="something2">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                    <div class="modal-body mx-3">
                                        <form method="post" action="<?php echo base_url(); ?>index.php/Member/income_details" id="member_add_" enctype='multipart/form-data'>

                                            <div class="md-form mb-5">
                                                <label data-error="wrong" data-success="right" for="form3">Title</label>
                                                <select name="list" id="income_others" class="form-control" onchange="others_list();">
                                                    <option value="">Select</option>
                                                    <?php foreach ($income_others_category as $caste) { ?>
                                                        <option value="<?php echo $caste['find']; ?>-<?php echo $caste['category']; ?>"><?php echo $caste['category']; ?></option>
                                                    <?php } ?>
                                                </select>
                                            </div>
                                            <br>
                                            <div class="md-form mb-5" id="itamil_id1" name="tamil">
                                            </div>
                                            <br>
                                            <div class="md-form mb-5">
                                                <label data-error="wrong" data-success="right" for="form3">Sub Title</label>
                                                <input type="hidden" id="form3" class="form-control validate" name="income_id" value="0">
                                                <select name="stitle" id="income_sub_category" class="form-control" onchange="s_otherslist();">
                                                    <option value="">Select</option>
                                                    <?php foreach ($income_sub_category as $caste) { ?>
                                                        <option value="<?php echo $caste['find']; ?>-<?php echo $caste['category']; ?>"><?php echo $caste['category']; ?></option>
                                                    <?php } ?>
                                                </select>
                                            </div>
                                            <br>
                                            <div class="md-form mb-5" id="income_sub_category1" name="sub_tamil">
                                            </div>
                                            <!-- <div class="md-form mb-5">
                                                <label data-error="wrong" data-success="right" for="form3">Previous Month Amount</label>

                                                <input type="number" id="form3" class="form-control validate" name="pamount">
                                            </div> -->
                                            <div class="md-form mb-4">
                                                <label data-error="wrong" data-success="right" for="form2">Current Month Amount</label>

                                                <input type="number" id="form2" class="form-control validate" name="camount">
                                            </div>
                                            <div class="md-form mb-4">
                                                <label data-error="wrong" data-success="right" for="form2">Date</label>

                                                <input type="date" id="form2" class="form-control validate" name="date">
                                            </div>
                                    </div>
                                    <div class="modal-footer d-flex justify-content-center">
                                        <button class="btn btn-primary">Insert <i class="fas fa-paper-plane-o ml-1"></i></button>
                                    </div>
                                    </form>
                                </div>
                            </div>
                        </div>



                    </div>
                    </div>
                </div>
       



      
        </div>
</section>
</div>
</div>
</section>


<style>
    div.dt-buttons{
        margin-left: 176px;
    }
    div.dataTables_wrapper div.dataTables_length label {
        position: absolute;
    }
    div.dataTables_wrapper div.dataTables_filter {
        text-align: right;
        margin-top: -37px;
    }

    .copyButton {
background-color: #dc3545;
border: 1px solid white;
}
.excelButton {
background-color: #dc3545;
border: 1px solid white;

}
.pdfButton{
background-color: #dc3545;
border: 1px solid white;

}
.printButton {
background-color: #dc3545;
border: 1px solid white;

}
.colvisButton{
background-color: #dc3545;
border: 1px solid white;

}
</style>
            



<script src="<?php echo base_url() ?>assets/datatables/dataTables.bootstrap.js"></script>
<script src="<?php echo base_url() ?>assets/datatables/jquery.dataTables.js"></script>
<script>
    var table = $('#table_id12').DataTable({
        "processing": true,
        "dom": 'lBfrtip',
        "lengthMenu": [
            [100, 250, 500, 1000, -1],
            [100, 250, 500, 1000, "All"]
        ],
        "buttons": 
        {
    buttons: [
        { extend: 'copy', className: 'copyButton' },
        { extend: 'excel', className: 'excelButton' },
        { extend: 'pdf', className: 'pdfButton' },
        { extend: 'print', className: 'printButton' },
        { extend: 'colvis', className: 'colvisButton' },
    ]
}
        
    });



    var table = $('#table_ids11').DataTable({
        "processing": true,
        "dom": 'lBfrtip',
        "lengthMenu": [
            [100, 250, 500, 1000, -1],
            [100, 250, 500, 1000, "All"]
        ],
        "buttons": 
        {
    buttons: [
        { extend: 'copy', className: 'copyButton' },
        { extend: 'excel', className: 'excelButton' },
        { extend: 'pdf', className: 'pdfButton' },
        { extend: 'print', className: 'printButton' },
        { extend: 'colvis', className: 'colvisButton' },
    ]
}
        
    });


    var table = $('#table_ids2').DataTable({
        "processing": true,
        "dom": 'lBfrtip',
        "lengthMenu": [
            [100, 250, 500, 1000, -1],
            [100, 250, 500, 1000, "All"]
        ],
        "buttons": 
        {
    buttons: [
        { extend: 'copy', className: 'copyButton' },
        { extend: 'excel', className: 'excelButton' },
        { extend: 'pdf', className: 'pdfButton' },
        { extend: 'print', className: 'printButton' },
        { extend: 'colvis', className: 'colvisButton' },
    ]
}
        
    });




    var table = $('#table_ids1').DataTable({
        "processing": true,
        "dom": 'lBfrtip',
        "lengthMenu": [
            [100, 250, 500, 1000, -1],
            [100, 250, 500, 1000, "All"]
        ],
        "buttons": 
        {
    buttons: [
        { extend: 'copy', className: 'copyButton' },
        { extend: 'excel', className: 'excelButton' },
        { extend: 'pdf', className: 'pdfButton' },
        { extend: 'print', className: 'printButton' },
        { extend: 'colvis', className: 'colvisButton' },
    ]
}
        
    });
</script>
    <script>
        $(document).ready(function() {
            $('.alert').fadeOut(3000);
            var table = $('#table_id').DataTable({
                "processing": true,
                "dom": 'lBfrtip',
                "lengthMenu": [
                    [10, 25, 50, -1],
                    [10, 25, 50, "All"]
                ],
                "buttons": [
                    'copyHtml5',
                    'excelHtml5',
                    'csvHtml5',
                    'pdfHtml5'
                ]
            });

            $(".buttons-html5").addClass("btn btn-primary");
            $('.dt-buttons').addClass("pt-3 pb-0");

            $('#something').click(function() {
                location.reload();
            });
            $('#something1').click(function() {
                location.reload();
            });
            $('#something2').click(function() {
                location.reload();
            });
            $('#something3').click(function() {
                location.reload();
            });
        });
    </script>

  
  

    <script>
       

        function check() {
            var statement = $('#statement').val();
            var amount = $('#amount').val();
            var to = $('#to').val();
            var date = $('#date').val();
            if (statement == "") {
                alert("Statement Must Be Filled Out");
                event.preventDefault();
            }
            if (amount == "") {
                alert("Amount Must Be Filled Out");
                event.preventDefault();
            }
            if (to == "") {
                alert("To Must Be Filled Out");
                event.preventDefault();

            }
            if (date == "") {
                alert("Date  Must Be Filled Out");
                event.preventDefault();

            }
        }

        function edit(sno) {
            $('#statement' + sno).show();
            $('#amount' + sno).show();
            $('#to' + sno).show();
            $('#date' + sno).show();
            $('#save' + sno).show();
            $('#statementv' + sno).hide();
            $('#amountv' + sno).hide();
            $('#tov' + sno).hide();
            $('#datev' + sno).hide();
            $('#edit' + sno).hide();
            $('#delete' + sno).hide();
        }

        function save(sno, id) {
            var statement = $('#statement1' + sno).val();
            var amount = $('#amount1' + sno).val();
            var to = $('#to1' + sno).val();
            var paid_on = $('#date1' + sno).val();
            if (statement == "") {
                alert("Statement Must Be Filled Out");
                return false;
            }
            if (amount == "") {
                alert("Amount Must Be Filled Out");
                return false;

            }
            if (to == "") {
                alert("To Must Be Filled Out");
                return false;
            }
            if (paid_on == "") {
                alert("Date  Must Be Filled Out");
                return false;
            }
            $.ajax({
                type: 'POST',
                url: "<?php echo base_url() ?>index.php/Member/update_expense",
                data: {
                    statement: statement,
                    amount: amount,
                    to: to,
                    paid_on: paid_on,
                    id: id
                },
                dataType: 'html',
                success: function(data) {
                    if (data == 1) {
                        $('#statementv' + sno).html(statement);
                        $('#amountv' + sno).html(amount);
                        $('#tov' + sno).html(to);
                        $('#datev' + sno).html(paid_on);

                        $('#statementv' + sno).show();
                        $('#amountv' + sno).show();
                        $('#tov' + sno).show();
                        $('#datev' + sno).show();
                        $('#edit' + sno).show();
                        $('#delete' + sno).show();

                        $('#statement' + sno).hide();
                        $('#amount' + sno).hide();
                        $('#to' + sno).hide();
                        $('#date' + sno).hide();
                        $('#save' + sno).hide();
                        alert('updated Successfully..');
                    }
                }
            });
        }

        function list() {
            $income = $('#income').val();
            $income_char = $('#income_char');
            $income_char.val() = $income;
        }

        function others_list() {
            $income = $('#income').val();
            $income_char = $('#income_char');
            $income_char.val() = $income;
        }

        function s_otherslist() {
            $income = $('#income').val();
            $income_char = $('#income_char');
            $income_char.val() = $income;
        }

        $('#expense_category').change(function() {
            var temp_array = [];
            var expense2;
            var expense;
            var expense1 = $('#expense_category').val();
            temp_array = expense1.split("-");
            expense = temp_array[0];
            if (expense != '') {
                $.ajax({
                    url: "<?php echo base_url(); ?>index.php/Member/expense_category_search",
                    method: "POST",
                    data: {
                        expense: expense
                    },
                    success: function(data) {
                        $('#expense_others_tamil').html(data);
                    }
                });
            }
        });

        $(document).ready(function() {
            $('#income').change(function() {
                var temp_array = [];
                var income2;
                var income;
                var income1 = $('#income').val();
                temp_array = income1.split("-");
                income = temp_array[0];
                if (income != '') {
                    $.ajax({
                        url: "<?php echo base_url(); ?>index.php/Member/income_t_search",
                        method: "POST",
                        data: {
                            income: income
                        },
                        success: function(data) {
                            $('#itamil_id').html(data);
                        }
                    });
                }
            });

            $('#income_others').change(function() {
                var temp_array = [];
                var income2;
                var income;
                var income1 = $('#income_others').val();
                temp_array = income1.split("-");
                income = temp_array[0];
                if (income != '') {
                    $.ajax({
                        url: "<?php echo base_url(); ?>index.php/Member/income_t_others_search",
                        method: "POST",
                        data: {
                            income: income
                        },
                        success: function(data) {
                            $('#itamil_id1').html(data);
                        }
                    });
                }
            });
            $('#income_sub_category').change(function() {
                var temp_array = [];
                var income2;
                var income;
                var income1 = $('#income_sub_category').val();
                temp_array = income1.split("-");
                income = temp_array[0];
                if (income != '') {
                    $.ajax({
                        url: "<?php echo base_url(); ?>index.php/Member/income_sub_t_others_search",
                        method: "POST",
                        data: {
                            income: income
                        },
                        success: function(data) {
                            $('#income_sub_category1').html(data);
                        }
                    });
                }
            });

            $('#expense_others1').change(function() {
                var temp_array = [];
                var income2;
                var income;
                var income1 = $('#expense_others1').val();
                temp_array = income1.split("-");
                income = temp_array[0];
                if (income != '') {
                    $.ajax({
                        url: "<?php echo base_url(); ?>index.php/Member/income_sub_t_others_search",
                        method: "POST",
                        data: {
                            income: income
                        },
                        success: function(data) {
                            $('#etamil_id1').html(data);
                        }
                    });
                }
            });

            $('#expense_others_sub').change(function() {
                var temp_array = [];
                var income2;
                var income;
                var income1 = $('#expense_others_sub').val();
                temp_array = income1.split("-");
                income = temp_array[0];
                if (income != '') {
                    $.ajax({
                        url: "<?php echo base_url(); ?>index.php/Member/expense_sub_t_others_search1",
                        method: "POST",
                        data: {
                            income: income
                        },
                        success: function(data) {
                            $('#expense_sub_category1').html(data);
                        }
                    });
                }
            });


        });

        $('#expense_category').on('change', function() {
            var temp_array = [];
            var expense;
            var expense_category = this.value;
            temp_array = expense_category.split("-");
            expense = temp_array[1];
            $.ajax({
                type: 'POST',
                url: "<?php echo base_url() ?>index.php/Member/get_expense_category",
                data: {
                    expense: expense
                },
                dataType: 'html',
                success: function(data) {

                    $('#expense_Statement_category').html(data);
                }
            });
        });

        $('#income_others').on('change', function() {
            var temp_array = [];
            var expense;
            var income_others = this.value;
            temp_array = income_others.split("-");
            expense = temp_array[1];
            $.ajax({
                type: 'POST',
                url: "<?php echo base_url() ?>index.php/Member/get_income_others",
                data: {
                    expense: expense
                },
                dataType: 'html',
                success: function(data) {

                    $('#income_sub_category').html(data);
                }
            });
        });
        $('#expense_others1').on('change', function() {
            var temp_array = [];
            var expense;
            var income_others = this.value;
            temp_array = income_others.split("-");
            expense = temp_array[1];
            $.ajax({
                type: 'POST',
                url: "<?php echo base_url() ?>index.php/Member/get_expense_category",
                data: {
                    expense: expense
                },
                dataType: 'html',
                success: function(data) {

                    $('#expense_others_sub').html(data);
                }
            });
        });
    </script>