-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinward.php
142 lines (128 loc) · 5.54 KB
/
inward.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stitching Inward Entry</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="cloth1.css">
<script src="jquery-3.6.0.min.js"></script>
<script>
$(document).ready(function(){
// Get value on keyup funtion
$("#quantity, #damage").keyup(function(){
var total=0;
var x = Number($("#quantity").val());
var y = Number($("#damage").val());
var total=x - y;
$('#tquantity').val(total);
});
});
</script>
<style>
body {
background-color: #F0F8FF ;
}
</style>
</head>
<body>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-7">
<div class="card mt-5">
<div class="card-header text-center">
<h4>Inward Entry</h4>
</div>
<div class="card-body">
<form method="">
<table style="width:50%" align="center">
<!--<tr>
<td><h5>Date<h5></td>
<td>
<input type="date" name= "date" required></td>
</tr>-->
<tr>
<td><h5>Bill No.<h5></td>
<td>
<input type="number" name="form_id" value="<?php if(isset($_GET['form_id'])){echo $_GET['form_id'];} ?>" class="form-control"></td><br>
<!-- <td>
<div class="col-md-4">
<button type="submit" class="btn btn-primary">Search</button></td>
</div>
<td>-->
</tr>
</table>
</form>
<div class="row">
<div class="col-md-12">
<hr>
<?php
$con = mysqli_connect("localhost","root","","inward");
if(isset($_GET['form_id']))
{
$form_id = $_GET['form_id'];
$query = "SELECT * FROM format WHERE id='$form_id' ";
$query_run = mysqli_query($con, $query);
if(mysqli_num_rows($query_run) > 0)
{
foreach($query_run as $row)
{
?>
<div class="form-group mb-3">
<label for="">TDate</label>
<input type="Date" name= "date" value="<?= $row['TDATE']; ?>" disabled class="form-control">
<!--</div>
<div class="form-group mb-3">-->
<label for="">Perticular</label>
<input type="text" disabled name= "perticular" value="<?= $row['PERTICULAR']; ?>" class="form-control">
<label for="">Partyname</label>
<input type="text" disabled name= "partyname" value="<?= $row['PARTYNAME']; ?>" class="form-control">
<!-- </div>
<div class="form-group mb-3">-->
<label for="">Emp name</label>
<input type="text" disabled name= "emp" value="<?= $row['EMP']; ?>" class="form-control">
<!--</div>
<div class="form-group mb-3">-->
<label for="">Quantity</label>
<input type="number" id="quantity" disabled name= "quantity" value="<?= $row['QUANTITY']; ?>" class="form-control">
<label for="">Damage</label>
<input type="number" name= "damage" disabled value="<?= $row['DAMAGE']; ?>"class="form-control">
<label for="">Total Quantity</label>
<input type="number" id="tquantity" disabled name= "tquantity" value="<?= $row['TQUANTITY']; ?>" class="form-control">
<!--</div>-->
<!--<div class="form-group mb-3">-->
<label for="">Taker Name</label>
<input type="text" name= "tname" disabled value="<?= $row['TNAME']; ?>"class="form-control">
<!--</div>-->
<label for="">Price</label>
<input type="text" name= "price" disabled value="<?= $row['PRICE']; ?>"class="form-control"><br>
<form>
<table align="center">
<tr>
<td><button type="submit" ><a href="inwardre.php?id=<?php echo $row['id'];?>">Update</a></button></td>
</tr>
</table>
</form>
<?php
}
}
else
{
echo "No Record Found";
}
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<table>
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>