4 [%- USE L %][%- USE P -%]
7 [% IF workflow_email_journal_id; LxERP.t8("Email Journal Workflow") _ " - "; END; %]
11 [%- SET follow_up_trans_info = invnumber _ ' (' _ vendor_obj.name _ ')' %]
12 <script type="text/javascript" src="js/common.js"></script>
13 <script type="text/javascript" src="js/calculate_qty.js"></script>
14 <script type="text/javascript" src="js/follow_up.js"></script>
16 <form id='form' method="post" name="invoice" action="[% script %]">
18 <p>[% saved_message %]</p>
20 [%- FOREACH key = HIDDENS %]
21 [% L.hidden_tag(key, $key) %]
23 <input type="hidden" name="follow_up_trans_id_1" value="[% id %]">
24 <input type="hidden" name="follow_up_trans_type_1" value="purchase_invoice">
25 <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
26 <input type="hidden" name="follow_up_rowcount" value="1">
27 <input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
29 [% L.hidden_tag('form_validity_token', form_validity_token) %]
31 [% L.hidden_tag('email_journal_id', email_journal_id) %]
32 [% L.hidden_tag('email_attachment_id', email_attachment_id) %]
33 [% L.hidden_tag('workflow_email_journal_id', workflow_email_journal_id) %]
34 [% L.hidden_tag('workflow_email_attachment_id', workflow_email_attachment_id) %]
35 [% L.hidden_tag('workflow_email_callback', workflow_email_callback) %]
37 [%- INCLUDE 'common/flash.html' %]
38 [%- INCLUDE 'generic/set_longdescription.html' %]
40 <div id="ir_tabs" class="tabwidget">
42 <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
43 [% IF email_attachment_id || workflow_email_attachment_id %]
44 <li><a href="controller.pl?action=EmailJournal/attachment_preview&attachment_id=[% HTML.url(email_attachment_id || workflow_email_attachment_id) %]">[% 'Email Attachment Preview' | $T8 %]</a></li>
46 [%- IF INSTANCE_CONF.get_webdav %]
47 <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
50 [%- IF INSTANCE_CONF.get_doc_storage %]
51 <li><a href="#ui-tabs-docs">[% 'Documents' | $T8 %]</a></li>
52 <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
54 [%- IF AUTH.assert('record_links', 1) %]
55 <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
57 <li><a href="[% 'controller.pl?action=AccTrans/list_transactions&trans_id=' _ HTML.url(id) | html %]">[% LxERP.t8('Transactions') %]</a></li>
61 [%- IF INSTANCE_CONF.get_doc_storage %]
62 <div id="ui-tabs-docs"></div>
65 <div id="ui-tabs-basic-data">
71 <th align="right">[% 'Vendor' | $T8 %]</th>
73 [% P.customer_vendor.picker("vendor_id", vendor_id, type="vendor", style="width: 250px", class="initial_focus",
75 [% P.hidden_tag("previous_vendor_id", vendor_id) %]
78 [%- IF ALL_CONTACTS.size %]
80 <th align="right">[% 'Contact Person' | $T8 %]</th>
82 [% 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') %]
87 <td align="right">[% 'Credit Limit' | $T8 %]</td>
89 [% LxERP.format_amount(creditlimit, 0, '0') %]; [% 'Remaining' | $T8 %]
90 <span class="plus[% IF is_credit_remaining_negativ %]0[% ELSE %]1[% END %]">[% LxERP.format_amount(creditremaining,0 ,'0') %]</span>
93 [%- IF invoice_obj.sepa_exports.as_list.size %]
95 <th align="right">[% LxERP.t8("SEPA exports") %]</th>
97 [% FOREACH export = invoice_obj.sepa_exports.as_list %]
98 <a href="sepa.pl?action=bank_transfer_edit&vc=vendor&id=[% HTML.url(export.id) %]">[% HTML.escape(export.id) %]</a>
99 [% UNLESS loop.last %], [% END %]
106 <th align="right">[% 'Vendor type' | $T8 %]</th>
107 <td>[% business %]; [% 'Trade Discount' | $T8 %] [% LxERP.format_amount(tradediscount * 100) %] %</td>
111 <th align="right" nowrap>[% 'Record in' | $T8 %]</th>
112 <td colspan="3">[% P.chart.picker("AP_chart_id", AP_chart_id, style="width:250px;", type="AP", "data-validate"="required") %]</td>
115 <th align="right">[% 'Steuersatz' | $T8 %]</th>
117 [% 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 = "kivi.io.update_taxzone()") %]
119 <input type='hidden' name='taxzone_id' value='[% taxzone_id %]'>
123 <input type='hidden' name='taxzone_id' value='[% taxzone_id %]'>
126 [%- IF ALL_DEPARTMENTS.as_list.size %]
128 <th align="right" nowrap>[% 'Department' | $T8 %]</th>
129 <td colspan="3">[% P.select_tag("department_id", ALL_DEPARTMENTS, with_empty=1, default=department_id, title_key="description", style="width: 250px") %]</td>
134 <th align="right">[% 'Currency' | $T8 %]</th>
137 [% HTML.escape(currency) %]
138 [% L.hidden_tag("currency", currency) %]
145 <input type="hidden" name="fxgain_accno" value="[% fxgain_accno %]">
146 <input type="hidden" name="fxloss_accno" value="[% fxloss_accno %]">
147 [%- IF show_exchangerate %]
149 <th align="right">[% 'Exchangerate' | $T8 %]</th>
152 [% LxERP.format_amount(exchangerate, 5) %]
153 [% L.hidden_tag("exchangerate", LxERP.format_amount(exchangerate, 5)) %]
155 <input name="exchangerate" size="10" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
157 [% IF record_forex %][% 'record exchange rate' | $T8 %][%- ELSE %][% 'default exchange rate' | $T8 %][%- END %]
162 <th align="right">[% 'Transaction description' | $T8 %]</th>
163 <td colspan="3">[% L.input_tag("transaction_description", transaction_description, size=35, "data-validate"=INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : '') %]</td>
167 <td align="right" valign="top">
170 <th align="right">[% 'Employee' | $T8 %]</th>
171 <td>[% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name') %]</td>
174 <th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
175 <td colspan="3">[% L.input_tag("invnumber", invnumber, size="11") %]</td>
178 <th align="right">[% 'Invoice Date' | $T8 %]</th>
179 <td>[% L.date_tag('invdate', invdate, onChange='kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate")') %]</td>
182 <th align="right">[% 'Due Date' | $T8 %]</th>
184 <span id="duedate_container"[% IF payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% L.date_tag('duedate', duedate) %]</span>
185 <span id="duedate_fixed"[% IF !payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% HTML.escape(duedate) %]</span>
189 <th align="right" nowrap>[% LxERP.t8('Tax point') %]</th>
190 <td nowrap>[% L.date_tag('tax_point', tax_point, id='tax_point') %]</td>
193 <th align="right">[% 'Delivery Date' | $T8 %]</th>
194 <td>[% L.date_tag('deliverydate', deliverydate) %]</td>
197 <th align="right" nowrap>[% 'Order Number' | $T8 %]</th>
198 <td colspan="3"><input size='11' name="ordnumber" value="[% HTML.escape(ordnumber) %]"></td>
201 <th align="right" nowrap>[% 'Order Date' | $T8 %]</th>
202 <td>[% L.date_tag('orddate', orddate) %]</td>
205 <th align="right" nowrap>[% 'Quotation Date' | $T8 %]</th>
206 <td>[% L.date_tag('quodate', quodate) %]</td>
209 <th align="right" nowrap>[% 'Project Number' | $T8 %]</th>
210 <td>[% P.project.picker('globalproject_id', globalproject_id, onchange="document.getElementById('update_button').click();") %]</td>
222 <script type="text/javascript" src="js/show_form_details.js"></script>
223 <script type="text/javascript" src="js/show_history.js"></script>
224 <script type="text/javascript">
226 $('document').ready(function(){
227 [% IF creditwarning != '' %]
228 alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
230 kivi.File.doc_tab_init('ir_tabs', 'ui-tabs-docs', $('#id').val(), 'purchase_invoice');
234 <input type="hidden" name="webdav" value="[% webdav | html %]">