4 [%- USE L %][%- USE P -%]
7 [%- SET follow_up_trans_info = invnumber _ ' (' _ vendor_obj.name _ ')' %]
8 <script type="text/javascript" src="js/common.js"></script>
9 <script type="text/javascript" src="js/calculate_qty.js"></script>
10 <script type="text/javascript" src="js/follow_up.js"></script>
12 <form method="post" name="invoice" action="[% script %]">
14 <p>[% saved_message %]</p>
16 [%- FOREACH key = HIDDENS %]
17 <input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key) %]">
19 <input type="hidden" name="follow_up_trans_id_1" value="[% id %]">
20 <input type="hidden" name="follow_up_trans_type_1" value="sales_invoice">
21 <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
22 <input type="hidden" name="follow_up_rowcount" value="1">
23 <input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
25 [%- INCLUDE 'common/flash.html' %]
26 [%- INCLUDE 'generic/set_longdescription.html' %]
28 <div id="ir_tabs" class="tabwidget">
30 <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
31 [%- IF INSTANCE_CONF.get_webdav %]
32 <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
35 [%- IF INSTANCE_CONF.get_doc_storage %]
36 <li><a href="controller.pl?action=File/list&file_type=document&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
37 <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
39 [%- IF AUTH.assert('record_links', 1) %]
40 <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
42 <li><a href="[% 'controller.pl?action=AccTrans/list_transactions&trans_id=' _ HTML.url(id) | html %]">[% LxERP.t8('Transactions') %]</a></li>
46 <div id="ui-tabs-basic-data">
52 <th align="right">[% 'Vendor' | $T8 %]</th>
54 [% P.customer_vendor_picker("vendor_id", vendor_id, type="vendor", style="width: 250px", class="initial_focus") %]
55 [% P.button_tag("show_vc_details('vendor')", LxERP.t8('Details (one letter abbreviation)')) %]
56 [% P.hidden_tag("previous_vendor_id", vendor_id) %]
59 [%- IF ALL_CONTACTS.size %]
61 <th align="right">[% 'Contact Person' | $T8 %]</th>
63 [% 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') %]
68 <td align="right">[% 'Credit Limit' | $T8 %]</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>
74 [%- IF invoice_obj.sepa_exports.as_list.size %]
76 <th align="right">[% LxERP.t8("SEPA exports") %]</th>
78 [% FOREACH export = invoice_obj.sepa_exports.as_list %]
79 <a href="sepa.pl?action=bank_transfer_edit&vc=vendor&id=[% HTML.url(export.id) %]">[% HTML.escape(export.id) %]</a>
80 [% UNLESS loop.last %], [% END %]
87 <th align="right">[% 'Vendor type' | $T8 %]</th>
88 <td>[% business %]; [% 'Trade Discount' | $T8 %] [% LxERP.format_amount(tradediscount * 100) %] %</td>
92 <th align="right" nowrap>[% 'Record in' | $T8 %]</th>
93 <td colspan="3"><select name="AP" style="width:250px;">[% selectAP %]</select></td>
94 <input type="hidden" name="selectAP" value="[% selectAP %]">
97 <th align="right">[% 'Steuersatz' | $T8 %]</th>
99 [% L.select_tag('taxzone_id', ( id ? ALL_TAXZONES : ALL_ACTIVE_TAXZONES) , default = taxzone_id, title_key = 'description', disabled = (id ? 1 : 0), style='width: 250px', onchange = "document.getElementById('update_button').click();") %]
101 <input type='hidden' name='taxzone_id' value='[% taxzone_id %]'>
105 <input type='hidden' name='taxzone_id' value='[% taxzone_id %]'>
108 [%- IF ALL_DEPARTMENTS.as_list.size %]
110 <th align="right" nowrap>[% 'Department' | $T8 %]</th>
111 <td colspan="3">[% P.select_tag("department_id", ALL_DEPARTMENTS, with_empty=1, default=department_id, title_key="description", style="width: 250px") %]</td>
116 <th align="right">[% 'Currency' | $T8 %]</th>
117 <td>[% currencies %]</td>
120 <input type="hidden" name="fxgain_accno" value="[% fxgain_accno %]">
121 <input type="hidden" name="fxloss_accno" value="[% fxloss_accno %]">
122 [%- IF show_exchangerate %]
124 <th align="right">[% 'Exchangerate' | $T8 %]</th>
127 [% LxERP.format_amount(exchangerate, 2) %]
129 <input name="exchangerate" size="10" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
136 <td align="right" valign="top">
139 <th align="right">[% 'Employee' | $T8 %]</th>
140 <td>[% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name') %]</td>
143 [%- IF is_type_credit_note %]
145 <th align="right" nowrap>[% 'Credit Note Number' | $T8 %]</th>
146 <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
149 <th align="right">[% 'Credit Note Date' | $T8 %]</th>
150 <td>[% L.date_tag('invdate', invdate) %]</td>
154 <th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
155 <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
158 <th align="right">[% 'Invoice Date' | $T8 %]</th>
159 <td>[% L.date_tag('invdate', invdate, onChange='kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate")') %]</td>
162 <th align="right">[% 'Due Date' | $T8 %]</th>
164 <span id="duedate_container"[% IF payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% L.date_tag('duedate', duedate) %]</span>
165 <span id="duedate_fixed"[% IF !payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% HTML.escape(duedate) %]</span>
171 <th align="right" nowrap>[% 'Order Number' | $T8 %]</th>
172 <td colspan="3"><input size='11' name="ordnumber" value="[% HTML.escape(ordnumber) %]"></td>
175 <th align="right" nowrap>[% 'Order Date' | $T8 %]</th>
176 <td>[% L.date_tag('orddate', orddate) %]</td>
179 <th align="right" nowrap>[% 'Quotation Date' | $T8 %]</th>
180 <td>[% L.date_tag('quodate', quodate) %]</td>
183 <th align="right" nowrap>[% 'Project Number' | $T8 %]</th>
184 <td>[% P.project_picker('globalproject_id', globalproject_id) %]</td>
196 <script type="text/javascript" src="js/show_form_details.js"></script>
197 <script type="text/javascript" src="js/show_vc_details.js"></script>
198 <script type="text/javascript" src="js/show_history.js"></script>
199 <script type="text/javascript">
201 $('document').ready(function(){
202 [% IF creditwarning != '' %]
203 alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
209 <input type="hidden" name="webdav" value="[% webdav | html %]">