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