270 lines
12 KiB
PHP
Executable File

<?php
?>
<!--sidebar end-->
<!--main content start-->
<style type="text/css">
.required-field:after {
content: "*";
color: red;
}
.form-control.multiselect-class{
height: 100px !important;
}
.app-content .wizard > .steps > ul > li.active .step {
background-color: #666EE8;
border-color: #666EE8;
color: #fff;
}
.has-error input[type="text"], .has-error input[type="email"], .has-error input[type="password"], .has-error input[type="date"], .has-error select[multiple], .has-error select {
border: 1px solid #a94442;
}
.help-block.with-errors {
color: #a94442;
}
.full-height-view{
height: 500px !important;
}
</style>
<div class="app-content content">
<section class="content-wrapper">
<div class="content-body">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header card-header-title-part">
<div class="row">
<div class="col-md-12">
<header class="panel-heading font-weight-bold">
<h3>
<?php
echo lang('Generate Bill');
?>
</h3>
</header>
</div>
</div>
</div>
<hr class="mt-0 mb-0" />
<section id="main-content">
<section class="wrapper site-min-height mt-20">
<section class="row col-md-12">
<div class="panel-body col-md-12">
<?php if($this->session->flashdata('feedback_error')){ ?>
<script>
Swal.fire({
position: 'center',
icon: 'error',
title: '<?php echo $this->session->flashdata('feedback_error'); ?>',
showConfirmButton: false,
timer: 3500
})
</script>
<?php } ?>
<?php if($this->session->flashdata('feedback_success')){ ?>
<script>
Swal.fire({
position: 'center',
icon: 'success',
title: '<?php echo $this->session->flashdata('feedback_success'); ?>',
showConfirmButton: false,
timer: 3500
})
</script>
<?php } ?>
<!-- <div class="col-lg-3"></div>
<div class="col-lg-6"> -->
<?php echo validation_errors(); ?>
<?php //echo $this->session->flashdata('feedback'); ?>
</div>
<div class="col-lg-12">
<?php if (!empty($nurse->id)){ ?>
<a href="<?php echo base_url(); ?>caregivers/ChangePassword?id=<?php echo $nurse->id; ?>" class=" float-right"><?php echo lang('Change Password of this Caregiver');?></a>
<?php } ?>
</div>
<div class="col-md-12">
<div class="wizard wizard-circle">
<div class="steps">
<ul class="nav nav-tabs" id="myTab" role="tablist" style="border: none;">
<li id="patienInfo" class="nav-item <?php if ($tab==1) echo 'active'; ?> first current disabled">
<a class="nav-link " id="tab1-tab" data-toggle="tab" href="#tab1" role="tab" aria-selected="true" style="padding-top: 52px !important; border: none; cursor: pointer;"><span class="step">1</span>Summary</a>
</li>
<li id="caregiverInfo" class="nav-item <?php if ($tab==2) echo 'active'; ?> first current disabled" >
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#tab2" role="tab" aria-selected="false" style="padding-top: 52px !important; border: none; cursor: pointer;"><span class="step">2</span>Time Sheet</a>
</li>
<li id="genBill" class="nav-item <?php if ($tab==3) echo 'active'; ?> first current disabled">
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#tab3" role="tab" aria-selected="false" style="padding-top: 52px !important; border: none; cursor: pointer;"><span class="step">3</span>Genarate Bill</a>
</li>
</ul>
</div>
</div>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade <?php if ($tab==1) echo 'active in show'; ?>" id="tab1" role="tabpanel" aria-labelledby="" style="padding: 20px;">
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
<!--data-toggle="validator" novalidate="true"-->
<div class="card-content collapse show">
<div class="card-body card-dashboard">
<div class="panel-body">
<div class="adv-table editable-table ">
<div class="space15"></div>
<table class="table table-striped table-bordered dom-jQuery-events" id="editable-sample" cellspacing="0" width="100%">
<thead>
<tr>
<th>Sl No.</th>
<th>Patient Name</th>
<th>Billed</th>
<th>Unbilled</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="tableContaint">
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade <?php if ($tab==2) echo 'active in show'; ?>" id="tab2" role="tabpanel" aria-labelledby="profile-tab">
</div>
<div class="tab-pane fade <?php if ($tab==3) echo 'active in show'; ?>" id="tab3" role="tabpanel" aria-labelledby="contact-tab">
</div>
</div>
</div>
</section>
<!-- page end-->
</section>
</section>
</div>
</div>
</div>
</div>
</section>
</div>
<script>
$("#checkAll").click(function () {
alert();
if ($(this).is(':checked')) {
$('.check_bill').prop('checked', true);
} else {
$('.check_bill').prop('checked', false);
}
});
function billGenerateId(id){
//console.log(skill);
//alert(id);
$.ajax({
url:"generate_bill/selectForBilling",
type:"POST",
data:{id:id, <?php echo $this->security->get_csrf_token_name(); ?>:'<?php echo $this->security->get_csrf_hash(); ?>'},
dataType: "json",
success:function(data){
$(".nav-item").removeClass('active');
$("#caregiverInfo").addClass('active');
$(".tab-pane").removeClass('active in show');
$("#tab2").addClass('active in show');
$("#tab2").html(data.view_link);
}
});
}
$(document).ready(function () {
// $('#editable-sample').DataTable();
var table = $('#editable-sample').DataTable({
"processing": true,
"serverSide": true,
"searchable": true,
"responsive": true,
"ajax": {
url: "<?php echo base_url(); ?>generate_bill/getList",
type: 'POST',
data: {
<?php echo $this->security->get_csrf_token_name(); ?> : '<?php echo $this->security->get_csrf_hash(); ?>'
},
},
scroller: {
loadingIndicator: true
},
dom: "<'row'<'col-sm-5 data-table-pagelimit'l><'col-sm-6 data-table-search'f><'col-sm-1 text-center data-table-button-collection'B>>" +
"<'row'<'col-sm-12 data-table-body'tr>>" +
"<'row'<'col-sm-5 data-table-pagecountsummary'i><'col-sm-7 data-table-pagination'p>>",
buttons: [
{
extend: 'collection',
text: '...',
buttons: [
'copyHtml5',
'excelHtml5',
'csvHtml5',
'pdfHtml5',
{
extend: 'print',
exportOptions: {
columns: [0, 1, 2, 3, 4],
}
}
]
},
],
aLengthMenu: [
[10, 25, 50, 100, -1],
[10, 25, 50, 100, "All"]
],
iDisplayLength: 100,
"order": [[1, "asc"]],
"language": {
"lengthMenu": "_MENU_",
search: "_INPUT_",
"url": "common/assets/DataTables/languages/<?php echo $this->language; ?>.json"
},
"columnDefs": [
{ "orderable": false, "targets": [0] }
]
});
table.buttons().container().appendTo('.custom_buttons');
});
</script>
<script type="text/javascript">
$( document ).ready(function() {
$('.nav-item').click(function(event){
if ($(this).hasClass('disabled')) {
return false;
}else{
$(".nav-item").removeClass("active");
$(this).addClass("active");
}
});
});
</script>
<script>
$( document ).ready(function() {
// $(".nav-item").click(function(){
// $(".nav-item").removeClass("active");
// $(this).addClass("active");
// })
});
</script>
<!--main content end-->
<!--footer start-->