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(_('Currency Filter'),'CURRENCY'),
39 new ReportParam(_('Inventory Category'),'CATEGORIES'),
40 new ReportParam(_('Sales Types'),'SALESTYPES'),
41 new ReportParam(_('Show Pictures'),'YES_NO'),
42 new ReportParam(_('Show GP %'),'YES_NO'),
43 new ReportParam(_('Comments'),'TEXTBOX')));
44 $reports->addReport(_('Customer'),105,_('Order Status Listing'),
45 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
46 new ReportParam(_('End Date'),'DATEENDM'),
47 new ReportParam(_('Inventory Category'),'CATEGORIES'),
48 new ReportParam(_('Stock Location'),'LOCATIONS'),
49 new ReportParam(_('Back Orders Only'),'YES_NO'),
50 new ReportParam(_('Comments'),'TEXTBOX')));
51 $reports->addReport(_('Customer'),106,_('Salesman Listing'),
52 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
53 new ReportParam(_('End Date'),'DATEENDM'),
54 new ReportParam(_('Summary Only'),'YES_NO'),
55 new ReportParam(_('Comments'),'TEXTBOX')));
56 $reports->addReport(_('Customer'),107,_('Print Invoices/Credit Notes'),
57 array( new ReportParam(_('From'),'INVOICE'),
58 new ReportParam(_('To'),'INVOICE'),
59 new ReportParam(_('Currency Filter'),'CURRENCY'),
60 new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'),
61 new ReportParam(_('email Customers'),'YES_NO'),
62 new ReportParam(_('Payment Link'),'PAYMENT_LINK'),
63 new ReportParam(_('Comments'),'TEXTBOX')));
64 $reports->addReport(_('Customer'),110,_('Print Deliveries'),
65 array( new ReportParam(_('From'),'DELIVERY'),
66 new ReportParam(_('To'),'DELIVERY'),
67 new ReportParam(_('email Customers'),'YES_NO'),
68 new ReportParam(_('Comments'),'TEXTBOX')));
69 $reports->addReport(_('Customer'),108,_('Print Statements'),
70 array( new ReportParam(_('Customer'),'CUSTOMERS_NO_FILTER'),
71 new ReportParam(_('Currency Filter'),'CURRENCY'),
72 new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'),
73 new ReportParam(_('Email Customers'),'YES_NO'),
74 new ReportParam(_('Comments'),'TEXTBOX')));
75 $reports->addReport(_('Customer'),109,_('Print Sales Orders'),
76 array( new ReportParam(_('From'),'ORDERS'),
77 new ReportParam(_('To'),'ORDERS'),
78 new ReportParam(_('Currency Filter'),'CURRENCY'),
79 new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'),
80 new ReportParam(_('Email Customers'),'YES_NO'),
81 new ReportParam(_('Print as Quote'),'YES_NO'),
82 new ReportParam(_('Comments'),'TEXTBOX')));
84 $reports->addReportClass(_('Supplier'));
85 $reports->addReport(_('Supplier'),201,_('Supplier Balances'),
86 array( new ReportParam(_('End Date'),'DATE'),
87 new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'),
88 new ReportParam(_('Currency Filter'),'CURRENCY'),
89 new ReportParam(_('Comments'),'TEXTBOX')));
90 $reports->addReport(_('Supplier'),202,_('Aged Supplier Analyses'),
91 array( new ReportParam(_('End Date'),'DATE'),
92 new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'),
93 new ReportParam(_('Currency Filter'),'CURRENCY'),
94 new ReportParam(_('Summary Only'),'YES_NO'),
95 new ReportParam(_('Graphics'),'GRAPHIC'),
96 new ReportParam(_('Comments'),'TEXTBOX')));
97 $reports->addReport(_('Supplier'),203,_('Payment Report'),
98 array( new ReportParam(_('End Date'),'DATE'),
99 new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'),
100 new ReportParam(_('Currency Filter'),'CURRENCY'),
101 new ReportParam(_('Comments'),'TEXTBOX')));
102 $reports->addReport(_('Supplier'),204,_('Outstanding GRNs Report'),
103 array( new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'),
104 new ReportParam(_('Comments'),'TEXTBOX')));
105 $reports->addReport(_('Supplier'),209,_('Print Purchase Orders'),
106 array( new ReportParam(_('From'),'PO'),
107 new ReportParam(_('To'),'PO'),
108 new ReportParam(_('Currency Filter'),'CURRENCY'),
109 new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'),
110 new ReportParam(_('Email Customers'),'YES_NO'),
111 new ReportParam(_('Comments'),'TEXTBOX')));
113 $reports->addReportClass(_('Inventory'));
114 $reports->addReport(_('Inventory'),301,_('Inventory Valuation Report'),
115 array( new ReportParam(_('Inventory Category'),'CATEGORIES'),
116 new ReportParam(_('Location'),'LOCATIONS'),
117 new ReportParam(_('Detailed Report'),'YES_NO'),
118 new ReportParam(_('Comments'),'TEXTBOX')));
119 $reports->addReport(_('Inventory'),302,_('Inventory Planning Report'),
120 array( new ReportParam(_('Inventory Category'),'CATEGORIES'),
121 new ReportParam(_('Location'),'LOCATIONS'),
122 new ReportParam(_('Comments'),'TEXTBOX')));
123 $reports->addReport(_('Inventory'),303,_('Stock Check Sheets'),
124 array( new ReportParam(_('Inventory Category'),'CATEGORIES'),
125 new ReportParam(_('Location'),'LOCATIONS'),
126 new ReportParam(_('Show Pictures'),'YES_NO'),
127 new ReportParam(_('Inventory Column'),'YES_NO'),
128 new ReportParam(_('Comments'),'TEXTBOX')));
129 $reports->addReport(_('Inventory'),304,_('Inventory Sales Report'),
130 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
131 new ReportParam(_('End Date'),'DATEENDM'),
132 new ReportParam(_('Inventory Category'),'CATEGORIES'),
133 new ReportParam(_('Location'),'LOCATIONS'),
134 new ReportParam(_('Detailed Report'),'YES_NO'),
135 new ReportParam(_('Comments'),'TEXTBOX')));
137 $reports->addReportClass(_('Manufactoring'));
138 $reports->addReport(_('Manufactoring'),401,_('Bill of Material Listing'),
139 array( new ReportParam(_('From component'),'ITEMS'),
140 new ReportParam(_('To component'),'ITEMS'),
141 new ReportParam(_('Comments'),'TEXTBOX')));
142 $reports->addReportClass(_('Dimensions'));
145 $reports->addReport(_('Dimensions'),501,_('Dimension Summary'),
146 array( new ReportParam(_('From Dimension'),'DIMENSION'),
147 new ReportParam(_('To Dimension'),'DIMENSION'),
148 new ReportParam(_('Show Balance'),'YES_NO'),
149 new ReportParam(_('Comments'),'TEXTBOX')));
150 //$reports->addReport(_('Dimensions'),502,_('Dimension Details'),
151 //array( new ReportParam(_('Dimension'),'DIMENSIONS'),
152 // new ReportParam(_('Comments'),'TEXTBOX')));
154 $reports->addReportClass(_('Banking'));
155 $reports->addReport(_('Banking'),601,_('Bank Statement'),
156 array( new ReportParam(_('Bank Accounts'),'BANK_ACCOUNTS'),
157 new ReportParam(_('Start Date'),'DATEBEGINM'),
158 new ReportParam(_('End Date'),'DATEENDM'),
159 new ReportParam(_('Comments'),'TEXTBOX')));
161 $reports->addReportClass(_('General Ledger'));
162 $reports->addReport(_('General Ledger'),701,_('Chart of Accounts'),
163 array( new ReportParam(_('Show Balances'),'YES_NO'),
164 new ReportParam(_('Comments'),'TEXTBOX')));
165 $reports->addReport(_('General Ledger'),702,_('List of Journal Entries'),
166 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
167 new ReportParam(_('End Date'),'DATEENDM'),
168 new ReportParam(_('Type'),'SYS_TYPES'),
169 new ReportParam(_('Comments'),'TEXTBOX')));
170 //$reports->addReport(_('General Ledger'),703,_('GL Account Group Summary'),
171 // array( new ReportParam(_('Comments'),'TEXTBOX')));
174 $reports->addReport(_('General Ledger'),704,_('GL Account Transactions'),
175 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
176 new ReportParam(_('End Date'),'DATEENDM'),
177 new ReportParam(_('From Account'),'GL_ACCOUNTS'),
178 new ReportParam(_('To Account'),'GL_ACCOUNTS'),
179 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
180 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
181 new ReportParam(_('Comments'),'TEXTBOX')));
182 $reports->addReport(_('General Ledger'),705,_('Annual Expense Breakdown'),
183 array( new ReportParam(_('Year'),'TRANS_YEARS'),
184 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
185 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
186 new ReportParam(_('Comments'),'TEXTBOX')));
187 $reports->addReport(_('General Ledger'),706,_('Balance Sheet'),
188 array( new ReportParam(_('Start Date'),'DATEBEGIN'),
189 new ReportParam(_('End Date'),'DATEENDM'),
190 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
191 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
192 new ReportParam(_('Graphics'),'GRAPHIC'),
193 new ReportParam(_('Comments'),'TEXTBOX')));
194 $reports->addReport(_('General Ledger'),707,_('Profit and Loss Statement'),
195 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
196 new ReportParam(_('End Date'),'DATEENDM'),
197 new ReportParam(_('Compare to'),'COMPARE'),
198 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
199 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
200 new ReportParam(_('Graphics'),'GRAPHIC'),
201 new ReportParam(_('Comments'),'TEXTBOX')));
202 $reports->addReport(_('General Ledger'),708,_('Trial Balance'),
203 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
204 new ReportParam(_('End Date'),'DATEENDM'),
205 new ReportParam(_('Zero values'),'YES_NO'),
206 new ReportParam(_('Only balances'),'YES_NO'),
207 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
208 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
209 new ReportParam(_('Comments'),'TEXTBOX')));
213 $reports->addReport(_('General Ledger'),704,_('GL Account Transactions'),
214 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
215 new ReportParam(_('End Date'),'DATEENDM'),
216 new ReportParam(_('From Account'),'GL_ACCOUNTS'),
217 new ReportParam(_('To Account'),'GL_ACCOUNTS'),
218 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
219 new ReportParam(_('Comments'),'TEXTBOX')));
220 $reports->addReport(_('General Ledger'),705,_('Annual Expense Breakdown'),
221 array( new ReportParam(_('Year'),'TRANS_YEARS'),
222 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
223 new ReportParam(_('Comments'),'TEXTBOX')));
224 $reports->addReport(_('General Ledger'),706,_('Balance Sheet'),
225 array( new ReportParam(_('Start Date'),'DATEBEGIN'),
226 new ReportParam(_('End Date'),'DATEENDM'),
227 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
228 new ReportParam(_('Graphics'),'GRAPHIC'),
229 new ReportParam(_('Comments'),'TEXTBOX')));
230 $reports->addReport(_('General Ledger'),707,_('Profit and Loss Statement'),
231 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
232 new ReportParam(_('End Date'),'DATEENDM'),
233 new ReportParam(_('Compare to'),'COMPARE'),
234 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
235 new ReportParam(_('Graphics'),'GRAPHIC'),
236 new ReportParam(_('Comments'),'TEXTBOX')));
237 $reports->addReport(_('General Ledger'),708,_('Trial Balance'),
238 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
239 new ReportParam(_('End Date'),'DATEENDM'),
240 new ReportParam(_('Zero values'),'YES_NO'),
241 new ReportParam(_('Only balances'),'YES_NO'),
242 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
243 new ReportParam(_('Comments'),'TEXTBOX')));
247 $reports->addReport(_('General Ledger'),704,_('GL Account Transactions'),
248 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
249 new ReportParam(_('End Date'),'DATEENDM'),
250 new ReportParam(_('From Account'),'GL_ACCOUNTS'),
251 new ReportParam(_('To Account'),'GL_ACCOUNTS'),
252 new ReportParam(_('Comments'),'TEXTBOX')));
253 $reports->addReport(_('General Ledger'),705,_('Annual Expense Breakdown'),
254 array( new ReportParam(_('Year'),'TRANS_YEARS'),
255 new ReportParam(_('Comments'),'TEXTBOX')));
256 $reports->addReport(_('General Ledger'),706,_('Balance Sheet'),
257 array( new ReportParam(_('Start Date'),'DATEBEGIN'),
258 new ReportParam(_('End Date'),'DATEENDM'),
259 new ReportParam(_('Graphics'),'GRAPHIC'),
260 new ReportParam(_('Comments'),'TEXTBOX')));
261 $reports->addReport(_('General Ledger'),707,_('Profit and Loss Statement'),
262 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
263 new ReportParam(_('End Date'),'DATEENDM'),
264 new ReportParam(_('Compare to'),'COMPARE'),
265 new ReportParam(_('Graphics'),'GRAPHIC'),
266 new ReportParam(_('Comments'),'TEXTBOX')));
267 $reports->addReport(_('General Ledger'),708,_('Trial Balance'),
268 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
269 new ReportParam(_('End Date'),'DATEENDM'),
270 new ReportParam(_('Zero values'),'YES_NO'),
271 new ReportParam(_('Only balances'),'YES_NO'),
272 new ReportParam(_('Comments'),'TEXTBOX')));
274 $reports->addReport(_('General Ledger'),709,_('Tax Report'),
275 array( new ReportParam(_('Start Date'),'DATEBEGINTAX'),
276 new ReportParam(_('End Date'),'DATEENDTAX'),
277 new ReportParam(_('Summary Only'),'YES_NO'),
278 new ReportParam(_('Comments'),'TEXTBOX')));
282 <input type='hidden' name='REP_ID' value=''>
283 <input type='hidden' name='PARAM_COUNT' value=''>
284 <input type='hidden' name='PARAM_0' value=''>
285 <input type='hidden' name='PARAM_1' value=''>
286 <input type='hidden' name='PARAM_2' value=''>
287 <input type='hidden' name='PARAM_3' value=''>
288 <input type='hidden' name='PARAM_4' value=''>
289 <input type='hidden' name='PARAM_5' value=''>
290 <input type='hidden' name='PARAM_6' value=''>
292 <script language='javascript'>
293 function onWindowLoad() {
294 showClass(" . $_GET['Class'] . ")
296 Behaviour.addLoadEvent(onWindowLoad);
299 echo $reports->getDisplay();