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