5 include_once($path_to_root . "/includes/session.inc");
7 include_once($path_to_root . "/includes/date_functions.inc");
8 include_once($path_to_root . "/includes/data_checks.inc");
9 include_once($path_to_root . "/includes/ui.inc");
10 include_once($path_to_root . "/reporting/includes/reports_classes.inc");
13 $js .= get_js_date_picker();
14 page(_("Reports and Analysis"), false, false, "", $js, true);
16 $reports = new BoxReports;
18 $dim = get_company_pref('use_dimension');
20 $reports->addReportClass(_('Customer'));
21 $reports->addReport(_('Customer'),101,_('Customer Balances'),
22 array( new ReportParam(_('End Date'),'DATE'),
23 new ReportParam(_('Customer'),'CUSTOMERS_NO_FILTER'),
24 new ReportParam(_('Currency Filter'),'CURRENCY'),
25 new ReportParam(_('Comments'),'TEXTBOX')));
26 $reports->addReport(_('Customer'),102,_('Aged Customer Analysis'),
27 array( new ReportParam(_('End Date'),'DATE'),
28 new ReportParam(_('Customer'),'CUSTOMERS_NO_FILTER'),
29 new ReportParam(_('Currency Filter'),'CURRENCY'),
30 new ReportParam(_('Summary Only'),'YES_NO'),
31 new ReportParam(_('Graphics'),'GRAPHIC'),
32 new ReportParam(_('Comments'),'TEXTBOX')));
33 $reports->addReport(_('Customer'),103,_('Customer Detail Listing'),
34 array( new ReportParam(_('Activity Since'),'DATEBEGIN'),
35 new ReportParam(_('Sales Areas'),'AREAS'),
36 new ReportParam(_('Sales Folk'),'SALESMEN'), new ReportParam(_('Activity Greater Than'),'TEXT'), new ReportParam(_('Activity Less Than'),'TEXT'), new ReportParam(_('Comments'),'TEXTBOX')));
37 $reports->addReport(_('Customer'),104,_('Price Listing'),
38 array( new ReportParam(_('Inventory Category'),'CATEGORIES'),
39 new ReportParam(_('Sales Types'),'SALESTYPES'),
40 new ReportParam(_('Show Pictures'),'YES_NO'),
41 new ReportParam(_('Show GP %'),'YES_NO'),
42 new ReportParam(_('Comments'),'TEXTBOX')));
43 $reports->addReport(_('Customer'),105,_('Order Status Listing'),
44 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
45 new ReportParam(_('End Date'),'DATEENDM'),
46 new ReportParam(_('Inventory Category'),'CATEGORIES'),
47 new ReportParam(_('Stock Location'),'LOCATIONS'),
48 new ReportParam(_('Back Orders Only'),'YES_NO'),
49 new ReportParam(_('Comments'),'TEXTBOX')));
50 $reports->addReport(_('Customer'),106,_('Salesman Listing'),
51 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
52 new ReportParam(_('End Date'),'DATEENDM'),
53 new ReportParam(_('Summary Only'),'YES_NO'),
54 new ReportParam(_('Comments'),'TEXTBOX')));
55 $reports->addReport(_('Customer'),107,_('Print Invoices/Credit Notes'),
56 array( new ReportParam(_('From'),'INVOICE'),
57 new ReportParam(_('To'),'INVOICE'),
58 new ReportParam(_('Currency Filter'),'CURRENCY'),
59 new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'),
60 new ReportParam(_('email Customers'),'YES_NO'),
61 new ReportParam(_('Payment Link'),'PAYMENT_LINK'),
62 new ReportParam(_('Comments'),'TEXTBOX')));
63 $reports->addReport(_('Customer'),110,_('Print Deliveries'),
64 array( new ReportParam(_('From'),'DELIVERY'),
65 new ReportParam(_('To'),'DELIVERY'),
66 new ReportParam(_('email Customers'),'YES_NO'),
67 new ReportParam(_('Comments'),'TEXTBOX')));
68 $reports->addReport(_('Customer'),108,_('Print Statements'),
69 array( new ReportParam(_('Customer'),'CUSTOMERS_NO_FILTER'),
70 new ReportParam(_('Currency Filter'),'CURRENCY'),
71 new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'),
72 new ReportParam(_('Email Customers'),'YES_NO'),
73 new ReportParam(_('Comments'),'TEXTBOX')));
74 $reports->addReport(_('Customer'),109,_('Print Sales Orders'),
75 array( new ReportParam(_('From'),'ORDERS'),
76 new ReportParam(_('To'),'ORDERS'),
77 new ReportParam(_('Currency Filter'),'CURRENCY'),
78 new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'),
79 new ReportParam(_('Email Customers'),'YES_NO'),
80 new ReportParam(_('Print as Quote'),'YES_NO'),
81 new ReportParam(_('Comments'),'TEXTBOX')));
83 $reports->addReportClass(_('Supplier'));
84 $reports->addReport(_('Supplier'),201,_('Supplier Balances'),
85 array( new ReportParam(_('End Date'),'DATE'),
86 new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'),
87 new ReportParam(_('Currency Filter'),'CURRENCY'),
88 new ReportParam(_('Comments'),'TEXTBOX')));
89 $reports->addReport(_('Supplier'),202,_('Aged Supplier Analyses'),
90 array( new ReportParam(_('End Date'),'DATE'),
91 new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'),
92 new ReportParam(_('Currency Filter'),'CURRENCY'),
93 new ReportParam(_('Summary Only'),'YES_NO'),
94 new ReportParam(_('Graphics'),'GRAPHIC'),
95 new ReportParam(_('Comments'),'TEXTBOX')));
96 $reports->addReport(_('Supplier'),203,_('Payment Report'),
97 array( new ReportParam(_('End Date'),'DATE'),
98 new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'),
99 new ReportParam(_('Currency Filter'),'CURRENCY'),
100 new ReportParam(_('Comments'),'TEXTBOX')));
101 $reports->addReport(_('Supplier'),204,_('Outstanding GRNs Report'),
102 array( new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'),
103 new ReportParam(_('Comments'),'TEXTBOX')));
104 $reports->addReport(_('Supplier'),209,_('Print Purchase Orders'),
105 array( new ReportParam(_('From'),'PO'),
106 new ReportParam(_('To'),'PO'),
107 new ReportParam(_('Currency Filter'),'CURRENCY'),
108 new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'),
109 new ReportParam(_('Email Customers'),'YES_NO'),
110 new ReportParam(_('Comments'),'TEXTBOX')));
112 $reports->addReportClass(_('Inventory'));
113 $reports->addReport(_('Inventory'),301,_('Inventory Valuation Report'),
114 array( new ReportParam(_('Inventory Category'),'CATEGORIES'),
115 new ReportParam(_('Location'),'LOCATIONS'),
116 new ReportParam(_('Detailed Report'),'YES_NO'),
117 new ReportParam(_('Comments'),'TEXTBOX')));
118 $reports->addReport(_('Inventory'),302,_('Inventory Planning Report'),
119 array( new ReportParam(_('Inventory Category'),'CATEGORIES'),
120 new ReportParam(_('Location'),'LOCATIONS'),
121 new ReportParam(_('Comments'),'TEXTBOX')));
122 $reports->addReport(_('Inventory'),303,_('Stock Check Sheets'),
123 array( new ReportParam(_('Inventory Category'),'CATEGORIES'),
124 new ReportParam(_('Location'),'LOCATIONS'),
125 new ReportParam(_('Show Pictures'),'YES_NO'),
126 new ReportParam(_('Comments'),'TEXTBOX')));
127 $reports->addReport(_('Inventory'),304,_('Inventory Sales Report'),
128 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
129 new ReportParam(_('End Date'),'DATEENDM'),
130 new ReportParam(_('Inventory Category'),'CATEGORIES'),
131 new ReportParam(_('Location'),'LOCATIONS'),
132 new ReportParam(_('Detailed Report'),'YES_NO'),
133 new ReportParam(_('Comments'),'TEXTBOX')));
135 $reports->addReportClass(_('Manufactoring'));
136 $reports->addReport(_('Manufactoring'),401,_('Bill of Material Listing'),
137 array( new ReportParam(_('From component'),'ITEMS'),
138 new ReportParam(_('To component'),'ITEMS'),
139 new ReportParam(_('Comments'),'TEXTBOX')));
140 $reports->addReportClass(_('Dimensions'));
143 $reports->addReport(_('Dimensions'),501,_('Dimension Summary'),
144 array( new ReportParam(_('From Dimension'),'DIMENSION'),
145 new ReportParam(_('To Dimension'),'DIMENSION'),
146 new ReportParam(_('Show Balance'),'YES_NO'),
147 new ReportParam(_('Comments'),'TEXTBOX')));
148 //$reports->addReport(_('Dimensions'),502,_('Dimension Details'),
149 //array( new ReportParam(_('Dimension'),'DIMENSIONS'),
150 // new ReportParam(_('Comments'),'TEXTBOX')));
152 $reports->addReportClass(_('Banking'));
153 //$reports->addReport(_('Banking'),601,_('Bank Account Transactions'),
154 // array( new ReportParam(_('Bank Accounts'),'BANK_ACCOUNTS'),
155 // new ReportParam(_('Start Date'),'DATE'),
156 // new ReportParam(_('End Date'),'DATE'),
157 // new ReportParam(_('Comments'),'TEXTBOX')));
159 $reports->addReportClass(_('General Ledger'));
160 $reports->addReport(_('General Ledger'),701,_('Chart of Accounts'),
161 array( new ReportParam(_('Show Balances'),'YES_NO'),
162 new ReportParam(_('Comments'),'TEXTBOX')));
163 $reports->addReport(_('General Ledger'),702,_('List of Journal Entries'),
164 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
165 new ReportParam(_('End Date'),'DATEENDM'),
166 new ReportParam(_('Type'),'SYS_TYPES'),
167 new ReportParam(_('Comments'),'TEXTBOX')));
168 //$reports->addReport(_('General Ledger'),703,_('GL Account Group Summary'),
169 // array( new ReportParam(_('Comments'),'TEXTBOX')));
172 $reports->addReport(_('General Ledger'),704,_('GL Account Transactions'),
173 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
174 new ReportParam(_('End Date'),'DATEENDM'),
175 new ReportParam(_('From Account'),'GL_ACCOUNTS'),
176 new ReportParam(_('To Account'),'GL_ACCOUNTS'),
177 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
178 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
179 new ReportParam(_('Comments'),'TEXTBOX')));
180 $reports->addReport(_('General Ledger'),705,_('Annual Expense Breakdown'),
181 array( new ReportParam(_('Year'),'TRANS_YEARS'),
182 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
183 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
184 new ReportParam(_('Comments'),'TEXTBOX')));
185 $reports->addReport(_('General Ledger'),706,_('Balance Sheet'),
186 array( new ReportParam(_('Start Date'),'DATEBEGIN'),
187 new ReportParam(_('End Date'),'DATEENDM'),
188 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
189 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
190 new ReportParam(_('Graphics'),'GRAPHIC'),
191 new ReportParam(_('Comments'),'TEXTBOX')));
192 $reports->addReport(_('General Ledger'),707,_('Profit and Loss Statement'),
193 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
194 new ReportParam(_('End Date'),'DATEENDM'),
195 new ReportParam(_('Compare to'),'COMPARE'),
196 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
197 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
198 new ReportParam(_('Graphics'),'GRAPHIC'),
199 new ReportParam(_('Comments'),'TEXTBOX')));
200 $reports->addReport(_('General Ledger'),708,_('Trial Balance'),
201 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
202 new ReportParam(_('End Date'),'DATEENDM'),
203 new ReportParam(_('Zero values'),'YES_NO'),
204 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
205 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
206 new ReportParam(_('Comments'),'TEXTBOX')));
210 $reports->addReport(_('General Ledger'),704,_('GL Account Transactions'),
211 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
212 new ReportParam(_('End Date'),'DATEENDM'),
213 new ReportParam(_('From Account'),'GL_ACCOUNTS'),
214 new ReportParam(_('To Account'),'GL_ACCOUNTS'),
215 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
216 new ReportParam(_('Comments'),'TEXTBOX')));
217 $reports->addReport(_('General Ledger'),705,_('Annual Expense Breakdown'),
218 array( new ReportParam(_('Year'),'TRANS_YEARS'),
219 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
220 new ReportParam(_('Comments'),'TEXTBOX')));
221 $reports->addReport(_('General Ledger'),706,_('Balance Sheet'),
222 array( new ReportParam(_('Start Date'),'DATEBEGIN'),
223 new ReportParam(_('End Date'),'DATEENDM'),
224 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
225 new ReportParam(_('Graphics'),'GRAPHIC'),
226 new ReportParam(_('Comments'),'TEXTBOX')));
227 $reports->addReport(_('General Ledger'),707,_('Profit and Loss Statement'),
228 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
229 new ReportParam(_('End Date'),'DATEENDM'),
230 new ReportParam(_('Compare to'),'COMPARE'),
231 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
232 new ReportParam(_('Graphics'),'GRAPHIC'),
233 new ReportParam(_('Comments'),'TEXTBOX')));
234 $reports->addReport(_('General Ledger'),708,_('Trial Balance'),
235 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
236 new ReportParam(_('End Date'),'DATEENDM'),
237 new ReportParam(_('Zero values'),'YES_NO'),
238 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
239 new ReportParam(_('Comments'),'TEXTBOX')));
243 $reports->addReport(_('General Ledger'),704,_('GL Account Transactions'),
244 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
245 new ReportParam(_('End Date'),'DATEENDM'),
246 new ReportParam(_('From Account'),'GL_ACCOUNTS'),
247 new ReportParam(_('To Account'),'GL_ACCOUNTS'),
248 new ReportParam(_('Comments'),'TEXTBOX')));
249 $reports->addReport(_('General Ledger'),705,_('Annual Expense Breakdown'),
250 array( new ReportParam(_('Year'),'TRANS_YEARS'),
251 new ReportParam(_('Comments'),'TEXTBOX')));
252 $reports->addReport(_('General Ledger'),706,_('Balance Sheet'),
253 array( new ReportParam(_('Start Date'),'DATEBEGIN'),
254 new ReportParam(_('End Date'),'DATEENDM'),
255 new ReportParam(_('Graphics'),'GRAPHIC'),
256 new ReportParam(_('Comments'),'TEXTBOX')));
257 $reports->addReport(_('General Ledger'),707,_('Profit and Loss Statement'),
258 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
259 new ReportParam(_('End Date'),'DATEENDM'),
260 new ReportParam(_('Compare to'),'COMPARE'),
261 new ReportParam(_('Graphics'),'GRAPHIC'),
262 new ReportParam(_('Comments'),'TEXTBOX')));
263 $reports->addReport(_('General Ledger'),708,_('Trial Balance'),
264 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
265 new ReportParam(_('End Date'),'DATEENDM'),
266 new ReportParam(_('Zero values'),'YES_NO'),
267 new ReportParam(_('Comments'),'TEXTBOX')));
269 $reports->addReport(_('General Ledger'),709,_('Tax Report'),
270 array( new ReportParam(_('Start Date'),'DATEBEGINTAX'),
271 new ReportParam(_('End Date'),'DATEENDTAX'),
272 new ReportParam(_('Summary Only'),'YES_NO'),
273 new ReportParam(_('Comments'),'TEXTBOX')));
277 <input type='hidden' name='REP_ID' value=''>
278 <input type='hidden' name='PARAM_COUNT' value=''>
279 <input type='hidden' name='PARAM_0' value=''>
280 <input type='hidden' name='PARAM_1' value=''>
281 <input type='hidden' name='PARAM_2' value=''>
282 <input type='hidden' name='PARAM_3' value=''>
283 <input type='hidden' name='PARAM_4' value=''>
284 <input type='hidden' name='PARAM_5' value=''>
285 <input type='hidden' name='PARAM_6' value=''>
287 <script language='javascript'>
288 function onWindowLoad() {
289 showClass(" . $_GET['Class'] . ")
291 window.onload=onWindowLoad;
294 echo $reports->getDisplay();