197 lines
11 KiB
PHP
Executable File

<!--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 class="nav-item <?php if ($tab==1) echo 'active'; ?> first current">
<a class="nav-link" href="<?php echo base_url(); ?>generate_bill" role="tab" aria-selected="true" style="padding-top: 52px !important; border: none; cursor: pointer;"><span class="step">1</span>Basic Info</a>
</li>
<li class="nav-item <?php if ($tab==2) echo 'active'; ?> first current" >
<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>Contact Info</a>
</li>
<li class="nav-item <?php if ($tab==3) echo 'active'; ?> first current">
<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>Generate Bill</a>
</li>
</ul>
</div>
</div>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade <?php if ($tab==2) echo 'active in show'; ?>" id="tab2" role="tabpanel" aria-labelledby="profile-tab">
<form role="form" action="<?php echo base_url(); ?>" method="post" enctype="multipart/form-data" data-toggle="validator" novalidate="true">
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
<table class="table table-bordered">
<thead>
<tr>
<th scope="col">
<label class="checkboxCustom">
<input type="checkbox" id="checkAll">
<span class="checkmark"></span>
</label> Check all
</th>
<th>Caregiver Name</th>
<th>Patient Name</th>
<th>Date</th>
<th>Time In</th>
<th>Time Out</th>
<th>Period</th>
</tr>
</thead>
<tbody id="patientMapCOd">
<?php
foreach ($caregiver as $value) { ?>
<tr>
<th scope="row"><input type="checkbox" name="patient_list[]" class="check_bill" value="<?= $value->id; ?>"></th>
<td><?= $value->caregiver_fname." ".$value->caregiver_lnam ?></td>
<td><?= $value->patient_name ?></td>
<td><?= $value->date ?></td>
<td><?= $value->timeIn ?></td>
<td><?= $value->timeOut ?></td>
<?php $from_time = strtotime($value->timeIn);
$to_time = strtotime($value->timeOut);
$dateDiff = round(abs($to_time - $from_time) / 60,2);
$hours = intval($dateDiff/60);
$minutes = $dateDiff%60;
$period = $hours."Hrs ".$minutes."Mins"; ?>
<td><?= $period ?></td>
</tr>
<?php }
?>
</tbody>
</table>
<div class="form-group col-md-12">
<button type="submit" name="submit" class="btn btn-info "><?php echo lang('submit'); ?></button>
<a class="btn btn-info btn-min-width" title="<?php echo lang('Back'); ?>" href="<?php echo base_url(); ?>generate_bill">
<i class="fa fa-undo" aria-hidden="true"></i> <?php echo lang('Back'); ?>
</a>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<!-- page end-->
</section>
</section>
</div>
</div>
</div>
</div>
</section>
</div>
<script>
$("#checkAll").click(function () {
if ($(this).is(':checked')) {
$('.check_bill').prop('checked', true);
} else {
$('.check_bill').prop('checked', false);
}
});
</script>
<!--main content end-->
<!--footer start-->