Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
[kivitendo-erp.git] / templates / webpages / ar / form_header.html
1 [%- USE HTML %]
2 [%- USE L %]
3 [%- USE T8 %]
4 [%- USE LxERP %]
5
6 <form method=post name="arledger" action="[% script %]">
7
8 [% L.hidden_tag('id', id) %]
9 [% L.hidden_tag('sort', sort) %]
10 [% L.hidden_tag('closedto', closedto) %]
11 [% L.hidden_tag('locked', locked) %]
12 [% L.hidden_tag('title', title_str) %]
13 [% L.hidden_tag('follow_up_trans_id_1', id) %]
14 [% L.hidden_tag('follow_up_trans_type_1', 'ar_transaction') %]
15 [% L.hidden_tag('follow_up_trans_info_1', follow_up_trans_info) %]
16 [% L.hidden_tag('follow_up_rowcount', 1) %]
17
18 [%- IF saved_message %]<p>[% saved_message | html  %]</p>[% END %]
19
20 <table width=100%>
21   <tr class=listtop>
22     <th class=listtop>[% title | html %]</th>
23   </tr>
24   <tr height="5"></tr>
25   <tr valign=top>
26     <td>
27       <table width=100%>
28         <tr valign=top>
29           <td>
30             <table>
31               <tr>
32                 <th align="right" nowrap>[% 'Customer' | $T8 %]</th>
33                 <td colspan=3>
34 [%- IF selectcustomer %]
35     <select name="customer" onchange="document.getElementById('update_button').click();">[% selectcustomer %]</select>
36 [%- ELSE %]
37     <input name=customer value="[% customer | html %]" size=35>
38 [%- END %]
39                 <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('customer')"></td>
40                 [% L.hidden_tag('selectcustomer', selectcustomer) %]
41                 [% L.hidden_tag('oldcustomer', oldcustomer) %]
42                 [% L.hidden_tag('customer_id', customer_id) %]
43                 [% L.hidden_tag('terms', terms) %]
44               </tr>
45               <tr>
46                 <td></td>
47                 <td colspan=3>
48                   <table width=100%>
49                     <tr>
50                       <th align=left nowrap>[% 'Credit Limit' | $T8 %]</th>
51                       <td>[% LxERP.format_amount(creditlimit, 0) %][% L.hidden_tag('creditlimit', LxERP.format_amount(creditlimit, 0)) %]</td>
52                       <th align=left nowrap>[% 'Remaining' | $T8 %]</th>
53                       <td class="plus[% creditlimit < 0 ? 0 : 1 %]">[% LxERP.format_amount(creditremaining, 0) %][% L.hidden_tag('creditremaining', LxERP.format_amount(creditremaining, 0)) %]</td>
54                     </tr>
55                   </table>
56                 </td>
57               </tr>
58               <tr>
59                 <th align=right>[% 'Currency' | $T8 %]</th>
60                 <td><select name=currency>[% selectcurrency %]</select></td>
61                 [% L.hidden_tag('selectcurrency', selectcurrency) %]
62                 [% L.hidden_tag('defaultcurrency', defaultcurrency) %]
63                 [% L.hidden_tag('fxgain_accno', fxgain_accno) %]
64                 [% L.hidden_tag('fxloss_accno', fxloss_accno) %]
65
66                 [% L.hidden_tag('forex', forex) %]
67                 [% IF show_exch %]
68                    <th align=right>[% 'Exchangerate' | $T8 %]</th>
69                    <td>[%- IF forex %][% L.hidden_tag(exchangerate, LxERP.format_amount(exchangerate, 2)) %][% LxERP.format_amount(exchangerate, 2) %][%- ELSE %][% L.input_tag(exchangerate, LxERP.format_amount(exchangerate, 2), size=10) %][%- END %]</td>
70                 [% END %]
71               </tr>
72               [% department_html %]
73               [%- IF selectdepartment %]
74               <tr>
75                 <th align="right" nowrap>[% 'Department' | $T8 %]</th>
76                 <td colspan=3><select name=department>[% selectdepartment %]</select>
77                 <input type=hidden name=selectdepartment value="[% selectdepartment | html %]">
78                 </td>
79               </tr>
80               [%- END %]
81               <tr>
82                 <td align=right>[% L.checkbox_tag('taxincluded', checked=taxincluded) %]</td>
83                 <th align=left nowrap>[% 'Tax Included' | $T8 %]</th>
84               </tr>
85             </table>
86           </td>
87           <td align=right>
88             <table>
89 [%- IF selectemployee %]
90               <tr>
91                 <th align=right nowrap>[% 'Salesperson' | $T8 %]</th>
92                 <td  colspan=2><select name=employee>[% selectemployee %]</select>[% L.hidden_tag('selectemployee', selectemployee) %]</td>
93               </tr>
94 [%- ELSE %]
95                 [% L.hidden_tag('employee', employee) %]
96 [%- END %]
97               <tr>
98                 <th align=right nowrap>[% 'Invoice Number' | $T8 %]</th>
99                 <td><input name=invnumber size=11 value="[% invnumber | html %]"></td>
100               </tr>
101               <tr>
102                 <th align=right nowrap>[% 'Order Number' | $T8 %]</th>
103                 <td><input name=ordnumber size=11 value="[% ordnumber | html %]"></td>
104               </tr>
105               <tr>
106                 <th align=right nowrap>[% 'Invoice Date' | $T8 %]</th>
107                 <td>[% L.date_tag('transdate', transdate) %]</td>
108               </tr>
109               <tr>
110                 <th align=right nowrap>[% 'Due Date' | $T8 %]</th>
111                 <td>[% L.date_tag('duedate', duedate) %]</td>
112               </tr>
113               <tr>
114                 <th align=right nowrap>[% 'Project Number' | $T8 %]</th>
115                 <td>[% L.select_tag('globalproject_id', ALL_PROJECTS, title_key = 'projectnumber', default = globalproject_id, with_empty = 1) %]</td>
116               </tr>
117      </table>
118           </td>
119         </tr>
120       </table>
121     </td>
122   </tr>
123
124                 [% L.hidden_tag('rowcount', rowcount) %]
125   <tr>
126       <td>
127           <table width=100%>
128            <tr class=listheading>
129           <th class=listheading style="width:15%">[% 'Account' | $T8 %]</th>
130           <th class=listheading style="width:10%">[% 'Amount' | $T8 %]</th>
131           <th class=listheading style="width:10%">[% 'Tax' | $T8 %]</th>
132           <th class=listheading style="width:5%">[% 'Taxkey' | $T8 %]</th>
133           <th class=listheading style="width:10%">[% 'Project' | $T8 %]</th>
134         </tr>
135
136
137 [%- FOREACH row IN transactions %]
138         <tr>
139           <td>[% row.selectAR_amount %]</td>
140           <td>[% L.input_tag('amount_' _ loop.count, LxERP.format_amount(row.amount, 2)) %]</td>
141           <td>[% L.hidden_tag('tax_' _ loop.count, LxERP.format_tax(row.tax, 2)) %][% LxERP.format_amount(row.tax, 2) | html %]</td>
142           <td>[% row.taxchart %]</td>
143           <td>[% L.select_tag('project_id_' _ loop.count, ALL_PROJECTS, title_key = 'projectnumber', default = row.project_id, with_empty = 1) %]</td>
144         </tr>
145 [%- END %]
146
147         <tr>
148           <td colspan=6>
149             <hr noshade>
150           </td>
151         </tr>
152         <tr>
153           <td>[% ARselected %]</td>
154           <th align=left>[% LxERP.format_amount(invtotal, 2) | html %]</th>
155
156           <input type=hidden name=oldinvtotal value='[% oldinvtotal %]'>
157           <input type=hidden name=oldtotalpaid value='[% oldtotalpaid %]'>
158
159           <input type=hidden name=taxaccounts value="[% taxaccounts | html %]">
160
161           <td colspan=4></td>
162
163
164         </tr>
165         </table>
166         </td>
167     </tr>
168     <tr>
169       <td>
170         <table width=100%>
171         <tr>
172           <th align=left width=1%>[% 'Notes' | $T8 %]</th>
173           <td align=left><textarea name=notes rows="[% rows %]" cols=50 wrap=soft>[% notes | html %]</textarea></td>
174         </tr>
175       </table>
176     </td>
177   </tr>
178   <tr>
179     <td>
180       <table width=100%>
181         <tr class=listheading>
182           <th colspan=7 class=listheading>[% 'Incoming Payments' | $T8 %]</th>
183         </tr>
184
185         <tr>
186          <th>[% 'Date' | $T8 %]</th>
187          <th>[% 'Source' | $T8 %]</th>
188          <th>[% 'Memo' | $T8 %]</th>
189          <th>[% 'Amount' | $T8 %]</th>
190 [%- IF show_exch %]
191          <th>[% 'Exch' | $T8 %]</th>
192 [%- END %]
193          <th>[% 'Account' | $T8 %]</th>
194          <th>[% 'Project Number' | $T8 %]</th>
195         </tr>
196
197 [%- FOREACH row IN payments %]
198         <tr>
199          <td align=center>
200   [%- IF row.changeable %]
201           [% L.date_tag('datepaid_' _ loop.count, row.datepaid) %]
202   [%- ELSE %]
203          [% row.datepaid | html %][% L.hidden_tag('datepaid_' _ loop.count, row.datepaid) %]
204   [%- END %]
205          </td>
206          <td align=center>
207   [%- IF row.changeable %]
208           <input name="source_[% loop.count %]" size=11 value="[% row.source | html %]">
209   [%- ELSE %]
210          [% row.source | html %]<input type=hidden name="source_[% loop.count %]" value="[% row.source | html %]">
211   [%- END %]
212          </td>
213          <td align=center>
214   [%- IF row.changeable %]
215           <input name="memo_[% loop.count %]" size=11 value="[% row.memo | html %]">
216   [%- ELSE %]
217          [% row.memo | html %]<input type=hidden name="memo_[% loop.count %]" value="[% row.memo | html %]">
218   [%- END %]
219          </td>
220          <td align=center>
221   [%- IF row.changeable %]
222           <input name="paid_[% loop.count %]" size=11 value="[% row.paid ? LxERP.format_amount(row.paid, 2) : '' | html %]" onBlur="check_right_number_format(this)">
223   [%- ELSE %]
224          [% row.paid | html %]<input type=hidden name="paid_[% loop.count %]" value="[% row.paid ? LxERP.format_amount(row.paid, 2) : '' | html %]">
225   [%- END %]
226          </td>
227 [%- IF show_exch %]
228          <td align=center>
229     [%- IF row.forex || !row.changeable%]
230           <input type=hidden name="exchangerate_[% loop.count %]" value='[% row.exchangerate | html %]'>[% row.exchangerate | html %]
231     [%- ELSE %]
232           <input name="exchangerate_[% loop.count %]" size=10 value='[% row.exchangerate | html %]'>
233     [%- END %]
234           <input type=hidden name="forex_[% loop.count %]" value='[% row.forex | html %]'>
235          </td>
236 [%- END %]
237          <td align=center>
238   [%- IF row.changeable %]
239           [% row.selectAR_paid %]
240   [%- ELSE %]
241          [% row.AR_paid | html %]<input type=hidden name="AR_paid_[% loop.count %]" value='[% row.AR_paid | html %]'>
242   [%- END %]
243          </td>
244          <td>
245   [%- IF row.changeable %]
246           [% L.select_tag('paid_project_id_' _ loop.count, ALL_PROJECTS, title_key = 'projectnumber', default = row.paid_project_id, with_empty=1) %]
247   [%- ELSE %]
248           [% project_labels.${row.paid_project_id} | html %]
249           <input type=hidden name="paid_project_id_[% loop.count %]" value='[% row.paid_project_id %]'>
250   [%- END %]
251          </td>
252
253          <input type=hidden name="acc_trans_id_[% loop.count %]" value='[% row.acc_trans_id | html %]'>
254          <input type=hidden name="gldate_[% loop.count %]" value='[% row.gldate | html %]'>
255         </tr>
256 [%- END %]
257         <tr>
258           <td></td>
259           <td></td>
260           <td align="center">[% 'Total' | $T8 %]</td>
261           <td align="center">[% LxERP.format_amount(totalpaid, 2) | html %]</td>
262         </tr>
263         <tr>
264           <td></td>
265           <td></td>
266           <td align="center">[% 'Missing amount' | $T8 %]</td>
267           <td align="center">[% LxERP.format_amount(paid_missing, 2) | html %]</td>
268         </tr>
269         <input type=hidden name=paidaccounts value='[% paidaccounts %]'>
270
271       </table>
272     </td>
273   </tr>
274   <tr>
275     <td><hr size=3 noshade></td>
276   </tr>
277 </table>