-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathshow_seller_bill.php
202 lines (192 loc) · 6.68 KB
/
show_seller_bill.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<?php
require 'config.php';
$conn = connection();
$sql = "SELECT * FROM seller_bill_records ORDER BY bill_entrydt DESC";
$data = $conn->query($sql);
?>
<!-- MODAL OPEN -->
<div id="form-bp1" role="dialog" class="modal fade colored-header colored-header-dark">
<div class="modal-dialog">
<div class="modal-content" style="width:800px;">
<div class="modal-header" style="background-color: #F27C21; height: 100px;">
<div class="col-md-12">
<div class="col-md-6">
<h3 class="modal-title"><strong>SELLER BILL</strong></h3>
</div>
<div class="col-md-6">
<div class="btn-group btn-space" style="float: right;">
<button class="btn btn-space md-trigger btn-danger" style="width: 100px;" onclick="sprints();" formtarget="_blank"><i class="icon icon-left mdi mdi-assignment"></i> Print</button>
<button type="button" class="close" data-dismiss="modal" style="float: right;">×</button>
</div>
</div>
</div>
</div>
<div class="modal-body">
<span id="sview_bill">
</span>
</div>
</div>
</div>
</div>
<!-- MODAL CLOSE -->
<div class="col-md-12">
<div class="col-md-12">
<div class="panel panel-full-color panel-primary">
<div class="panel-heading panel-heading-contrast" style="background-color: #9A1750;"><strong>SELLER BILLING DETAILS</strong>
<div class="tools"><span class="icon mdi"></span></div><span class="panel-subtitle"></span>
</div>
<div class="panel-body" style="background-color: #5d001e;">
<div class="col-md-4">
<label class="control-label panel-subtitle" style="color:white;font-size:20px;">Search by Name</label>
<input type="text" placeholder="Enter Name..." id="name" onkeyup="ssrch_showbill();" class="form-control input-xs">
</div>
<div class="col-md-4">
<label class="control-label panel-subtitle" style="color:white;font-size:20px;">Search by Bill no.</label>
<input type="text" placeholder="Enter bill no." id="bill_no" onkeyup="ssrch_showbill();" class="form-control input-xs">
</div>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="panel panel-default panel-table">
<div class="panel-heading text-center"><strong>SELLER BILL DETAILS</strong></div>
<div class="panel-body">
<span id="ssrch_showbill">
<table class="table table-condensed table-hover table-bordered table-striped">
<thead>
<tr>
<th><center>S. no.</center></th>
<th><center>Bill no.</center></th>
<th><center>Name</center></th>
<th><center>Total Amount</center></th>
<th><center>GSTIN</center></th>
<th><center>Transport Charge</center></th>
<th><center>Transport no.</center></th>
<th><center>Entry Date</center></th>
<th><center>Action</center></th>
</tr>
</thead>
<tbody style="color:black;">
<?php $s=0;
foreach ($data as $row){ $s++; ?>
<tr>
<td><center><?php echo $s; ?></center></td>
<td><center><strong><?php echo $row['bill_id']; ?></strong></center></td>
<td><strong><?php echo ucwords($row['bill_name']); ?></strong></td>
<td><strong><?php echo $row['bill_amt']."/-"; ?></strong></td>
<td><strong><input type="text" name="trans_no" value="<?php echo $row['bill_gst'];?>" onkeyup="sfill_gst(<?php echo $row['bill_id']; ?>, this.value);" class="form-control input-xs"></strong></td>
<td><strong><input type="text" name="trans_no" value="<?php echo $row['bill_tchrg'];?>" onkeyup="sfill_chrg(<?php echo $row['bill_id'];?>, this.value);" class="form-control input-xs"></strong></td>
<td><strong><input type="text" name="trans_no" value="<?php echo $row['bill_tno'];?>" onkeyup="sfill_tno(<?php echo $row['bill_id']; ?>, this.value);" class="form-control input-xs"></td>
<td><strong><?php echo $row['bill_entrydt']; ?></td>
<td><center><button data-toggle="modal" onclick="sview_bill(<?php echo $row['bill_id']; ?>)" data-target="#form-bp1" class="btn btn-danger text-center">View</button></center></td>
</tr>
<?php } ?>
</tbody>
</table>
</span>
</div>
</div>
</div>
</div>
<!-- <script>
function srch_showbill()
{
var name = $('#name').val();
var bill_no = $('#bill_no').val();
// alert(bill_no);
$.ajax({
type: "POST",
url: 'srch_bill.php',
data: {name:name,bill:bill},
success:function(msg) {
alert(msg);
$('#srch_showbill').html(msg);
}
});
}
</script> -->
<!-- <script>
function srch_showbill()
{
var name = $('#name').val();
var bill_no = $('#bill_no').val();
var type = 2;
$.ajax({
type: "POST",
url: 'srch_showbill.php',
data: {name:name,bill_no:bill_no,type:type},
success:function(msg) {
// alert(msg);
$('#srch_showbill').html(msg);
}
});
}
</script> -->
<!-- <script type="text/javascript">
function view_bill(id)
{
// alert(id);
$.ajax({
type: "POST",
url: 'view_bill.php',
data: {id:id},
success:function(msg) {
// alert(msg);
$('#view_bill').html(msg);
}
});
}
</script>
<script type="text/javascript">
function fill_gst(id,value)
{
$.ajax({
type: "POST",
url: 'fill_gst.php',
data: {id:id,value:value},
success:function(msg) {
// alert(msg);
// $('#output').html(msg);
}
});
}
</script>
<script type="text/javascript">
function fill_chrg(id,value)
{
// alert(value);
$.ajax({
type: "POST",
url: 'fill_chrg.php',
data: {id:id,value:value},
success:function(msg) {
// alert(msg);
// $('#output').html(msg);
}
});
}
</script>
<script type="text/javascript">
function fill_tno(id,value)
{
$.ajax({
type: "POST",
url: 'fill_tno.php',
data: {id:id,value:value},
success:function(msg) {
// alert(msg);
// $('#output').html(msg);
}
});
}
</script>
<script type="text/javascript">
function prints()
{
var m = document.getElementById('view_bill').innerHTML;
var s = document.body.innerHTML;
document.body.innerHTML= document.getElementById('view_bill').innerHTML;
window.print();
document.body.innerHTML = s;
}
</script> -->