-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsales-details.php
More file actions
65 lines (64 loc) · 3.54 KB
/
sales-details.php
File metadata and controls
65 lines (64 loc) · 3.54 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
<?php
require_once'includes/initialize.php';
$stockh = Stockhistory::find_by_id(base64_decode(filter_input(INPUT_GET, "id", FILTER_DEFAULT)));
require_once 'layouts/header.php';
require_once './layouts/sidepane.php'; ?>
<div class="container1">
<h3 style="text-align: center; ">Sales details</h3>
<hr/>
<?php if(isset($message)){ echo "<h4 class='alert-info'>".$message."</h4>" ;} ?>
<ul class="navsmall">
<li><a href="sales-add.php"><h4>New Sale</h4></a></li>
<li><a href="sales-today.php"><h4>Today's Sales</h4></a></li>
<li><a href="sales-my.php"><h4>Search Sales</h4></a></li>
</ul><br />
<div id="container2">
<table class="form_table" style="width: 40%">
<tr>
<td><span class="help-inline"><label class="control-label" for="search">Date/Time:</label></span></td>
<td><?php echo datetime_to_text1($stockh->created); ?></td>
</tr>
<tr>
<td><span class="help-inline"><label class="control-label" for="search">Created By:</label></span></td>
<td><?php $user = User::find_by_id($stockh->createdby); if ($user){ echo "<b>".$user->name ."</b>";} ?></td>
</tr>
<tr>
<td><span class="help-inline"><label class="control-label" for="search">Item:</label></span></td>
<td><?php $stock = Stock::find_by_id($stockh->stock); if ($stock){ echo $stock->name;} ?></td>
</tr>
<tr>
<td><span class="help-inline"><label class="control-label" for="search">Unit Price GH (¢):</label></span></td>
<td><?php echo $stockh->price ?></td>
</tr>
<tr>
<td><span class="help-inline"><label class="control-label" for="search">Quantity:</label></span></td>
<td><?php echo $stockh->qty ?></td>
</tr>
<tr>
<td><span class="help-inline"><label class="control-label" for="search">Total Amount GH (¢):</label></span></td>
<td><?php echo $stockh->total_amount ?></td>
</tr>
<tr>
<td><span class="help-inline"><label class="control-label" for="search">Amount Paid GH (¢):</label></span></td>
<td><?php echo $stockh->amount_paid ?></td>
</tr>
<tr>
<td><span class="help-inline"><label class="control-label" for="search">Payment Option:</label></span></td>
<td><?php echo ucfirst($stockh->poption) ?></td>
</tr>
<tr><td colspan="2"><p> </p><p> </p></td></tr>
<tr>
<td></td>
<td>
<?php if($stockh->poption == "credit") { ?>
<a class="btn btn-warning" href="sales-edit.php?&id=<?php echo base64_encode($stockh->id) ?>">UPDATE SALE</a>
<?php } ?>
<a class="btn btn-danger" onclick="return confirm('Are you sure? removing this sale will update the stock item quantity')" href="delete.php?&id=<?php echo base64_encode($stockh->id) ?>&type=sale">REMOVE SALE</a>
</td>
</tr>
</table>
<hr />
</div>
</div>
<?php require_once './layouts/footer.php';