whoami7 - Manager
:
/
home
/
papecmvm
/
public_html
/
application
/
views
/
webapp
/
master
/
ledger
/
Upload File:
files >> /home/papecmvm/public_html/application/views/webapp/master/ledger/view.php
<?php require_once(APPPATH.'views/webapp/header.php');?> <?php require_once(APPPATH.'views/webapp/menu.php');?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Ledger </h1> <ol class="breadcrumb"> <li><a href="<?php echo site_url('webapp/welcome')?>"><i class="fa fa-dashboard"></i> Dashboard</a></li> <li class="active">Ledger</li> </ol> </section> <div class="modal fade import_ledger" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Import Ledgers</h4> </div> <div class="modal-body"> <form method="POST" enctype="multipart/form-data" action="<?php echo base_url().'webapp/master/ledger/import_ledger' ?>"> <div class="container"> <div class="row"> <div class="col-sm-3"> <div class="form-group"> <label>Customer</label> <select class="form-control multiselect" name="rid" required=""> <option value="">--Select--</option> <?php foreach ($cust as $k => $v){ ?> <option value="<?php echo $v['rid']; ?>"> <?php echo $v['name']; ?> </option> <?php } ?> </select> </div> </div> <div class="col-sm-3"> <label>Select File</label> <input class="ledger_file" type="file" name="ledger_file" accept=".csv, .xlsx" required=""> </div> </div> <button type="submit" class="btn btn-info text-center">Import</button> </div> </form> </div> </div> </div> </div> <!-- Main content --> <section class="content"> <?php $attributes = array('id' => 'formid'); echo form_open("",$attributes); ?> <!-- /.row --> <div class="row"> <div class="col-xs-12"> <div class="box box-primary"> <div class="box-header"> <div class="text-left"> <!-- Small modal --> <button type="button" class="btn btn-success pull-right" data-toggle="modal" data-target=".import_ledger">Import Ledgers</button> <a href="<?php echo base_url().'webapp/master/ledger/add'; ?>" class="btn btn-primary">Add Ledger</a> </div> </div><!-- /.box-header --> <div class="box-body"> <?php if($this->session->flashdata('msg')){ echo $this->session->flashdata('msg'); } ?> <table id="" class="table table-bordered table-striped"> <thead> <tr> <th>Name</th> <th>Email</th> <th>Mobile</th> <th>GST</th> <th>PAN</th> <th>Action</th> </tr> </thead> <tbody> <?php foreach ($ledger as $gr) { $enc_id = $this->model->encryptdata($gr['rid']); ?> <tr> <td class="text-capitalize"> <span class="text-primary"><strong><?php echo $gr['name']; ?></strong></span><br> <span class="badge badge-danger"><?php echo $gr['ledger_count']; ?></span> <span class="text-danger"><strong>Total Ladger</strong></span> <br> <?php /* <span class="badge badge-danger"><?php echo $gr['new_ledger_count']; ?></span> <span class="text-success"><strong>New Ladger</strong></span> */ ?> </td> <td><?php echo $gr['email']; ?></td> <td><?php echo $gr['mobile']; ?></td> <td><?php echo $gr['gst']; ?></td> <td><?php echo $gr['pan']; ?></td> <td> <a href="<?php echo base_url().'webapp/master/ledger/view_ledger/'.$enc_id; ?>" class="btn btn-primary"><i class="fa fa-eye" aria-hidden="true"></i></a> <?php if($gr['ledger_count'] > 0){ ?> <a data-toggle="tooltip" data-placement="left" title="New ledgers available, Click hear to generate XML" href="<?php echo base_url().'webapp/master/ledger/ledger_xml/'.$enc_id; ?>" class="btn btn-success"> <i class="fa fa-files-o" aria-hidden="true"></i></a> <?php } ?> </td> </tr> <?php } ?> </tbody> </table> <span class="page"> <?php echo $this->pagination->create_links(); ?> </span> </div><!-- /.box-body --> </div><!-- /.box --> </div> </div> <!-- /.row --> <?php echo form_close(); ?> </section><!-- /.content --> </div><!-- /.content-wrapper --> <?php require_once(APPPATH.'views/webapp/footer.php');?> <script type="text/javascript"> $(document).ready(function(){ //---------------- delete message ------------------------------------- $('#deletedata').click(function() { var exists = $('input[type=checkbox][name^=ck]:checked').filter(':checked').length; if( !exists ) { alert('Please select at least 1 checkbox!'); return false; } else if(confirm('Are you sure you want to delete this Data?')) { var cct = $.cookie("<?php echo $this->config->item('csrf_cookie_name'); ?>"); var postData = $('input[type=checkbox][name^=ck]:checked').serialize(); $.post("postmanagement/deletepostselected",{ck: postData,'<?php echo $this->security->get_csrf_token_name(); ?>': cct}, function(data,status){ location.reload(); }); //$('#formid').submit(); } else { return false; } }); }); </script> <script type="text/javascript"> $('.ledger_file').change(function(e){ var file = $(this).val(); var ext = file.split('.').pop(); if(ext != 'csv' && ext != 'xlsx'){ $('.ledger_file').val(''); alert('Sorry, Permitted files for select are csv, xlsx'); } }); </script>
Copyright ©2021 || Defacer Indonesia