-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfill.html
575 lines (493 loc) · 24.1 KB
/
fill.html
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Data Management System</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<link href="Bootstrap/css/bootstrap.min.css">
<script src="Bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="JS/fill.js"></script>
<script>
$(document).ready(function(){
$("#logout").click(function(){
document.cookie="loggedIn=0";
window.location = 'logout.php';
});
});
</script>
<?php
if($_COOKIE['loggedIn']==0){
echo "
<script>
alert('User not logged in...Please log in first');
window.location ='index.html';
</script>
";
}
include 'connect.php';
$sql="select * from clientlist order by clientName";
$result=mysqli_query($con,$sql) or die($con->error);
$clientName=array();
$GSTNo=array();
$clientAddr=array();
if($result->num_rows>0){
while($row=$result->fetch_assoc()){
$clientName[]= $row['clientName'];
}
}
?>
<style>
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
</style>
</head>
<body class="container">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerDemo03"
aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="home.html">DMS</a>
<div class="collapse navbar-collapse" id="navbarTogglerDemo03">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Fill</a>
</li>
<li class="nav-item">
<a class="nav-link" href="Receivables.html">Receivables</a>
</li>
<li class="nav-item">
<a class="nav-link" href="Clients.html">Client List</a>
</li>
<li class="nav-item">
<a class="nav-link" href="services.html">SAC/Services List</a>
</li>
<li class="nav-item">
<a class="nav-link" href="GST-StateList.html">GST Codes</a>
</li>
</ul>
<button id="logout" class="btn btn-danger text-light" type="button">Logout</button>
</div>
</div>
</nav>
<div class="m-5 p-5 border border-muted bg-light text-dark">
<h2 class="text-center">Invoice Generation</h2>
<hr>
<div class="m-3">
<div class="col-auto">
<b><label class="col-form-label">Firm Selection</label></b>
</div>
<div class="col-auto">
<select id="firm" class="custom-select" required>
<option selected disabled value="0">Choose Firm</option>
<option value="1">Jinal Waghela & Associates</option>
<option value="2">MoneySphere Solutions</option>
<option value="3">H. Mistry & Associates</option>
</select>
</div>
<div class="col-auto">
<span id="clientNameHelpInline" class="form-text">
Must be 8-20 characters long.
</span>
</div>
</div>
<hr>
<h3 id="firmName" class="text-center text-primary"></h3>
<form id="GSTForm" class="border border-dark" action="insertInvoiceData.php" method="POST">
<div class="row m-3 col-12">
<div class="col-6">
<div class="col-auto">
<b><label for="fYearGST" class="col-form-label">Select Financial Year: </label></b>
</div>
<input type="text" id="fYearGST" class="form-control" aria-label="Default select example"
list="fYearListGST" placeholder="2021-22" />
<datalist id="fYearListGST">
<option data-id="1" >2000-01</option>
<option data-id="2" >2001-02</option>
<option data-id="3" >2002-03</option>
<option data-id="4" >2003-04</option>
<option data-id="5" >2004-05</option>
<option data-id="6" >2005-06</option>
<option data-id="7" >2006-07</option>
<option data-id="8" >2007-08</option>
<option data-id="9" >2008-09</option>
<option data-id="10" >2009-10</option>
<option data-id="11" >2010-11</option>
<option data-id="12" >2011-12</option>
<option data-id="13" >2012-13</option>
<option data-id="14" >2013-14</option>
<option data-id="15" >2014-15</option>
<option data-id="16" >2015-16</option>
<option data-id="17" >2016-17</option>
<option data-id="18" >2017-18</option>
<option data-id="19" >2018-19</option>
<option data-id="20" >2019-20</option>
<option data-id="21" >2020-21</option>
<option data-id="22" >2021-22</option>
<option data-id="23" >2022-23</option>
<option data-id="24" >2023-24</option>
<option data-id="25" >2024-25</option>
<option data-id="26" >2026-27</option>
<option data-id="27" >2027-28</option>
<option data-id="28" >2028-29</option>
<option data-id="29" >2029-30</option>
<option data-id="30" >2030-31</option>
<option data-id="31" >2031-32</option>
<option data-id="32" >2032-33</option>
<option data-id="33" >2033-34</option>
<option data-id="34" >2034-35</option>
<option data-id="35" >2035-36</option>
<option data-id="36" >2036-37</option>
<option data-id="37" >2037-38</option>
<option data-id="38" >2038-39</option>
<option data-id="39" >2039-40</option>
<option data-id="40" >2040-41</option>
</datalist>
</div>
<div class="col-6">
<div class="col-auto">
<b><label for="invoiceNumber" class="col-form-label">Invoice Number: </label></b>
</div>
<div class="col-auto">
<input type="text" name="invoiceNumber" id="invoiceNumber" class="form-control"
aria-describedby="invoiceNumberHelpInline" readonly>
</div>
<div class="col-auto">
<span id="invoiceNumberHelpInline" class="form-text">
Must be 8-20 characters long.
</span>
</div>
</div>
</div>
<div class="m-3">
<div class="col-auto">
<b><label for="invoiceDate" class="col-form-label">Invoice Date: </label></b>
</div>
<div class="col-auto">
<input type="date" class="form-control" name="invoiceDate" id="invoiceDate" placeholder="YYYY-MM-DD" autocomplete="off"
aria-describedby="invoiceDateHelpInline">
</div>
<div class="col-auto">
<span id="invoiceDateHelpInline" class="form-text">
Must be 8-20 characters long.
</span>
</div>
</div>
<div class="m-3">
<div class="col-auto">
<b><label for="clientName" class="col-form-label">Client Name: </label></b>
</div>
<div class="col-auto">
<input type="text" id="clientName" name="clientName" class="form-control" aria-label="Default select example"
list="cityname">
<datalist id="cityname">
<?php
$sql="select * from clientlist order by clientName";
$result=mysqli_query($con,$sql) or die($con->error);
if($result->num_rows>0){
while($row=$result->fetch_assoc()){
?>
<option data-id="<?php echo $row['clientId']; ?>">
<?php echo $row['clientName']; ?>
</option>
<?php
}
}
?>
</datalist>
</div>
<div class="col-auto">
<span id="clientNameHelpInline" class="form-text">
Must be 8-20 characters long.
</span>
</div>
</div>
<div class="m-3">
<div class="col-auto">
<b><label for="clientAddr" class="col-form-label">Client Address: </label></b>
</div>
<div class="col-auto">
<input type="text" id="clientAddr" name="clientAddr" class="form-control" aria-describedby="clientAddrHelpInline"
Readonly>
</div>
<div class="col-auto">
<span id="clientAddrHelpInline" class="form-text">
Must be 8-20 characters long.
</span>
</div>
</div>
<div class="m-3">
<div class="col-auto">
<b><label for="clientGST" class="col-form-label">Client GST: </label></b>
</div>
<div class="col-auto">
<input type="text" id="clientGST" name="clientGST" class="form-control" aria-describedby="clientGSTHelpInline"
Readonly>
</div>
<div class="col-auto">
<span id="clientGSTHelpInline" class="form-text">
Must be 8-20 characters long.
</span>
</div>
</div>
<div class="m-3">
<div class="col-auto">
<b><label for="stateCode" class="col-form-label">Select State for State Code: </label></b>
</div>
<div class="col-auto">
<select id="stateCode" name="stateCode" class="custom-select">
<option disabled selected>Choose State</option>
<?php
$query = "select * from gst_state_code_list";
$statCodeList = mysqli_query($con,$query);
while($row = mysqli_fetch_assoc($statCodeList)){
?>
<option value="<?php echo $row['state_code']; ?>"><?php echo $row['state_name']; ?></option>
<?php
}
?>
</select>
</div>
<div class="col-auto">
<span id="stateCodeHelpline" class="form-text">
Must be 8-20 characters long.
</span>
</div>
</div>
<hr>
<h4 class="text-center m-3">Invoice Particulars</h4>
<div id="perticularsGSTDrpDwn">
<div id="selectGSTParticular" class="m-3 row col-auto">
<div class="col-auto"><b><label for="clientName" class="col-form-label">Add Particulars:
</label></b></div>
<div class="col-6">
<input type="text" id="perticularGSTName" class="form-control"
aria-label="Default select example" list="perticulersGST">
<datalist id="perticulersGST">
<?php
$serviceSql1="select * from services where firmNameId=3";
$serviceResult1=mysqli_query($con,$serviceSql1) or die($con->error);
if($serviceResult1->num_rows>0){
while($serviceRow1=$serviceResult1->fetch_assoc()){
?>
<option data-id="<?php echo $serviceRow1['serviceId']; ?>">
<?php echo $serviceRow1["serviceName"]; ?>
</option>
<?php
}
}
?>
</datalist>
</div>
<div class="col-auto">
<button type="button" id="addBtn" class="btn btn-primary">Add Particular</button>
</div>
</div>
</div>
<hr>
<div class="m-3 col-auto form-inline">
<input type="submit" class="btn btn-success form-inline m-auto">
<input type="button" id="clear" class="btn btn-danger form-inline m-auto" value="Clear">
</div>
</form>
<form id="NGSTForm" action="insertInvoiceData.php" class="border border-dark" method="POST">
<div class="row m-3 col-12">
<div class="col-6">
<div class="col-auto">
<b><label for="fYear" class="col-form-label">Select Financial Year: </label></b>
</div>
<input type="text" id="fYear" class="form-control" aria-label="Default select example"
list="fYearList" placeholder="2021-22" />
<datalist id="fYearList">
<option data-id="1" >2000-01</option>
<option data-id="2" >2001-02</option>
<option data-id="3" >2002-03</option>
<option data-id="4" >2003-04</option>
<option data-id="5" >2004-05</option>
<option data-id="6" >2005-06</option>
<option data-id="7" >2006-07</option>
<option data-id="8" >2007-08</option>
<option data-id="9" >2008-09</option>
<option data-id="10" >2009-10</option>
<option data-id="11" >2010-11</option>
<option data-id="12" >2011-12</option>
<option data-id="13" >2012-13</option>
<option data-id="14" >2013-14</option>
<option data-id="15" >2014-15</option>
<option data-id="16" >2015-16</option>
<option data-id="17" >2016-17</option>
<option data-id="18" >2017-18</option>
<option data-id="19" >2018-19</option>
<option data-id="20" >2019-20</option>
<option data-id="21" >2020-21</option>
<option data-id="22" >2021-22</option>
<option data-id="23" >2022-23</option>
<option data-id="24" >2023-24</option>
<option data-id="25" >2024-25</option>
<option data-id="26" >2026-27</option>
<option data-id="27" >2027-28</option>
<option data-id="28" >2028-29</option>
<option data-id="29" >2029-30</option>
<option data-id="30" >2030-31</option>
<option data-id="31" >2031-32</option>
<option data-id="32" >2032-33</option>
<option data-id="33" >2033-34</option>
<option data-id="34" >2034-35</option>
<option data-id="35" >2035-36</option>
<option data-id="36" >2036-37</option>
<option data-id="37" >2037-38</option>
<option data-id="38" >2038-39</option>
<option data-id="39" >2039-40</option>
<option data-id="40" >2040-41</option>
</datalist>
</div>
<div class="col-6">
<div class="col-auto">
<b><label for="NinvoiceNumber" class="col-form-label">Invoice Number: </label></b>
</div>
<div class="col-auto">
<input type="text" name="NinvoiceNumber" id="NinvoiceNumber" class="form-control"
aria-describedby="NinvoiceNumberHelpInline" readonly>
</div>
<div class="col-auto">
<span id="NinvoiceNumberHelpInline" class="form-text">
Must be 8-20 characters long.
</span>
</div>
</div>
</div>
<div class="m-3">
<div class="col-auto">
<b><label for="NinvoiceDate" class="col-form-label">Invoice Date: </label></b>
</div>
<div class="col-auto">
<input type="date" class="form-control" name="NinvoiceDate" id="NinvoiceDate" placeholder="YYYY-MM-DD"
autocomplete="off" aria-describedby="NinvoiceDateHelpInline">
</div>
<div class="col-auto">
<span id="NinvoiceDateHelpInline" class="form-text">
Must be 8-20 characters long.
</span>
</div>
</div>
<div class="m-3">
<div class="col-auto">
<b><label for="NclientName" class="col-form-label">Client Name: </label></b>
</div>
<div class="col-auto">
<input type="text" id="NclientName" name="NclientName" class="form-control" aria-label="Default select example"
list="cityname">
<datalist id="Ncityname">
<?php
$sql="select * from clientlist order by clientName";
$result=mysqli_query($con,$sql) or die($con->error);
if($result->num_rows>0){
while($row=$result->fetch_assoc()){
?>
<option data-id="<?php echo $row['clientId']; ?>">
<?php echo $row['clientName']; ?>
</option>
<?php
}
}
?>
</datalist>
</select>
</div>
<div class="col-auto">
<span id="NclientNameHelpInline" class="form-text">
Must be 8-20 characters long.
</span>
</div>
</div>
<div class="m-3">
<div class="col-auto">
<b><label for="NclientAddr" class="col-form-label">Client Address: </label></b>
</div>
<div class="col-auto">
<input type="text" id="NclientAddr" name="NclientAddr" class="form-control" aria-describedby="NclientAddrHelpInline"
Readonly>
</div>
<div class="col-auto">
<span id="NclientAddrHelpInline" class="form-text">
Must be 8-20 characters long.
</span>
</div>
</div>
<hr>
<h4 class="text-center m-3">Invoice Particulars</h4>
<div id="perticularsNGSTDrpDwn">
<div id="selectNGSTParticular" class="m-3 row col-auto">
<div class="col-auto"><b><label for="clientName" class="col-form-label">Add Particulars:
</label></b></div>
<div class="col-6">
<input type="text" id="NGSTPerticularName" class="form-control"
aria-label="Default select example" list="perticulersNGST">
<datalist id="perticulersNGST">
<?php
$serviceSql2="select * from services where SAC=0";
$serviceResult2=mysqli_query($con,$serviceSql2) or die($con->error);
if($serviceResult2->num_rows>0){
while($serviceRow2=$serviceResult2->fetch_assoc()){
?>
<option data-id="<?php echo $serviceRow2['serviceId']; ?>">
<?php echo $serviceRow2["serviceName"]; ?>
</option>
<?php
}
}
?>
</datalist>
</div>
<div class="col-auto">
<button type="button" id="addNBtn" class="btn btn-primary">Add Particular</button>
</div>
</div>
</div>
<hr>
<div class="m-3 col-auto form-inline">
<input type="submit" class="btn btn-success form-inline m-auto">
<input type="button" id="clear" class="btn btn-danger form-inline m-auto" value="Clear">
</div>
</form>
</div>
<!-- Footer -->
<footer class="footer bg-dark">
<div class="text-center text-light">
<h4>Data Management System for CA</h4>
<h5>---- Developed By: Kaushik Talathi & Abhishek Sawant ----</h5>
</div>
</footer>
<!-- Footer -->
</body>
</html>