Menge und Soldtotal in Warensuche getrennt.
[kivitendo-erp.git] / templates / webpages / ir / form_header.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5 [%- SET follow_up_trans_info = invnumber _ ' (' _ vendor_name _ ')' %]
6 <body>
7 <script type="text/javascript" src="js/common.js"></script>
8 <script type="text/javascript" src="js/vendor_selection.js"></script>
9 <script type="text/javascript" src="js/calculate_qty.js"></script>
10 <script type="text/javascript" src="js/follow_up.js"></script>
11 <script type="text/javascript" src="js/customer_or_vendor_selection.js"></script>
12
13 <form method="post" name="invoice" action="[% script %]">
14
15 <p>[% saved_message %]</p>
16
17 [%- FOREACH key = HIDDENS %]
18 <input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key)  %]">
19 [%- END %]
20 <input type="hidden" name="follow_up_trans_id_1" value="[% id %]">
21 <input type="hidden" name="follow_up_trans_type_1" value="sales_invoice">
22 <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
23 <input type="hidden" name="follow_up_rowcount" value="1">
24
25 <p><div class="listtop" width="100%">[% title %]</div></p>
26
27 [%- INCLUDE 'common/flash.html' %]
28
29 <table width="100%">
30   <tr>
31     <td valign="top">
32       <table>
33         <tr>
34           <th align="right">[% 'Vendor' | $T8 %]</th>
35           <td>
36             [%- INCLUDE 'generic/multibox.html'
37                  name          = 'vendor',
38                  style         = 'width: 250px',
39                  DATA          = ALL_VENDORS,
40                  id_sub        = 'vc_keys',
41                  label_key     = 'name',
42                  select        = vc_select,
43                  limit         = vclimit,
44                  allow_textbox = 1,
45                  onChange      = "document.getElementById('update_button').click();" -%]
46             <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('[% vc | html %]')">
47           </td>
48           <input type="hidden" name="vendor_klass" value="[% HTML.escape(vendor_klass) %]">
49           <input type="hidden" name="vendor_id" value="[% HTML.escape(vendor_id) %]">
50           <input type="hidden" name="oldvendor" value="[% HTML.escape(oldvendor) %]">
51           <input type="hidden" name="selectvendor" value="[% HTML.escape(selectvendor) %]">
52         </tr>
53 [%- IF ALL_CONTACTS.size %]
54         <tr>
55           <th align="right">[% 'Contact Person' | $T8 %]</th>
56           <td>
57             [%- INCLUDE 'generic/multibox.html'
58                  name       = 'cp_id',
59                  style      = 'width: 250px',
60                  DATA       = ALL_CONTACTS,
61                  id_key     = 'cp_id',
62                  label_sub  = 'contact_labels',
63                  show_empty = 1 -%]
64           </td>
65         </tr>
66 [%- END %]
67         <tr>
68           <td align="right">[% 'Credit Limit' | $T8 %]</td>
69           <td>
70             [% LxERP.format_amount(creditlimit, 0, '0') %]; [% 'Remaining' | $T8 %]
71             <span class="plus[% IF is_credit_remaining_negativ %]0[% ELSE %]1[% END %]">[% LxERP.format_amount(creditremaining,0 ,'0') %]</span>
72           </td>
73         </tr>
74         <tr>
75           <th align="right" nowrap>[% 'Record in' | $T8 %]</th>
76           <td colspan="3"><select name="AP" style="width:250px;">[% selectAP %]</select></td>
77           <input type="hidden" name="selectAP" value="[% selectAP %]">
78         </tr>
79         <tr>
80           <th align="right">[% 'Steuersatz' | $T8 %]</th>
81           <td>
82             [%- INCLUDE 'generic/multibox.html'
83                  name       = 'taxzone_id'
84                  style      = 'width: 250px'
85                  DATA       = ALL_TAXZONES
86                  id_key     = 'id'
87                  readonly   = (id ? 1 : 0)
88                  label_key  = 'description' -%]
89           </td>
90   [%- IF id %]
91           <input type='hidden' name='taxzone_id' value='[% taxzone_id %]'>
92   [%- END %]
93         </tr>
94 [%- IF all_departments %]
95         <tr>
96           <th align="right" nowrap>[% 'Department' | $T8 %]</th>
97           <td colspan="3">
98             [%- INCLUDE 'generic/multibox.html'
99                  name       = 'department_id',
100                  style      = 'width: 250px',
101                  DATA       = all_departments,
102                  id_key     = 'id',
103                  label_sub  = 'department_labels',
104                  show_empty = 1 -%]
105           </td>
106         </tr>
107 [%- END %]
108 [%- IF currencies %]
109         <tr>
110           <th align="right">[% 'Currency' | $T8 %]</th>
111           <td>[% currencies %]</td>
112         </tr>
113 [%- END %]
114         <input type="hidden" name="fxgain_accno" value="[% fxgain_accno %]">
115         <input type="hidden" name="fxloss_accno" value="[% fxloss_accno %]">
116 [%- IF show_exchangerate %]
117         <tr>
118           <th align="right">[% 'Exchangerate' | $T8 %]</th>
119           <td>
120            [%- IF forex %]
121             [% LxERP.format_amount(exchangerate, 2) %]
122            [%- ELSE %]
123             <input name="exchangerate" size="10" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
124            [%- END %]
125           </td>
126         </tr>
127 [%- END %]
128       </table>
129     </td>
130     <td align="right" valign="top">
131       <table>
132         <tr>
133           <th align="right">[% 'Employee' | $T8 %]</th>
134           <td>
135             [%- INCLUDE 'generic/multibox.html'
136                  name       = 'employee_id',
137                  DATA       = ALL_EMPLOYEES,
138                  id_key     = 'id',
139                  label_sub  = 'sales_employee_labels' -%]
140           </td>
141         </tr>
142
143 [%- IF is_type_credit_note %]
144         <tr>
145           <th align="right" nowrap>[% 'Credit Note Number' | $T8 %]</th>
146           <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
147         </tr>
148         <tr>
149           <th align="right">[% 'Credit Note Date' | $T8 %]</th>
150           <td>[% L.date_tag('invdate', invdate, onBlur='check_right_date_format(this)', cal_align='BL', onChange='set_duedate(this)') %]</td>
151         </tr>
152 [%- ELSE %]
153         <tr>
154           <th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
155           <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
156         </tr>
157         <tr>
158           <th align="right">[% 'Invoice Date' | $T8 %]</th>
159           <td>[% L.date_tag('invdate', invdate, onBlur='check_right_date_format(this)', cal_align='BL', onChange='set_duedate(this)') %]</td>
160         </tr>
161         <tr>
162           <th align="right">[% 'Due Date' | $T8 %]</th>
163           <td>[% L.date_tag('duedate', duedate, onBlur='check_right_date_format(this)', cal_align='BL') %]</td>
164         </tr>
165 [%- END %]
166
167         <tr>
168           <th align="right" nowrap>[% 'Order Number' | $T8 %]</th>
169           <td colspan="3"><input size='11' name="ordnumber" value="[% HTML.escape(ordnumber) %]"></td>
170         </tr>
171         <tr>
172           <th align="right" nowrap>[% 'Order Date' | $T8 %]</th>
173           <td>[% L.date_tag('orddate', orddate, onBlur='check_right_date_format(this)', cal_align='BL') %]</td>
174         </tr>
175         <tr>
176           <th align="right" nowrap>[% 'Quotation Date' | $T8 %]</th>
177           <td>[% L.date_tag('quodate', quodate, onBlur='check_right_date_format(this)', cal_align='BL') %]</td>
178         </tr>
179         <tr>
180           <th align="right" nowrap>[% 'Project Number' | $T8 %]</th>
181           <td>
182             [%- INCLUDE 'generic/multibox.html'
183                  name       = 'globalproject_id',
184                  DATA       = ALL_PROJECTS,
185                  id_key     = 'id',
186                  label_key  = 'projectnumber',
187                  show_empty = 1,
188                  onChange   = "document.getElementById('update_button').click();" -%]
189           </td>
190         </tr>
191       </table>
192     </td>
193   </tr>
194 </table>
195     </td>
196   </tr>
197   <tr>
198     <td>
199     </td>
200   </tr>
201   <script type="text/javascript" src="js/show_form_details.js"></script>
202   <script type="text/javascript" src="js/show_vc_details.js"></script>
203   <script type="text/javascript" src="js/show_history.js"></script>
204   <script type="text/javascript">
205    <!--
206      $('document').ready(function(){
207 [% IF creditwarning != '' %]
208        alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
209 [% ELSE %]
210        focus();
211 [% END %]
212        setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
213        setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
214      });
215      function set_duedate() {
216        $.ajax({
217          url: 'ir.pl?action=get_duedate_vendor',
218          data: {
219            invdate:     $('#invdate').val(),
220            vendor_id:   $('input[name="vendor_id"]').val(),
221            old_duedate: $('#duedate').val(),
222          },
223          dataType: 'text',
224          success: function (data) { $('#duedate').val(data); }
225        })
226      }
227    //-->
228   </script>
229
230   <input type="hidden" name="webdav" value="[% webdav %]">