-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathestimate.php
More file actions
97 lines (93 loc) · 3.87 KB
/
estimate.php
File metadata and controls
97 lines (93 loc) · 3.87 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html lang="en">
<head>
<?php
require_once('dbconnect.php');
include('general.php');
putLinks();
?>
</head>
<body>
<form action="/estimate.php" method="post" enctype="multipart/form-data">
<div class="row">
<div class="col-lg-12">
<?php
$conn = dbConn();
$Query = "SELECT e.CODE CODE,p.NAME NAME,e.PRICESELL PRICESELL,e.QUANTITY QUANTITY
FROM estimate e
INNER JOIN products p on p.CODE = e.CODE";
if($records = $conn->prepare($Query))
{
$records->execute();
$records->bind_result($CODE,$NAME,$PRICESELL,$QUANTITY);
echo "<table class=\"table table-table-striped\">";
echo '<thead>';
echo '<tr>';
echo "<th>BARCODE</th>";
echo "<th>ITEM</th>";
echo "<th>PRICE</th>";
echo "<th class=\"text-center\">QTY</th>";
echo "<th class=\"text-center\">Total</th>";
//echo "<th class=\"text-center text-danger glyphicon glyphicon-remove\"></th>";
echo "<th class=\"text-center\"><a href=\"./estimateActions.php?clear=All\"><span class=\"glyphicon glyphicon-remove text-danger \"></span></a></th>";
echo "<tbody>";
while($records->fetch())
{
echo "<tr>";
echo "<td>";
echo $CODE;
echo "</td>";
echo "<td>";
echo $NAME;
echo "</td>";
echo "<td class=\"text-center\">";
echo number_format(floatval($PRICESELL),2);
echo "</td>";
echo "<td class=\"text-center\">";
echo $QUANTITY;
echo "</td>";
echo "<td class=\"text-center\">";
echo number_format(floatval($PRICESELL*$QUANTITY),2);
echo "</td>";
echo "<td class=\"text-center\">";
echo "<a href=\"./estimateActions.php?delrec=$CODE\"><span class=\"glyphicon glyphicon-remove text-danger \"></span></a>";
echo "</td>";
echo "</tr>";
}
echo "</tbody>";
echo "<tfoot>";
echo "<tr>";
echo "<th></th>";
echo "<th></th>";
echo "<th></th>";
echo "<th></th>";
echo "<th>";
//echo "<form action=\"./estimate.php\" id=\"printform\" name=\"printform\" method=\"post\">";
echo "<a href=\"printestimate.php?command=print&redirect=estimate\" class=\"btn btn-success btn-block btn-md\" id=\"printestimate\" name=\"printestimate\">Print</a>";
//echo "</form>";
echo "</th>";
echo "</tr>";
echo "</tfoot>";
echo "</table>";
}
$records->close();
mysqli_close($conn);
$conn=null;
$Query ="";
?>
</div>
</div>
<?php
if (isset($_POST['printform']))
{
echo "hit!";
}
?>
<?php
//include('general.php');
putScripts();
//stickfooter();
?>
</form>
</body>
</html>