-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathnew-supply.php
158 lines (147 loc) · 5.76 KB
/
new-supply.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?php
session_start();
if(!isset($_SESSION['store_id'])) {
header("location:login.php");
exit();
}else{
include('config/db.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Pharmacy</title>
<!-- All CSS -->
<?php include("part/all-css.php");?>
<!-- All CSS end -->
</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">
<!-- Navbar -->
<?php include("part/navbar.php");?>
<!-- Navbar end -->
<!-- Sidebar -->
<?php include("part/sidebar.php");?>
<!-- Sidebar end -->
<div class="content-wrapper">
<section class="container-fluid">
<div class="row">
<div class="card card-default col-md-12 col-lg-9">
<div class="card-header py-2">
<div class="d-flex justify-content-between align-items-center">
<div>
<h6 class="fs-17 font-weight-600 mb-0">New Supply</h6>
</div>
<div class="text-right">
<a href="manage-supply.php" class="btn btn-info btn-sm mr-1"><i class="fas fa-align-justify mr-1"></i>Manage Supply</a>
</div>
</div>
</div>
<div class="card-body">
<form action="actions/addNewSupply.php" method="POST">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label for="name">Title</label>
<input type="text" class="form-control" placeholder="Enter a title / Supplier name" name="title" required>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label for="name">Supply Date</label>
<input type="date" class="form-control" placeholder="Enter supply date" value="<?php echo date('Y-m-d');?>" name="supplydate" required>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label for="name">Supplier</label>
<select class="form-control select2" name="supplier">
<option value="" selected="selected"></option>
<?php
$sql = $conn->query("SELECT `id`, `name`, `phone` FROM `p_supplier` WHERE `store` = '$_SESSION[store_id]'");
while($row = mysqli_fetch_assoc($sql)){
?>
<option class="text-capitalize" value="<?php echo $row['name']." (".$row['phone'].")"; ?>"><?php echo ucfirst($row['name'])." (".$row['phone'].")"; ?></option>
<?php
}
?>
</select>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label for="name">Medicine Supply Details</label>
<textarea name="details" class="form-control" rows="5" placeholder="Ex.
1. Baxidal - 10pc - 30tk
2. Losactil - 10pc - 50tk"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="name">Total</label>
<input type="number" class="form-control" placeholder="Enter total amount" name="total">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="name">Payable</label>
<span class="text-danger">(Keep it blank if no Discount applied)</span>
<input type="number" class="form-control" name="payable" placeholder="Enter payable amount after discount">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="name">Paid</label>
<input type="number" class="form-control" placeholder="Enter paid amount" name="paid">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="name">Due</label>
<input type="number" class="form-control" name="due" placeholder="Enter due amount">
</div>
</div>
</div>
<div class="form-row">
<button type="submit" name="submit" class="btn btn-info"> <i class="fa fa-save mr-2"></i> Save </button>
</div>
</form>
</div>
</div>
<!-- ads start -->
<div class="d-none d-lg-block col-lg-3">
<div class="card">
<a href="#"> <img src="dist/img/clinic.jpg" alt="" class="img-fluid"> </a>
</div>
</div>
<!-- ads end -->
</div>
</div>
</section>
</div>
<!-- Footer -->
<?php include("part/footer.php");?>
<!-- Footer End -->
</div>
<!-- Alert -->
<?php include("part/alert.php");?>
<!-- Alert end -->
<!-- All JS -->
<?php include("part/all-js.php");?>
<!-- All JS end -->
<!-- Page specific script -->
<script>
$(function () {
$(".select2").select2({
tags: true,
placeholder: "Type / Select supplier. Ex - name (phone number)"
});
$(".select2bs4").select2({
theme: "bootstrap4",
});
});
</script>
</body>
</html>