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'),107,_('Print Invoices/Credit Notes'),
51 array( new ReportParam(_('From'),'INVOICE'),
52 new ReportParam(_('To'),'INVOICE'),
53 new ReportParam(_('Currency Filter'),'CURRENCY'),
54 new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'),
55 new ReportParam(_('email Customers'),'YES_NO'),
56 new ReportParam(_('Comments'),'TEXTBOX')));
57 $reports->addReport(_('Customer'),108,_('Print Statements'),
58 array( new ReportParam(_('Customer'),'CUSTOMERS_NO_FILTER'),
59 new ReportParam(_('Currency Filter'),'CURRENCY'),
60 new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'),
61 new ReportParam(_('Email Customers'),'YES_NO'),
62 new ReportParam(_('Comments'),'TEXTBOX')));
63 $reports->addReport(_('Customer'),109,_('Print Sales Orders'),
64 array( new ReportParam(_('From'),'ORDERS'),
65 new ReportParam(_('To'),'ORDERS'),
66 new ReportParam(_('Currency Filter'),'CURRENCY'),
67 new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'),
68 new ReportParam(_('Email Customers'),'YES_NO'),
69 new ReportParam(_('Comments'),'TEXTBOX')));
71 $reports->addReportClass(_('Supplier'));
72 $reports->addReport(_('Supplier'),201,_('Supplier Balances'),
73 array( new ReportParam(_('End Date'),'DATE'),
74 new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'),
75 new ReportParam(_('Currency Filter'),'CURRENCY'),
76 new ReportParam(_('Comments'),'TEXTBOX')));
77 $reports->addReport(_('Supplier'),202,_('Aged Supplier Analyses'),
78 array( new ReportParam(_('End Date'),'DATE'),
79 new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'),
80 new ReportParam(_('Currency Filter'),'CURRENCY'),
81 new ReportParam(_('Summary Only'),'YES_NO'),
82 new ReportParam(_('Graphics'),'GRAPHIC'),
83 new ReportParam(_('Comments'),'TEXTBOX')));
84 $reports->addReport(_('Supplier'),203,_('Payment Report'),
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'),204,_('Outstanding GRNs Report'),
90 array( new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'),
91 new ReportParam(_('Comments'),'TEXTBOX')));
92 $reports->addReport(_('Supplier'),209,_('Print Purchase Orders'),
93 array( new ReportParam(_('From'),'PO'),
94 new ReportParam(_('To'),'PO'),
95 new ReportParam(_('Currency Filter'),'CURRENCY'),
96 new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'),
97 new ReportParam(_('Email Customers'),'YES_NO'),
98 new ReportParam(_('Comments'),'TEXTBOX')));
100 $reports->addReportClass(_('Inventory'));
101 $reports->addReport(_('Inventory'),301,_('Inventory Valuation Report'),
102 array( new ReportParam(_('Inventory Category'),'CATEGORIES'),
103 new ReportParam(_('Location'),'LOCATIONS'),
104 new ReportParam(_('Detailed Report'),'YES_NO'),
105 new ReportParam(_('Comments'),'TEXTBOX')));
106 $reports->addReport(_('Inventory'),302,_('Inventory Planning Report'),
107 array( new ReportParam(_('Inventory Category'),'CATEGORIES'),
108 new ReportParam(_('Location'),'LOCATIONS'),
109 new ReportParam(_('Comments'),'TEXTBOX')));
110 $reports->addReport(_('Inventory'),303,_('Stock Check Sheets'),
111 array( new ReportParam(_('Inventory Category'),'CATEGORIES'),
112 new ReportParam(_('Location'),'LOCATIONS'),
113 new ReportParam(_('Show Pictures'),'YES_NO'),
114 new ReportParam(_('Comments'),'TEXTBOX')));
116 $reports->addReportClass(_('Manufactoring'));
117 $reports->addReport(_('Manufactoring'),401,_('Bill of Material Listing'),
118 array( new ReportParam(_('From component'),'ITEMS'),
119 new ReportParam(_('To component'),'ITEMS'),
120 new ReportParam(_('Comments'),'TEXTBOX')));
121 $reports->addReportClass(_('Dimensions'));
124 $reports->addReport(_('Dimensions'),501,_('Dimension Summary'),
125 array( new ReportParam(_('From Dimension'),'DIMENSION'),
126 new ReportParam(_('To Dimension'),'DIMENSION'),
127 new ReportParam(_('Show Balance'),'YES_NO'),
128 new ReportParam(_('Comments'),'TEXTBOX')));
129 $reports->addReport(_('Dimensions'),502,_('Dimension Details'),
130 array( new ReportParam(_('Dimension'),'DIMENSIONS'),
131 new ReportParam(_('Comments'),'TEXTBOX')));
133 $reports->addReportClass(_('Banking'));
134 //$reports->addReport(_('Banking'),601,_('Bank Account Transactions'),
135 // array( new ReportParam(_('Bank Accounts'),'BANK_ACCOUNTS'),
136 // new ReportParam(_('Start Date'),'DATE'),
137 // new ReportParam(_('End Date'),'DATE'),
138 // new ReportParam(_('Comments'),'TEXTBOX')));
140 $reports->addReportClass(_('General Ledger'));
141 $reports->addReport(_('General Ledger'),701,_('Chart of Accounts'),
142 array( new ReportParam(_('Show Balances'),'YES_NO'),
143 new ReportParam(_('Comments'),'TEXTBOX')));
144 $reports->addReport(_('General Ledger'),702,_('List of Journal Entries'),
145 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
146 new ReportParam(_('End Date'),'DATEENDM'),
147 new ReportParam(_('Type'),'SYS_TYPES'),
148 new ReportParam(_('Comments'),'TEXTBOX')));
149 //$reports->addReport(_('General Ledger'),703,_('GL Account Group Summary'),
150 // array( new ReportParam(_('Comments'),'TEXTBOX')));
153 $reports->addReport(_('General Ledger'),704,_('GL Account Transactions'),
154 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
155 new ReportParam(_('End Date'),'DATEENDM'),
156 new ReportParam(_('From Account'),'GL_ACCOUNTS'),
157 new ReportParam(_('To Account'),'GL_ACCOUNTS'),
158 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
159 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
160 new ReportParam(_('Comments'),'TEXTBOX')));
161 $reports->addReport(_('General Ledger'),705,_('Annual Expense Breakdown'),
162 array( new ReportParam(_('Year'),'TRANS_YEARS'),
163 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
164 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
165 new ReportParam(_('Comments'),'TEXTBOX')));
166 $reports->addReport(_('General Ledger'),706,_('Balance Sheet'),
167 array( new ReportParam(_('Start Date'),'DATEBEGIN'),
168 new ReportParam(_('End Date'),'DATEENDM'),
169 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
170 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
171 new ReportParam(_('Graphics'),'GRAPHIC'),
172 new ReportParam(_('Comments'),'TEXTBOX')));
173 $reports->addReport(_('General Ledger'),707,_('Profit and Loss Statement'),
174 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
175 new ReportParam(_('End Date'),'DATEENDM'),
176 new ReportParam(_('Compare to'),'COMPARE'),
177 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
178 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
179 new ReportParam(_('Graphics'),'GRAPHIC'),
180 new ReportParam(_('Comments'),'TEXTBOX')));
181 $reports->addReport(_('General Ledger'),708,_('Trial Balance'),
182 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
183 new ReportParam(_('End Date'),'DATEENDM'),
184 new ReportParam(_('Zero values'),'YES_NO'),
185 new ReportParam(_('Dimension')." 1", 'DIMENSIONS1'),
186 new ReportParam(_('Dimension')." 2", 'DIMENSIONS2'),
187 new ReportParam(_('Comments'),'TEXTBOX')));
191 $reports->addReport(_('General Ledger'),704,_('GL Account Transactions'),
192 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
193 new ReportParam(_('End Date'),'DATEENDM'),
194 new ReportParam(_('From Account'),'GL_ACCOUNTS'),
195 new ReportParam(_('To Account'),'GL_ACCOUNTS'),
196 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
197 new ReportParam(_('Comments'),'TEXTBOX')));
198 $reports->addReport(_('General Ledger'),705,_('Annual Expense Breakdown'),
199 array( new ReportParam(_('Year'),'TRANS_YEARS'),
200 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
201 new ReportParam(_('Comments'),'TEXTBOX')));
202 $reports->addReport(_('General Ledger'),706,_('Balance Sheet'),
203 array( new ReportParam(_('Start Date'),'DATEBEGIN'),
204 new ReportParam(_('End Date'),'DATEENDM'),
205 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
206 new ReportParam(_('Graphics'),'GRAPHIC'),
207 new ReportParam(_('Comments'),'TEXTBOX')));
208 $reports->addReport(_('General Ledger'),707,_('Profit and Loss Statement'),
209 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
210 new ReportParam(_('End Date'),'DATEENDM'),
211 new ReportParam(_('Compare to'),'COMPARE'),
212 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
213 new ReportParam(_('Graphics'),'GRAPHIC'),
214 new ReportParam(_('Comments'),'TEXTBOX')));
215 $reports->addReport(_('General Ledger'),708,_('Trial Balance'),
216 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
217 new ReportParam(_('End Date'),'DATEENDM'),
218 new ReportParam(_('Zero values'),'YES_NO'),
219 new ReportParam(_('Dimension'), 'DIMENSIONS1'),
220 new ReportParam(_('Comments'),'TEXTBOX')));
224 $reports->addReport(_('General Ledger'),704,_('GL Account Transactions'),
225 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
226 new ReportParam(_('End Date'),'DATEENDM'),
227 new ReportParam(_('From Account'),'GL_ACCOUNTS'),
228 new ReportParam(_('To Account'),'GL_ACCOUNTS'),
229 new ReportParam(_('Comments'),'TEXTBOX')));
230 $reports->addReport(_('General Ledger'),705,_('Annual Expense Breakdown'),
231 array( new ReportParam(_('Year'),'TRANS_YEARS'),
232 new ReportParam(_('Comments'),'TEXTBOX')));
233 $reports->addReport(_('General Ledger'),706,_('Balance Sheet'),
234 array( new ReportParam(_('Start Date'),'DATEBEGIN'),
235 new ReportParam(_('End Date'),'DATEENDM'),
236 new ReportParam(_('Graphics'),'GRAPHIC'),
237 new ReportParam(_('Comments'),'TEXTBOX')));
238 $reports->addReport(_('General Ledger'),707,_('Profit and Loss Statement'),
239 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
240 new ReportParam(_('End Date'),'DATEENDM'),
241 new ReportParam(_('Compare to'),'COMPARE'),
242 new ReportParam(_('Graphics'),'GRAPHIC'),
243 new ReportParam(_('Comments'),'TEXTBOX')));
244 $reports->addReport(_('General Ledger'),708,_('Trial Balance'),
245 array( new ReportParam(_('Start Date'),'DATEBEGINM'),
246 new ReportParam(_('End Date'),'DATEENDM'),
247 new ReportParam(_('Zero values'),'YES_NO'),
248 new ReportParam(_('Comments'),'TEXTBOX')));
250 $reports->addReport(_('General Ledger'),709,_('Tax Report'),
251 array( new ReportParam(_('Start Date'),'DATEBEGINTAX'),
252 new ReportParam(_('End Date'),'DATEENDTAX'),
253 new ReportParam(_('Summary Only'),'YES_NO'),
254 new ReportParam(_('Comments'),'TEXTBOX')));
258 <input type='hidden' name='REP_ID' value=''>
259 <input type='hidden' name='PARAM_COUNT' value=''>
260 <input type='hidden' name='PARAM_0' value=''>
261 <input type='hidden' name='PARAM_1' value=''>
262 <input type='hidden' name='PARAM_2' value=''>
263 <input type='hidden' name='PARAM_3' value=''>
264 <input type='hidden' name='PARAM_4' value=''>
265 <input type='hidden' name='PARAM_5' value=''>
266 <input type='hidden' name='PARAM_6' value=''>
268 <script language='javascript'>
269 function onWindowLoad() {
270 showClass(" . $_GET['Class'] . ")
272 window.onload=onWindowLoad;
275 echo $reports->getDisplay();