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(_('Comments'),'TEXTBOX')));
128 $reports->addReport(_('Inventory'),304,_('Inventory Sales Report'),
129 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
130 new ReportParam(_('End Date'),'DATEENDM'),
131 new ReportParam(_('Inventory Category'),'CATEGORIES'),
132 new ReportParam(_('Location'),'LOCATIONS'),
133 new ReportParam(_('Detailed Report'),'YES_NO'),
134 new ReportParam(_('Comments'),'TEXTBOX')));
136 $reports->addReportClass(_('Manufactoring'));
137 $reports->addReport(_('Manufactoring'),401,_('Bill of Material Listing'),
138 array( new ReportParam(_('From component'),'ITEMS'),
139 new ReportParam(_('To component'),'ITEMS'),
140 new ReportParam(_('Comments'),'TEXTBOX')));
141 $reports->addReportClass(_('Dimensions'));
144 $reports->addReport(_('Dimensions'),501,_('Dimension Summary'),
145 array( new ReportParam(_('From Dimension'),'DIMENSION'),
146 new ReportParam(_('To Dimension'),'DIMENSION'),
147 new ReportParam(_('Show Balance'),'YES_NO'),
148 new ReportParam(_('Comments'),'TEXTBOX')));
149 //$reports->addReport(_('Dimensions'),502,_('Dimension Details'),
150 //array( new ReportParam(_('Dimension'),'DIMENSIONS'),
151 // new ReportParam(_('Comments'),'TEXTBOX')));
153 $reports->addReportClass(_('Banking'));
154 //$reports->addReport(_('Banking'),601,_('Bank Account Transactions'),
155 // array( new ReportParam(_('Bank Accounts'),'BANK_ACCOUNTS'),
156 // new ReportParam(_('Start Date'),'DATE'),
157 // new ReportParam(_('End Date'),'DATE'),
158 // new ReportParam(_('Comments'),'TEXTBOX')));
160 $reports->addReportClass(_('General Ledger'));
161 $reports->addReport(_('General Ledger'),701,_('Chart of Accounts'),
162 array( new ReportParam(_('Show Balances'),'YES_NO'),
163 new ReportParam(_('Comments'),'TEXTBOX')));
164 $reports->addReport(_('General Ledger'),702,_('List of Journal Entries'),
165 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
166 new ReportParam(_('End Date'),'DATEENDM'),
167 new ReportParam(_('Type'),'SYS_TYPES'),
168 new ReportParam(_('Comments'),'TEXTBOX')));
169 //$reports->addReport(_('General Ledger'),703,_('GL Account Group Summary'),
170 // array( new ReportParam(_('Comments'),'TEXTBOX')));
173 $reports->addReport(_('General Ledger'),704,_('GL Account Transactions'),
174 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
175 new ReportParam(_('End Date'),'DATEENDM'),
176 new ReportParam(_('From Account'),'GL_ACCOUNTS'),
177 new ReportParam(_('To Account'),'GL_ACCOUNTS'),
178 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
179 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
180 new ReportParam(_('Comments'),'TEXTBOX')));
181 $reports->addReport(_('General Ledger'),705,_('Annual Expense Breakdown'),
182 array( new ReportParam(_('Year'),'TRANS_YEARS'),
183 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
184 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
185 new ReportParam(_('Comments'),'TEXTBOX')));
186 $reports->addReport(_('General Ledger'),706,_('Balance Sheet'),
187 array( new ReportParam(_('Start Date'),'DATEBEGIN'),
188 new ReportParam(_('End Date'),'DATEENDM'),
189 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
190 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
191 new ReportParam(_('Graphics'),'GRAPHIC'),
192 new ReportParam(_('Comments'),'TEXTBOX')));
193 $reports->addReport(_('General Ledger'),707,_('Profit and Loss Statement'),
194 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
195 new ReportParam(_('End Date'),'DATEENDM'),
196 new ReportParam(_('Compare to'),'COMPARE'),
197 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
198 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
199 new ReportParam(_('Graphics'),'GRAPHIC'),
200 new ReportParam(_('Comments'),'TEXTBOX')));
201 $reports->addReport(_('General Ledger'),708,_('Trial Balance'),
202 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
203 new ReportParam(_('End Date'),'DATEENDM'),
204 new ReportParam(_('Zero values'),'YES_NO'),
205 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
206 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
207 new ReportParam(_('Comments'),'TEXTBOX')));
211 $reports->addReport(_('General Ledger'),704,_('GL Account Transactions'),
212 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
213 new ReportParam(_('End Date'),'DATEENDM'),
214 new ReportParam(_('From Account'),'GL_ACCOUNTS'),
215 new ReportParam(_('To Account'),'GL_ACCOUNTS'),
216 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
217 new ReportParam(_('Comments'),'TEXTBOX')));
218 $reports->addReport(_('General Ledger'),705,_('Annual Expense Breakdown'),
219 array( new ReportParam(_('Year'),'TRANS_YEARS'),
220 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
221 new ReportParam(_('Comments'),'TEXTBOX')));
222 $reports->addReport(_('General Ledger'),706,_('Balance Sheet'),
223 array( new ReportParam(_('Start Date'),'DATEBEGIN'),
224 new ReportParam(_('End Date'),'DATEENDM'),
225 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
226 new ReportParam(_('Graphics'),'GRAPHIC'),
227 new ReportParam(_('Comments'),'TEXTBOX')));
228 $reports->addReport(_('General Ledger'),707,_('Profit and Loss Statement'),
229 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
230 new ReportParam(_('End Date'),'DATEENDM'),
231 new ReportParam(_('Compare to'),'COMPARE'),
232 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
233 new ReportParam(_('Graphics'),'GRAPHIC'),
234 new ReportParam(_('Comments'),'TEXTBOX')));
235 $reports->addReport(_('General Ledger'),708,_('Trial Balance'),
236 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
237 new ReportParam(_('End Date'),'DATEENDM'),
238 new ReportParam(_('Zero values'),'YES_NO'),
239 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
240 new ReportParam(_('Comments'),'TEXTBOX')));
244 $reports->addReport(_('General Ledger'),704,_('GL Account Transactions'),
245 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
246 new ReportParam(_('End Date'),'DATEENDM'),
247 new ReportParam(_('From Account'),'GL_ACCOUNTS'),
248 new ReportParam(_('To Account'),'GL_ACCOUNTS'),
249 new ReportParam(_('Comments'),'TEXTBOX')));
250 $reports->addReport(_('General Ledger'),705,_('Annual Expense Breakdown'),
251 array( new ReportParam(_('Year'),'TRANS_YEARS'),
252 new ReportParam(_('Comments'),'TEXTBOX')));
253 $reports->addReport(_('General Ledger'),706,_('Balance Sheet'),
254 array( new ReportParam(_('Start Date'),'DATEBEGIN'),
255 new ReportParam(_('End Date'),'DATEENDM'),
256 new ReportParam(_('Graphics'),'GRAPHIC'),
257 new ReportParam(_('Comments'),'TEXTBOX')));
258 $reports->addReport(_('General Ledger'),707,_('Profit and Loss Statement'),
259 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
260 new ReportParam(_('End Date'),'DATEENDM'),
261 new ReportParam(_('Compare to'),'COMPARE'),
262 new ReportParam(_('Graphics'),'GRAPHIC'),
263 new ReportParam(_('Comments'),'TEXTBOX')));
264 $reports->addReport(_('General Ledger'),708,_('Trial Balance'),
265 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
266 new ReportParam(_('End Date'),'DATEENDM'),
267 new ReportParam(_('Zero values'),'YES_NO'),
268 new ReportParam(_('Comments'),'TEXTBOX')));
270 $reports->addReport(_('General Ledger'),709,_('Tax Report'),
271 array( new ReportParam(_('Start Date'),'DATEBEGINTAX'),
272 new ReportParam(_('End Date'),'DATEENDTAX'),
273 new ReportParam(_('Summary Only'),'YES_NO'),
274 new ReportParam(_('Comments'),'TEXTBOX')));
278 <input type='hidden' name='REP_ID' value=''>
279 <input type='hidden' name='PARAM_COUNT' value=''>
280 <input type='hidden' name='PARAM_0' value=''>
281 <input type='hidden' name='PARAM_1' value=''>
282 <input type='hidden' name='PARAM_2' value=''>
283 <input type='hidden' name='PARAM_3' value=''>
284 <input type='hidden' name='PARAM_4' value=''>
285 <input type='hidden' name='PARAM_5' value=''>
286 <input type='hidden' name='PARAM_6' value=''>
288 <script language='javascript'>
289 function onWindowLoad() {
290 showClass(" . $_GET['Class'] . ")
292 Behaviour.addLoadEvent(onWindowLoad);
295 echo $reports->getDisplay();