-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsales_report.php
More file actions
116 lines (88 loc) · 4.22 KB
/
sales_report.php
File metadata and controls
116 lines (88 loc) · 4.22 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
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
<?php
require_once('includes/session.php');
require_once('includes/load.php');
require_once('includes/functions.php');
$page_title = 'Inactive Report';
page_require_level(3);
?>
<?php include_once('layouts/header.php'); ?>
<link rel="stylesheet" href="libs/css/main.css">
<link rel="stylesheet" href="libs/css/reportSystem.css">
<div class="report-page">
<div class="panel">
<!-- Heading -->
<div class="panel-heading">
<img src="libs/logos/table-logo/inactive.png" alt="inventory-logo">
<span class="reportHeading">Inactive Report</span>
</div>
<!-- Body -->
<div class="panel-body">
<!-- Row 1 Start -->
<div class="wrapper">
<!-- Select Section -->
<div class="section" >
<span class="title">Select Report Type:</span>
<select id="report_type">
<option value="repairable">Repairable Products Only</option>
<option value="non_repairable">Non-Repairable Products Only</option>
<option value="all_defect" selected>All Defect Products</option>
</select>
</div>
<!-- Table Design -->
<div class="section" >
<span class="title">Select Table Design</span>
<select name="table_design" class="form-control dropdown" style="margin-left: auto !important;">
<option value="color">Modern</option>
<option value="classic">Classic</option>
</select>
</div>
</div>
<!-- Row 1 End -->
<!-- Row 2 Start -->
<div class="wrapper">
<!-- Date Range -->
<div class="section">
<span class="title">Select Duration</span>
<div class="date-range">
<label for="start_date" style="display: none">Start Date:</label>
<input type="date" id="start_date" name="start_date" value="2000-01-01">
<label for="end_date" style="display: none">End Date:</label>
<input type="date" id="end_date" name="end_date">
</div>
</div>
<!-- Sort Order -->
<div class="section">
<span class="title">Sort Order</span>
<select name="sort_order" id="sort_order" class="form-control dropdown" >
<option value="category">Category (A-Z)</option>
<option value="date_newest">Date (Newest First)</option>
<option value="date_oldest">Date (Oldest First)</option>
<option value="name_az">Product Name (A-Z)</option>
<option value="name_za">Product Name (Z-A)</option>
<option value="quantity_high">Quantity (High to Low)</option>
<option value="quantity_low">Quantity (Low to High)</option>
</select>
</div>
</div>
<!-- Row 2 End -->
<!-- Button -->
<div class="wrapper" style="width: 100%; margin: auto">
<button class="generateBtn" onclick="generateReport()">Generate Report</button>
<a href="generate_pdf.php" class="pdfBtn">Download PDF</a>
</div>
</div>
</div>
</div>
<!-- Generate Report JS -->
<script>
function generateReport() {
var start_date = document.getElementById('start_date').value;
var end_date = document.getElementById('end_date').value;
var selectedDesign = document.querySelector('select[name="table_design"]').value;
var selectedSortOrder = document.getElementById('sort_order').value;
var selectedReportType = document.getElementById('report_type').value;
var url = 'sales_memo.php?start_date=' + start_date + '&end_date=' + end_date + '&selected_design=' + selectedDesign + '&report_type=' + selectedReportType + '&sort_order=' + selectedSortOrder;
window.open(url, '_blank');
}
</script>
<?php include_once('layouts/footer.php'); ?>