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