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