whoami7 - Manager
:
/
proc
/
self
/
root
/
home
/
papecmvm
/
www
/
application
/
views
/
webapp
/
office_user
/
Upload File:
files >> //proc/self/root/home/papecmvm/www/application/views/webapp/office_user/form.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> Form </h1> <?php $qr = '<img src="https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=H82UA3KU720765*SBI1&choe=UTF-8" title="Link to Google.com" />'; ?> <ol class="breadcrumb"> <li><a href="<?php echo site_url('webapp/welcome')?>"><i class="fa fa-dashboard"></i> Dashboard</a></li> <li class="active">Form</li> </ol> </section> <!-- Main content --> <section class="content"> <!-- /.row --> <div class="row"> <div class="col-xs-12"> <?php if($this->session->flashdata('msg')){ echo $this->session->flashdata('msg'); }?> <div class="box box-primary"> <br> <div class="row" style="border-bottom: 1px solid #ecf0f5;"> <div class="col-sm-12"> <form method="POST" action="<?php echo base_url().'webapp/office/form_grid_date' ?>"> <div class="col-sm-2"> <div class="form-group"> <input required type="text" name="from_date" class="form-control date-picker" placeholder="From Date" value="<?php if(!empty($fdate)){echo $fdate;} ?>"> </div> </div> <div class="col-sm-2"> <div class="form-group"> <input required type="text" name="to_date" class="form-control date-picker" placeholder="To Date" value="<?php if(!empty($fdate)){echo $tdate;} ?>"> </div> </div> <div class="col-sm-2"> <input class="btn btn-warning text-capitalize" type="submit" name="date_submit" value="go"> </div> </form> <form method="POST" action="<?php echo base_url().'webapp/office/form_grid_custom' ?>"> <div class="col-sm-2 col-sm-offset-4"> <div class="form-group"> <input required type="text" name="voucher_srch" class="form-control" placeholder="Voucher No" value="<?php if(!empty($src)){echo $src;} ?>"> </div> </div> </form> </div><!--col-12--> </div><!--row--> <div class="row"> <br> <div class="col-sm-12"> <div class="col-sm-2"> <div class="form-group"> <select class="form-control grid_type" name="grid_type" onchange="location = this.value;"> <option <?php if(!empty($status)){ if($status == 'all'){echo 'selected';} } ?> value="<?php echo base_url().'webapp/office/form_grid'; ?>">All</option> <option <?php if(!empty($status)){ if($status == 'approved'){echo 'selected';} } ?> value="<?php echo base_url().'webapp/office/form_grid_aprv'; ?>">Approved</option> <option <?php if(!empty($status)){ if($status == 'panding'){echo 'selected';} } ?> value="<?php echo base_url().'webapp/office/form_grid_panding'; ?>">Pending</option> <option <?php if(!empty($status)){ if($status == 'rejected'){echo 'selected';} } ?> value="<?php echo base_url().'webapp/office/form_grid_rejected'; ?>">Rejected</option> </select> </div> </div> <?php if($userdata[0]['type'] == 'office_user'){ $offset = 'col-sm-offset-6'; }else{ $offset = 'col-sm-offset-6'; } ?> </div><!--col-12--> </div><!--row--> <?php $attributes = array('id' => 'formid'); echo form_open("webapp/leader/allStatus"); ?> <?php if($userdata[0]['type'] != 'office_user'){ ?> <div class="col-sm-12"> <div class="form-group"> <input type="submit" name="save" class="btn btn-primary aprv" value="✔ Approve & Generate XML"> </div> </div> <?php } ?> <?php /* <div class="box-header"> <div class="text-left"> <a href="<?php echo base_url(); ?>webapp/office/excel" class="btn btn-primary"><i class="fa fa-file-excel-o" aria-hidden="true"></i> Excel Export</a> </div> </div><!-- /.box-header --> */ ?> <div class="box-body"> <?php if($userdata[0]['type'] == 'team_leader' || $userdata[0]['type'] == 'admin'){ ?> <table id="" class="table table-bordered table-striped"> <thead> <tr> <th><input type="checkbox" <?php if(!empty($status)){if($status == 'panding'){ ?> id="checkAll" <?php } } ?> ></th> <th>Date</th> <th>Aprove Status</th> <th>Cust.</th> <th>Voucher No</th> <th>AMT Gross</th> <th>Action</th> </tr> </thead> <tbody class="my_search_two"> <?php foreach($form as $key) { $encrypted_id = $this->model->encryptdata($key['fid']); ?> <tr <?php if($key['release_status'] == 'error'){ ?> style="background-color: #ffdcdc"; <?php } elseif($key['approve_status'] == 'approved'){ ?> style="background-color: #c1ffe3"; <?php } ?> > <td> <input class="frmText" type="checkbox" name="check_approve[]" value="<?php echo $key['fid']; ?>" <?php if($key['approve_status'] == 'approved' || $key['release_status'] == 'error'){echo "disabled";} ?> ></td> <td class="text-capitalize"> <a href="<?php echo base_url().'webapp/office/viewForm/'.$encrypted_id; ?>"><?php echo date("d-m-Y", strtotime($key['m_date'])); ?></a><br> <strong class="text-danger">Released By <?php echo $key['name']; ?></strong> <br> <?php if($key['release_status'] == 'error'){ ?> <strong class="text-danger">Rejected</strong> <?php } ?> <br> <span style="cursor: pointer;" title="View" data-toggle="modal" data-target="#check" onclick="check(<?php echo $key['fid']; ?>)" class="check fa fa-eye text-green"></span> <?php if($key['approve_status'] == 'panding'){ if($key['release_status'] == 'released'){ ?> | <span style="cursor: pointer;" title="Reject" data-toggle="modal" data-target="#reject" class="reject fa fa-times text-red" onclick="reject(<?php echo $key['fid']; ?>)"></span> <?php } } ?> </td> <td> <?php if($key['approve_status'] == 'panding'){ ?> <span class="label label-danger text-capitalize"> <?php }else{ ?> <span class="label label-success text-capitalize"> <?php } ?> <?= ($key['approve_status'] == "panding") ? "pending" : "Approved" ?> </span> </td> <td class="text-capitalize"><?php echo $key['cname'].'<br><strong class="text-danger">'.$key['stage'].'</strong>'.'<br><strong class="text-danger">'.$key['voucher_type'].'</strong>'; ?></td> <td><?php echo $key['voucher_no']; ?></td> <td><?php echo $key['amt_gross']; ?></td> <td> <?php $stage = $key['stage']; if($stage == 'contra'){ $url = base_url().'webapp/office/update_contra/'.$encrypted_id; }elseif($stage == 'receipt'){ $url = base_url().'webapp/office/update_receipt/'.$encrypted_id; }elseif($stage == 'payment'){ $url = base_url().'webapp/office/update_payment/'.$encrypted_id; }elseif($stage == 'journal'){ $url = base_url().'webapp/office/update_journal/'.$encrypted_id; }elseif($stage == 'credit'){ $url = base_url().'webapp/office/update_credit/'.$encrypted_id; }elseif($stage == 'debit'){ $url = base_url().'webapp/office/update_debit/'.$encrypted_id; }elseif($stage == 'cheque_reg'){ $voucher_type = $key['voucher_type']; if($voucher_type == 'payment'){ $url = base_url().'webapp/office/update_payment/'.$encrypted_id; }else{ $url = base_url().'webapp/office/update_receipt/'.$encrypted_id; } }elseif($stage == 'bank'){ $voucher_type = $key['voucher_type']; if($voucher_type == 'payment'){ $url = base_url().'webapp/office/update_payment/'.$encrypted_id; }elseif($voucher_type == 'receipt'){ $url = base_url().'webapp/office/update_receipt/'.$encrypted_id; }else{ $url = base_url().'webapp/office/update_contra/'.$encrypted_id; } }else{ $url = base_url().'webapp/office/update_form/'.$encrypted_id; } ?> <?php if($key['approve_status'] != 'approved'){ ?> <a href="<?php echo $url; ?>" class="btn btn-info" data-toggle="tooltip" data-placement="top" title="Update"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> </a> <?php } ?> <?php if($userdata[0]['type'] == 'admin' && $key['approve_status'] != 'approved'){ ?> <a onclick="return confirm('Are you sure you want to delete?');" href="<?php echo base_url().'webapp/office/trash_form/'.$encrypted_id; ?>" class="btn btn-danger" <?php echo $key['approve_status']; if($key['approve_status'] == 'approved'){ ?> data-toggle="tooltip" data-placement="top" title="Approved, Can't Delete" disabled <?php } else { ?> data-toggle="tooltip" data-placement="top" title="Delete" <?php } ?> ><i class="fa fa-trash" aria-hidden="true"></i></a> <?php } ?> <?php if($key['approve_status'] == 'approved'){ ?> <a target="_blank" data-toggle="tooltip" data-placement="top" title='Generate XML' class="btn btn-primary" href="<?php echo base_url().'webapp/office/xml/'.$encrypted_id; ?>"> <i class="fa fa-file" aria-hidden="true"></i> </a> <?php } ?> </td> </tr> <?php } ?> </tbody> </table> <?php if(empty($nopage)){ echo $this->pagination->create_links(); } ?> <?php }else{ ?> <table id="" class="table table-bordered table-striped"> <thead> <tr> <th>Date</th> <th>Aprove Status</th> <th>Cust.</th> <th>Voucher No</th> <th>Amount Gross</th> </tr> </thead> <tbody class="my_search_two"> <?php foreach($form as $key) { $encrypted_id = $this->model->encryptdata($key['fid']); ?> <tr> <td class="text-capitalize"> <a href="<?php echo base_url().'webapp/office/viewForm/'.$encrypted_id; ?>"><?php echo date("d-m-Y", strtotime($key['m_date'])); ?></a> </td> <td> <?php if($key['approve_status'] == 'panding'){ ?> <span class="label label-danger text-capitalize"> <?php }else{ ?> <span class="label label-success text-capitalize"> <?php } ?> <?php echo $key['approve_status']; ?> </span> </td> <td class="text-capitalize"><?php echo $key['cname'].'<br><strong class="text-danger">'.$key['stage'].'</strong>'.'<br><strong class="text-danger">'.$key['voucher_type'].'</strong>'; ?></td> <td><?php echo $key['voucher_no']; ?></td> <td><?php echo $key['amt_gross']; ?></td> </tr> <?php } ?> </tbody> </table> <?php if(empty($nopage)){ echo $this->pagination->create_links(); } // <div style='' class="pull-right pagination_div pagination" id="pagination"> ?> <?php } ?> <?php echo form_close(); ?> </div><!-- /.box-body --> </div><!-- /.box --> </div> </div> <!-- /.row --> </section><!-- /.content --> </div><!-- /.content-wrapper --> <!-- Modal for check --> <div class="modal fade" id="check" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog modal-lg" 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> <h5 class="modal-title mhead text-capitalize text-red" id="myModalLabel"></h5> </div> <div class="modal-body"> <span class="inner"></span> <span class="sub"></span> </div> </div> </div> </div> <!-- Modal --> <div class="modal fade" id="reject" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <?php echo form_open('webapp/leader/fromStatus'); ?> <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" id="myModalLabel">Reject Note</h4> </div> <div class="modal-body"> <span class="hidden_fid"></span> <div class="form-group"> <textarea class="form-control" name="note[]" required=""></textarea> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <input type="submit" class="btn btn-primary" name="save" value="Save"> </div> <?php echo form_close(); ?> </div> </div> </div> <?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; } }); }); $(".aprv").click(function(){ var checkboxes = $("input[type='checkbox']"); if(checkboxes.is(":checked")){ //alert("checked"); /* confirm('Are you sure you want to approve?'); return true;*/ if (confirm('Approve OR Generate XML?')) { return true; } else { return false; } }else{ alert("select at least one checkbox"); return false; } }); $(document).on('change', '.grid_type', function(e) { var type = $(this).val(); var controller = 'webapp/office'; var base_url = '<?php echo site_url(); ?>'; $('#loadingDiv').show(); $.ajax({ 'url' : base_url + controller + '/grid_type/' + type, 'type' : 'POST', 'success' : function(data){ $('.my_search').html(data); } }); }); /* //$( "a" ).click(function( event ) { $('.pagination').on('click', 'a', function (e) { e.preventDefault(); var pageno = $(this).attr('data-ci-pagination-page'); Pagination(pageno); }); function Pagination(pageno){ var controller = 'webapp/office'; var base_url = '<?php echo site_url(); ?>'; $('#loadingDiv').show(); $.ajax({ 'url' : base_url + controller + '/form_grid_json/' + pageno, 'type' : 'POST', 'success' : function(data){ data = $.parseJSON(data); console.log(data); //alert(data); $('.my_search_two').html(data); } }); } */ /* $.ajax({ 'url' : base_url + controller + '/form_grid_json/' + pageno, type: "POST", //data: {status: status, stage: stage, onlyByStatus: onlyByStatus, uid: uid, dateFilter: dateFilter}, dataType: 'json', success: function (result) { if (result.status == 'Success') { //$("html, body").animate({scrollTop: $(document).height()}, 50); //$('#loadingDiv').hide(); $('.my_search_two').html(result.html); $('.pagination').html(result.pagination); } }); */ function check(id){ //alert (id); //$('#check').modal('show').on('shown.bs.modal', function() { var base_url = '<?php echo base_url('webapp/office/checkForm/'); ?>'; $('#loadingDiv').show(); $.ajax({ 'url' : base_url + id, //'type' : 'GET', dataType: 'json', 'success' : function(data){ $('#loadingDiv').hide(); //result = $.parseJSON(data); $(".mhead").html(data.head); $(".inner").html(data.html); if(data.sub){ $(".sub").html(data.sub); }else{ $(".sub").html(''); } } }); // }); } function reject(id){ var base_url = '<?php echo base_url('webapp/office/getRejectId/'); ?>'; $.ajax({ 'url' : base_url + id, dataType: 'json', 'success' : function(data){ //result = $.parseJSON(data); $(".hidden_fid").html(data.html); } }); } $("#checkAll").click(function(){ $('input:checkbox').not(this).prop('checked', this.checked); }); </script>
Copyright ©2021 || Defacer Indonesia