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