Kunde: Datenbanktabelle "klass" nach "pricegroup_id" migriert
[kivitendo-erp.git] / templates / webpages / ir / form_header.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5 <h1>[% title %]</h1>
6
7 [%- SET follow_up_trans_info = invnumber _ ' (' _ vendor_name _ ')' %]
8 <script type="text/javascript" src="js/common.js"></script>
9 <script type="text/javascript" src="js/vendor_selection.js"></script>
10 <script type="text/javascript" src="js/calculate_qty.js"></script>
11 <script type="text/javascript" src="js/follow_up.js"></script>
12 <script type="text/javascript" src="js/customer_or_vendor_selection.js"></script>
13
14 <form method="post" name="invoice" action="[% script %]">
15
16 <p>[% saved_message %]</p>
17
18 [%- FOREACH key = HIDDENS %]
19 <input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key)  %]">
20 [%- END %]
21 <input type="hidden" name="follow_up_trans_id_1" value="[% id %]">
22 <input type="hidden" name="follow_up_trans_type_1" value="sales_invoice">
23 <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
24 <input type="hidden" name="follow_up_rowcount" value="1">
25 <input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
26
27 [%- INCLUDE 'common/flash.html' %]
28 [%- INCLUDE 'generic/set_longdescription.html' %]
29
30 <div id="ir_tabs" class="tabwidget">
31  <ul>
32   <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
33 [%- IF INSTANCE_CONF.get_webdav %]
34   <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
35 [%- END %]
36 [%- IF id %]
37   [%- IF AUTH.assert('record_links', 1) %]
38   <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
39   [%- END %]
40   <li><a href="[% 'controller.pl?action=AccTrans/list_transactions&trans_id=' _ HTML.url(id) | html %]">[% LxERP.t8('Transactions') %]</a></li>
41 [%- END %]
42  </ul>
43
44  <div id="ui-tabs-basic-data">
45 <table width="100%">
46   <tr>
47     <td valign="top">
48       <table>
49         <tr>
50           <th align="right">[% 'Vendor' | $T8 %]</th>
51           <td>
52             [%- INCLUDE 'generic/multibox.html'
53                  id            = 'vendor',
54                  name          = 'vendor',
55                  style         = 'width: 250px',
56                  class         = 'initial_focus',
57                  DATA          = ALL_VENDORS,
58                  id_sub        = 'vc_keys',
59                  label_key     = 'name',
60                  select        = vc_select,
61                  limit         = vclimit,
62                  allow_textbox = 1,
63                  onChange      = "document.getElementById('update_button').click();" -%]
64             <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('[% vc | html %]')">
65           </td>
66           <input type="hidden" name="vendor_id" value="[% HTML.escape(vendor_id) %]">
67           <input type="hidden" name="oldvendor" value="[% HTML.escape(oldvendor) %]">
68           <input type="hidden" name="selectvendor" value="[% HTML.escape(selectvendor) %]">
69         </tr>
70 [%- IF ALL_CONTACTS.size %]
71         <tr>
72           <th align="right">[% 'Contact Person' | $T8 %]</th>
73           <td>
74             [% L.select_tag('cp_id', ALL_CONTACTS, default = cp_id, value_key = 'cp_id', title_key = 'full_name_dep', with_empty = 1, style = 'width: 250px') %]
75           </td>
76         </tr>
77 [%- END %]
78         <tr>
79           <td align="right">[% 'Credit Limit' | $T8 %]</td>
80           <td>
81             [% LxERP.format_amount(creditlimit, 0, '0') %]; [% 'Remaining' | $T8 %]
82             <span class="plus[% IF is_credit_remaining_negativ %]0[% ELSE %]1[% END %]">[% LxERP.format_amount(creditremaining,0 ,'0') %]</span>
83           </td>
84         </tr>
85 [%- IF invoice_obj.sepa_exports.as_list.size %]
86         <tr>
87           <th align="right">[% LxERP.t8("SEPA exports") %]</th>
88           <td>
89            [% FOREACH export = invoice_obj.sepa_exports.as_list %]
90             <a href="sepa.pl?action=bank_transfer_edit&vc=vendor&id=[% HTML.url(export.id) %]">[% HTML.escape(export.id) %]</a>
91             [% UNLESS loop.last %], [% END %]
92            [% END %]
93           </td>
94         </tr>
95 [%- END %]
96 [%- IF business %]
97         <tr>
98           <th align="right">[% 'Vendor type' | $T8 %]</th>
99           <td>[% business %]; [% 'Trade Discount' | $T8 %] [% LxERP.format_amount(tradediscount * 100) %] %</td>
100         </tr>
101 [%- END %]
102         <tr>
103           <th align="right" nowrap>[% 'Record in' | $T8 %]</th>
104           <td colspan="3"><select name="AP" style="width:250px;">[% selectAP %]</select></td>
105           <input type="hidden" name="selectAP" value="[% selectAP %]">
106         </tr>
107         <tr>
108           <th align="right">[% 'Steuersatz' | $T8 %]</th>
109           <td>
110             [%- INCLUDE 'generic/multibox.html'
111                  name       = 'taxzone_id'
112                  style      = 'width: 250px'
113                  DATA       = ALL_TAXZONES
114                  id_key     = 'id'
115                  readonly   = (id ? 1 : 0)
116                  label_key  = 'description' -%]
117           </td>
118   [%- IF id %]
119           <input type='hidden' name='taxzone_id' value='[% taxzone_id %]'>
120   [%- END %]
121         </tr>
122 [%- IF all_departments %]
123         <tr>
124           <th align="right" nowrap>[% 'Department' | $T8 %]</th>
125           <td colspan="3">
126             [%- INCLUDE 'generic/multibox.html'
127                  name       = 'department_id',
128                  style      = 'width: 250px',
129                  DATA       = all_departments,
130                  id_key     = 'id',
131                  label_sub  = 'department_labels',
132                  show_empty = 1 -%]
133           </td>
134         </tr>
135 [%- END %]
136 [%- IF currencies %]
137         <tr>
138           <th align="right">[% 'Currency' | $T8 %]</th>
139           <td>[% currencies %]</td>
140         </tr>
141 [%- END %]
142         <input type="hidden" name="fxgain_accno" value="[% fxgain_accno %]">
143         <input type="hidden" name="fxloss_accno" value="[% fxloss_accno %]">
144 [%- IF show_exchangerate %]
145         <tr>
146           <th align="right">[% 'Exchangerate' | $T8 %]</th>
147           <td>
148            [%- IF forex %]
149             [% LxERP.format_amount(exchangerate, 2) %]
150            [%- ELSE %]
151             <input name="exchangerate" size="10" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
152            [%- END %]
153           </td>
154         </tr>
155 [%- END %]
156       </table>
157     </td>
158     <td align="right" valign="top">
159       <table>
160         <tr>
161           <th align="right">[% 'Employee' | $T8 %]</th>
162           <td>[% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name') %]</td>
163         </tr>
164
165 [%- IF is_type_credit_note %]
166         <tr>
167           <th align="right" nowrap>[% 'Credit Note Number' | $T8 %]</th>
168           <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
169         </tr>
170         <tr>
171           <th align="right">[% 'Credit Note Date' | $T8 %]</th>
172           <td>[% L.date_tag('invdate', invdate) %]</td>
173         </tr>
174 [%- ELSE %]
175         <tr>
176           <th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
177           <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
178         </tr>
179         <tr>
180           <th align="right">[% 'Invoice Date' | $T8 %]</th>
181           <td>[% L.date_tag('invdate', invdate, onChange='kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate")') %]</td>
182         </tr>
183         <tr>
184           <th align="right">[% 'Due Date' | $T8 %]</th>
185           <td>
186            <span id="duedate_container"[% IF payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% L.date_tag('duedate', duedate) %]</span>
187            <span id="duedate_fixed"[% IF !payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% HTML.escape(duedate) %]</span>
188           </td>
189         </tr>
190 [%- END %]
191
192         <tr>
193           <th align="right" nowrap>[% 'Order Number' | $T8 %]</th>
194           <td colspan="3"><input size='11' name="ordnumber" value="[% HTML.escape(ordnumber) %]"></td>
195         </tr>
196         <tr>
197           <th align="right" nowrap>[% 'Order Date' | $T8 %]</th>
198           <td>[% L.date_tag('orddate', orddate) %]</td>
199         </tr>
200         <tr>
201           <th align="right" nowrap>[% 'Quotation Date' | $T8 %]</th>
202           <td>[% L.date_tag('quodate', quodate) %]</td>
203         </tr>
204         <tr>
205           <th align="right" nowrap>[% 'Project Number' | $T8 %]</th>
206           <td>
207             [%- INCLUDE 'generic/multibox.html'
208                  name       = 'globalproject_id',
209                  DATA       = ALL_PROJECTS,
210                  id_key     = 'id',
211                  label_key  = 'projectnumber',
212                  show_empty = 1,
213                  onChange   = "document.getElementById('update_button').click();" -%]
214           </td>
215         </tr>
216       </table>
217     </td>
218   </tr>
219 </table>
220     </td>
221   </tr>
222   <tr>
223     <td>
224     </td>
225   </tr>
226   <script type="text/javascript" src="js/show_form_details.js"></script>
227   <script type="text/javascript" src="js/show_vc_details.js"></script>
228   <script type="text/javascript" src="js/show_history.js"></script>
229   <script type="text/javascript">
230    <!--
231      $('document').ready(function(){
232 [% IF creditwarning != '' %]
233        alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
234 [% ELSE %]
235 [% END %]
236      });
237    //-->
238   </script>
239   <input type="hidden" name="webdav" value="[% webdav | html %]">