f28684c5bef4d4b0c8632aa762d0e8fc8f25f05c
[kivitendo-erp.git] / templates / webpages / rp / report.html
1 [%- USE HTML %]
2 [%- USE LxERP %]
3 [%- USE L %]
4 [%- USE P %]
5 [%- USE T8 %]
6
7 [%- BLOCK customized_report %]
8   <tr>
9     <th align=left><input name=reporttype class=radio type=radio value="custom" checked>[% 'Customized Report' | $T8 %]</th>
10   </tr>
11   <tr>
12     <th colspan=1>[% 'Year' | $T8 %]</th>
13     <td>
14       <input name=year size=11 title="[% 'YYYY' | $T8 %]" value="[% year %]" class="initial_focus" oninput='set_from_to(duetyp.value, this.value)'>
15     </td>
16   </tr>
17   <tr>
18     <td align=right> <b>[% 'Yearly' | $T8 %]</b> </td>
19     <th align=left>[% 'Quarterly' | $T8 %]</th>
20     <th align=left colspan=3>[% 'Monthly' | $T8 %]</th>
21   </tr>
22   <tr>
23     <td align=right>&nbsp;
24       <input name=duetyp class=radio type=radio value="13" checked onchange='set_from_to(this.value, year.value)'>
25     </td>
26     <td><input name=duetyp class=radio type=radio value="A" onchange='set_from_to(this.value, year.value)'>
27       &nbsp;1. [% 'Quarter' | $T8 %]
28     </td>
29     <td><input name=duetyp class=radio type=radio value="1" onchange='set_from_to(this.value, year.value)'>
30       &nbsp;[% 'January' | $T8 %]
31     </td>
32     <td><input name=duetyp class=radio type=radio value="5" onchange='set_from_to(this.value, year.value)'>
33       &nbsp;[% 'May' | $T8 %]
34     </td>
35     <td><input name=duetyp class=radio type=radio value="9" onchange='set_from_to(this.value, year.value)'>
36       &nbsp;[% 'September' | $T8 %]
37     </td>
38   </tr>
39   <tr>
40     <td align= right>&nbsp;</td>
41     <td><input name=duetyp class=radio type=radio value="B" onchange='set_from_to(this.value, year.value)'>
42       &nbsp;2. [% 'Quarter' | $T8 %]
43     </td>
44     <td><input name=duetyp class=radio type=radio value="2" onchange='set_from_to(this.value, year.value)'>
45       &nbsp;[% 'February' | $T8 %]
46     </td>
47     <td><input name=duetyp class=radio type=radio value="6" onchange='set_from_to(this.value, year.value)'>
48       &nbsp;[% 'June' | $T8 %]
49     </td>
50     <td><input name=duetyp class=radio type=radio value="10" onchange='set_from_to(this.value, year.value)'>
51       &nbsp;[% 'October' | $T8 %]
52     </td>
53   </tr>
54   <tr>
55     <td> &nbsp;</td>
56     <td><input name=duetyp class=radio type=radio value="C" onchange='set_from_to(this.value, year.value)'>
57       &nbsp;3. [% 'Quarter' | $T8 %]
58     </td>
59     <td><input name=duetyp class=radio type=radio value="3" onchange='set_from_to(this.value, year.value)'>
60       &nbsp;[% 'March' | $T8 %]
61     </td>
62     <td><input name=duetyp class=radio type=radio value="7" onchange='set_from_to(this.value, year.value)'>
63       &nbsp;[% 'July' | $T8 %]
64     </td>
65     <td><input name=duetyp class=radio type=radio value="11" onchange='set_from_to(this.value, year.value)'>
66       &nbsp;[% 'November' | $T8 %]
67     </td>
68   </tr>
69   <tr>
70     <td> &nbsp;</td>
71     <td><input name=duetyp class=radio type=radio value="D" onchange='set_from_to(this.value, year.value)'>
72       &nbsp;4. [% 'Quarter' | $T8 %]
73     </td>
74     <td><input name=duetyp class=radio type=radio value="4" onchange='set_from_to(this.value, year.value)'>
75       &nbsp;[% 'April' | $T8 %]
76     </td>
77     <td><input name=duetyp class=radio type=radio value="8" onchange='set_from_to(this.value, year.value)'>
78       &nbsp;[% 'August' | $T8 %]
79     </td>
80     <td><input name=duetyp class=radio type=radio value="12" onchange='set_from_to(this.value, year.value)'>
81       &nbsp;[% 'December' | $T8 %]
82     </td>
83   </tr>
84   <tr>
85     <td colspan=5><hr size=3 noshade></td>
86   </tr>
87   <tr>
88     <th align=left><input name=reporttype class=radio type=radio value="free">[% 'Free report period' | $T8 %]</th>
89     <td align=left colspan=4>
90       [% 'From' | $T8 %] [% L.date_tag('fromdate', fromdate) %]
91       [% 'Bis' | $T8 %] [% L.date_tag('todate', todate)  %]
92     </td>
93   </tr>
94   <tr>
95     <td colspan=5><hr size=3 noshade></td>
96   </tr>
97 [%- END %]
98 [%- BLOCK cash_or_accrual %]
99   <tr>
100     <th align=left>[% 'Method' | $T8 %]</th>
101     <td colspan=3>
102       [% L.radio_button_tag('method', value='accrual', checked=(INSTANCE_CONF.get_accounting_method=='accrual'), label=LxERP.t8('Accrual')) %]
103       [% L.radio_button_tag('method', value='cash', checked=(INSTANCE_CONF.get_accounting_method=='cash'), label=LxERP.t8('cash')) %]
104     </td>
105   </tr>
106 [%- END %]
107 [%- BLOCK customer %]
108   <tr>
109     <th align=right nowrap>[% 'Customer' | $T8 %]</th>
110     <td colspan=3>[% P.customer_vendor.picker('customer_id', '', type='customer') %]</td>
111   </tr>
112 [%- END %]
113 [%- BLOCK projectnumber %]
114   <tr>
115     <th align=right nowrap>[% 'Project' | $T8 %]</th>
116     <td colspan=3>[% P.project.picker('project_id', '') %]</td>
117   </tr>
118 [%- END %]
119
120 <h1>[% title %]</h1>
121
122 <form method='post' action='[% script %]' id='form'>
123
124 <input type=hidden name=title value="[% title %]">
125
126 <table border="0">
127 [%- IF selectdepartment %]
128   <tr>
129     <th align="left" nowrap>[% 'Department' | $T8 %]</th>
130     <td colspan=3><select name=department>[% selectdepartment %]</select></td>
131   </tr>
132 [%- END %]
133
134 [%- IF is_projects %]
135   [% INCLUDE projectnumber %]
136   <input type=hidden name=nextsub value=generate_projects>
137   <tr>
138     <th align=right>[% 'From' | $T8 %]</th>
139     <td> [% L.date_tag('fromdate', fromdate, class='initial_focus') %]</td>
140     <th align=right nowrap>[% 'Bis' | $T8 %]</th>
141     <td>[% L.date_tag('todate') %]</td>
142   </tr>
143 </table>
144 <table>
145   <tr>
146     <th align=right nowrap>[% 'Include in Report' | $T8 %]</th>
147     <td><input name=l_heading class=checkbox type=checkbox value=Y>&nbsp;[% 'Heading' | $T8 %]
148     <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;[% 'Subtotal' | $T8 %]</td>
149   </tr>
150 [%- END %]
151
152 [%- IF is_income_statement %]
153 [%- PROCESS projectnumber %]
154   <input type=hidden name=nextsub value=generate_income_statement>
155 </table>
156 <table>
157 [%- PROCESS customized_report %]
158 [%- PROCESS cash_or_accrual %]
159   <tr>
160     <th align=left nowrap>[% 'Include in Report' | $T8 %]</th>
161     <td><input name=l_cb class=checkbox type=checkbox value=Y>&nbsp;[% 'CB Transactions' | $T8 %]</td>
162   </tr>
163 [%- END %]
164
165
166 [%- IF is_bwa %]
167 [%- PROCESS projectnumber %]
168   <input type=hidden name=nextsub value=generate_bwa>
169 </table>
170 <table>
171 [%- PROCESS customized_report %]
172 [%- PROCESS cash_or_accrual %]
173   <tr>
174   <th align=right colspan=4>[% 'Decimalplaces' | $T8 %]</th>
175     <td><input name=decimalplaces size=3 value="2"></td>
176   </tr>
177 [%- END %]
178
179
180 [%- IF is_erfolgsrechnung %]
181   <input type=hidden name=nextsub value=generate_erfolgsrechnung>
182 </table>
183 <table>
184 [%- PROCESS customized_report %]
185 [%- END %]
186
187
188 [%- IF is_balance_sheet %]
189   <input type=hidden name=nextsub value=generate_balance_sheet>
190   <tr>
191     <th align=right>[% 'as at' | $T8 %]</th>
192     <td> [% L.date_tag('asofdate', asofdate, class="initial_focus") %]</td>
193     <td><input name=l_cb class=checkbox type=checkbox value=Y>&nbsp;[% 'CB Transactions' | $T8 %]</td>
194     <td><input name=l_ob class=checkbox type=checkbox value=Y>&nbsp;[% 'only OB Transactions' | $T8 %]</td>
195   </tr>
196   </tr>
197     <th align=right nowrap>[% 'Compare to' | $T8 %]</th>
198     <td>[% L.date_tag('compareasofdate', compareasofdate) %]</td>
199     <td><input name=l_cb_compared class=checkbox type=checkbox value=Y>&nbsp;[% 'CB Transactions' | $T8 %]</td>
200     <td><input name=l_ob_compared class=checkbox type=checkbox value=Y>&nbsp;[% 'only OB Transactions' | $T8 %]</td>
201   </tr>
202   <tr>
203     <th align=right>[% 'Decimalplaces' | $T8 %]</th>
204     <td><input name=decimalplaces size=3 value="2"></td>
205   </tr>
206 </table>
207 <table>
208 [%- PROCESS cash_or_accrual %]
209   <tr>
210     <th align=right nowrap>[% 'Include in Report' | $T8 %]</th>
211     <td><input name=l_heading class=checkbox type=checkbox value=Y>&nbsp;[% 'Heading' | $T8 %]
212     <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;[% 'Subtotal' | $T8 %]
213     <input name=l_accno class=checkbox type=checkbox value=Y>&nbsp;[% 'Account Number' | $T8 %]</td>
214   </tr>
215 [%- END %]
216
217 [%- IF is_trial_balance %]
218 [%- PROCESS customer %]
219 [%- PROCESS projectnumber %]
220   <input type=hidden name=nextsub value=generate_trial_balance>
221 </table>
222 <table>
223 [%- PROCESS customized_report %]
224 [%- PROCESS cash_or_accrual %]
225  <tr>
226    <th align=right colspan=4>[% 'All Accounts' | $T8 %]</th>
227    <td><input name=all_accounts type=checkbox value=1></td>
228  </tr>
229  <tr>
230    <th align=right colspan=4>[% 'Decimalplaces' | $T8 %]</th>
231    <td><input name=decimalplaces size=3 value="2"></td>
232  </tr>
233 [%- END %]
234
235 [%- IF is_aging %]
236   <tr>
237     <th align=left>[% label %]</th>
238     <td>[% vc %]</td>
239   </tr>
240 </table>
241 <table border="0">
242   <tr>
243     <td colspan=5><hr size=1 noshade></td>
244   </tr>
245   <tr>
246     <th align=left><input name=reporttype class=radio type=radio value="custom" checked><b>[% 'Reference day' | $T8 %]</b> ([% 'Due Date' | $T8 %][% ', if set' | $T8 %])</b>&nbsp; </th>
247      <td align="right" colspan="4">[% 'Review of Aging list' | $T8 %] <select name="review_of_aging_list">
248         <option></option>
249         <option>0-30</option>
250         <option>30-60</option>
251         <option>60-90</option>
252         <option>90-120</option>
253         <option>&gt; 120</option>
254         </select> [% 'for date' | $T8 %] [% L.date_tag('fordate', today) %]
255     </td>
256   </tr>
257   <tr>
258     <td colspan=5><hr size=3 noshade></td>
259  </tr>
260  <tr>
261     <th align=left><input name=reporttype class=radio type=radio value="free"><b>[% 'Free report period' | $T8 %]</b> ([% 'Invoice Date' | $T8 %])&nbsp; </th>
262     <td align="right" colspan=4>
263       [% 'From' | $T8 %] [% L.date_tag('fromdate', fromdate) %]
264       [% 'Bis' | $T8 %] [% L.date_tag('todate') %]
265     </td>
266   </tr>
267   <input type=hidden name=type value=statement>
268   [% L.hidden_tag("format", format) %]
269   <input type=hidden name=media value=screen>
270
271   <input type=hidden name=nextsub value='[% nextsub %]'>
272   <input type=hidden name=action value='[% nextsub %]'>
273 [%- END %]
274
275 [%- IF is_payments %]
276   <input type=hidden name=nextsub value=list_payments>
277   <tr>
278     <th align=right nowrap>[% 'Account' | $T8 %]</th>
279     <td colspan=3><select name=account>[% selection %]</select>
280       <input type=hidden name=paymentaccounts value="[% paymentaccounts %]">
281     </td>
282   </tr>
283   <tr>
284     <th align=right>[% 'Reference' | $T8 %]</th>
285     <td colspan=3><input name=reference class="initial_focus"></td>
286   </tr>
287   <tr>
288     <th align=right nowrap>[% 'Source' | $T8 %]</th>
289     <td colspan=3><input name=source></td>
290   </tr>
291   <tr>
292     <th align=right nowrap>[% 'Memo' | $T8 %]</th>
293     <td colspan=3><input name=memo size=30></td>
294   </tr>
295   <tr>
296     <th align=right>[% 'From' | $T8 %]</th>
297     <td>[% L.date_tag('fromdate', fromdate) %]</td>
298     <th align=right>[% 'Bis' | $T8 %]</th>
299     <td>[% L.date_tag('todate') %]</td>
300   </tr>
301   <tr>
302     <td align=right><input type=checkbox style=checkbox name=fx_transaction value=1 checked></td>
303     <th align=left colspan=3>[% 'Include Exchangerate Difference' | $T8 %]</td>
304   </tr>
305
306   <input type=hidden name=db value='[% db %]'>
307   <input type=hidden name=sort value=transdate>
308 [%- END %]
309
310 [%- IF 0 # is_taxreport %]
311   <input type=hidden name=nextsub value=generate_tax_report>
312   <tr>
313     <th align=right>[% 'From' | $T8 %]</th>
314     <td>[% L.date_tag('fromdate', fromdate) %]</td>
315     <th align=right>[% 'Bis' | $T8 %]</th>
316     <td>[% L.date_tag('todate', todate) %]</td>
317   </tr>
318   <tr>
319     <th align=right>[% 'Report for' | $T8 %]</th>
320     <td colspan=3>
321 [% FOREACH row IN taxaccounts %]
322       <input name=accno class=radio type=radio value='[% row.accno %]' [% loop.first ? 'checked' : '' %]>&nbsp;[% row.description %]
323       <input name="[% row.accno %]_description" type=hidden value="[% row.description %]">
324       <input name="[% row.accno %]_rate" type=hidden value="[% row.rate %]">
325 [%- END %]
326       <input type=hidden name=db value='[% db %]'>
327       <input type=hidden name=sort value=transdate>
328     </td>
329   </tr>
330 [%- PROCESS cash_or_accrual %]
331 </table>
332 <table>
333   <tr>
334     <th align=right>[% 'Include in Report' | $T8 %]</th>
335     <td>
336       <table>
337         <tr>
338           <td><input name="l_id" class=checkbox type=checkbox value=Y></td>
339           <td>[% 'ID' | $T8 %]</td>
340           <td><input name="l_invnumber" class=checkbox type=checkbox value=Y checked></td>
341           <td>[% 'Invoice' | $T8 %]</td>
342           <td><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
343           <td>[% 'Date' | $T8 %]</td>
344         </tr>
345         <tr>
346           <td><input name="l_name" class=checkbox type=checkbox value=Y checked></td>
347           <td>
348             [% LxERP.t8('Customer') IF db == 'ar' %]
349             [% LxERP.t8('Vendor')   IF db == 'ap' %]
350          </td>
351           <td><input name="l_netamount" class=checkbox type=checkbox value=Y checked></td>
352           <td>[% 'Amount' | $T8 %]</td>
353           <td><input name="l_tax" class=checkbox type=checkbox value=Y checked></td>
354           <td>[% 'Tax' | $T8 %]</td>
355           <td><input name="l_amount" class=checkbox type=checkbox value=Y></td>
356           <td>[% 'Total' | $T8 %]</td>
357         </tr>
358         <tr>
359           <td><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
360           <td>[% 'Subtotal' | $T8 %]</td>
361         </tr>
362       </table>
363     </td>
364   </tr>
365 [%- END %]
366 </table>
367 </form>
368
369 <script type="text/javascript">
370 function set_from_to(duetyp, year) {
371   var date = {
372     1:  [ 1,  1, 1,  31 ],
373     2:  [ 2,  1, 2,  new Date(year, 1, 29).getMonth() == 1 ? 29 : 28 ],
374     3:  [ 3,  1, 3,  31 ],
375     4:  [ 4,  1, 4,  30 ],
376     5:  [ 5,  1, 5,  31 ],
377     6:  [ 6,  1, 6,  30 ],
378     7:  [ 7,  1, 7,  31 ],
379     8:  [ 8,  1, 8,  31 ],
380     9:  [ 9,  1, 9,  30 ],
381     10: [ 10, 1, 10, 31 ],
382     11: [ 11, 1, 11, 30 ],
383     12: [ 12, 1, 12, 31 ],
384     13: [  1, 1, 12, 31 ],
385     'A': [ 1,  1, 3,  31 ],
386     'B': [ 4,  1, 6,  30 ],
387     'C': [ 7,  1, 9,  30 ],
388     'D': [ 10, 1, 12, 31 ]
389   }[duetyp];
390
391   $('#fromdate').val(kivi.format_date(new Date(year, date[0]-1, date[1])));
392   $('#todate').val(kivi.format_date(new Date(year, date[2]-1, date[3])));
393
394   return true;
395 }
396 </script>