forked from monika-gautam/Bill-App-Latest-version
-
Notifications
You must be signed in to change notification settings - Fork 0
/
billClaim_history.php
74 lines (74 loc) · 2.61 KB
/
billClaim_history.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<html>
<head>
<title> Bill Claim - Record Status </title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css">
<script type="text/javascript">
//stopping browser back button
history.pushState(null, null, 'Cab form');
window.addEventListener('popstate', function(event) {
history.pushState(null, null, 'Cab form');
});
function status_back(){
document.myForm.action="cabBills.html";
document.myForm.submit();
}
</script>
</head>
<body>
<form class="pure-form pure-form-stacked" name="myForm" method="post"
<?php
$dbhandle = mysqli_connect("localhost", "root", "mysql","cabBills")
or die("Unable to connect to MySQL");
$dateval = $_POST['dateval'];
$id = $_POST['id'];
$sql1="select * from collectdata where id='".$id."' and submission_date='".$dateval."'";
$result1= mysqli_query($dbhandle,$sql1);
?>
<br>
<br>
<center>
<h2><legend>Below are the details of the Expense Claim for Date:- "<?= $dateval ?>"</legend></h2>
<br>
<center> <div id="mydiv">
<label for="id">Employee ID</label>
<input id="id" type="email" name="id" value="<? echo $id ?>" size="5" readonly>
<br>
<label for="dateval">Submission Date(yyyy/mm/dd)</label>
<input type="text" name="dateval" id="dateval" value="<? echo $dateval ?>" size="8" readonly>
<br>
<center>
<table class="pure-table pure-table-bordered">
<thead>
<tr>
<th><center>Date</center></th>
<th><center>Board Time</center></th>
<th><center>Amount</center></th>
<th><center>Rate</center></th>
</tr>
</thead>
<?
$total=0.00;
while ($row = mysqli_fetch_array($result1,MYSQLI_NUM))
{
$aed= number_format(($row{4}*$row{5}), 2,'.', '');
$total=number_format(($total+$aed), 2,'.', '');
?>
<tr>
<td><center><? echo $row{2} ?></center></td>
<td><? echo $row{3} ?></td>
<td><center><? echo $row{4} ?></center></td>
<td><center><? echo $row{5} ?></center></td>
</tr>
<?
}
?>
</table>
<br>
<div style ='font:17px Tahoma;color:#Blue'> TOTAL : <? echo $total ?></div>
<br>
</div>
<input type="button" class="pure-button pure-button-primary" value="Back" onClick="status_back()">
</center>
</form>
</body>
</html>