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 AUTH.assert('record_links', 1) %]
 
  36   <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
 
  38   <li><a href="[% 'controller.pl?action=AccTrans/list_transactions&trans_id=' _ HTML.url(id) | html %]">[% LxERP.t8('Transactions') %]</a></li>
 
  42  <div id="ui-tabs-basic-data">
 
  48           <th align="right">[% 'Vendor' | $T8 %]</th>
 
  50            [% P.customer_vendor_picker("vendor_id", vendor_id, type="vendor", style="width: 250px", class="initial_focus") %]
 
  51            [% P.button_tag("show_vc_details('vendor')", LxERP.t8('Details (one letter abbreviation)')) %]
 
  52            [% P.hidden_tag("previous_vendor_id", vendor_id) %]
 
  55 [%- IF ALL_CONTACTS.size %]
 
  57           <th align="right">[% 'Contact Person' | $T8 %]</th>
 
  59             [% 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') %]
 
  64           <td align="right">[% 'Credit Limit' | $T8 %]</td>
 
  66             [% LxERP.format_amount(creditlimit, 0, '0') %]; [% 'Remaining' | $T8 %]
 
  67             <span class="plus[% IF is_credit_remaining_negativ %]0[% ELSE %]1[% END %]">[% LxERP.format_amount(creditremaining,0 ,'0') %]</span>
 
  70 [%- IF invoice_obj.sepa_exports.as_list.size %]
 
  72           <th align="right">[% LxERP.t8("SEPA exports") %]</th>
 
  74            [% FOREACH export = invoice_obj.sepa_exports.as_list %]
 
  75             <a href="sepa.pl?action=bank_transfer_edit&vc=vendor&id=[% HTML.url(export.id) %]">[% HTML.escape(export.id) %]</a>
 
  76             [% UNLESS loop.last %], [% END %]
 
  83           <th align="right">[% 'Vendor type' | $T8 %]</th>
 
  84           <td>[% business %]; [% 'Trade Discount' | $T8 %] [% LxERP.format_amount(tradediscount * 100) %] %</td>
 
  88           <th align="right" nowrap>[% 'Record in' | $T8 %]</th>
 
  89           <td colspan="3"><select name="AP" style="width:250px;">[% selectAP %]</select></td>
 
  90           <input type="hidden" name="selectAP" value="[% selectAP %]">
 
  93           <th align="right">[% 'Steuersatz' | $T8 %]</th>
 
  95             [% 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();") %]
 
  97           <input type='hidden' name='taxzone_id' value='[% taxzone_id %]'>
 
 101           <input type='hidden' name='taxzone_id' value='[% taxzone_id %]'>
 
 104 [%- IF ALL_DEPARTMENTS.as_list.size %]
 
 106           <th align="right" nowrap>[% 'Department' | $T8 %]</th>
 
 107           <td colspan="3">[% P.select_tag("department_id", ALL_DEPARTMENTS, with_empty=1, default=department_id, title_key="description", style="width: 250px") %]</td>
 
 112           <th align="right">[% 'Currency' | $T8 %]</th>
 
 113           <td>[% currencies %]</td>
 
 116         <input type="hidden" name="fxgain_accno" value="[% fxgain_accno %]">
 
 117         <input type="hidden" name="fxloss_accno" value="[% fxloss_accno %]">
 
 118 [%- IF show_exchangerate %]
 
 120           <th align="right">[% 'Exchangerate' | $T8 %]</th>
 
 123             [% LxERP.format_amount(exchangerate, 2) %]
 
 125             <input name="exchangerate" size="10" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
 
 132     <td align="right" valign="top">
 
 135           <th align="right">[% 'Employee' | $T8 %]</th>
 
 136           <td>[% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name') %]</td>
 
 139 [%- IF is_type_credit_note %]
 
 141           <th align="right" nowrap>[% 'Credit Note Number' | $T8 %]</th>
 
 142           <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
 
 145           <th align="right">[% 'Credit Note Date' | $T8 %]</th>
 
 146           <td>[% L.date_tag('invdate', invdate) %]</td>
 
 150           <th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
 
 151           <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
 
 154           <th align="right">[% 'Invoice Date' | $T8 %]</th>
 
 155           <td>[% L.date_tag('invdate', invdate, onChange='kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate")') %]</td>
 
 158           <th align="right">[% 'Due Date' | $T8 %]</th>
 
 160            <span id="duedate_container"[% IF payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% L.date_tag('duedate', duedate) %]</span>
 
 161            <span id="duedate_fixed"[% IF !payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% HTML.escape(duedate) %]</span>
 
 167           <th align="right" nowrap>[% 'Order Number' | $T8 %]</th>
 
 168           <td colspan="3"><input size='11' name="ordnumber" value="[% HTML.escape(ordnumber) %]"></td>
 
 171           <th align="right" nowrap>[% 'Order Date' | $T8 %]</th>
 
 172           <td>[% L.date_tag('orddate', orddate) %]</td>
 
 175           <th align="right" nowrap>[% 'Quotation Date' | $T8 %]</th>
 
 176           <td>[% L.date_tag('quodate', quodate) %]</td>
 
 179           <th align="right" nowrap>[% 'Project Number' | $T8 %]</th>
 
 180           <td>[% P.project_picker('globalproject_id', globalproject_id) %]</td>
 
 192   <script type="text/javascript" src="js/show_form_details.js"></script>
 
 193   <script type="text/javascript" src="js/show_vc_details.js"></script>
 
 194   <script type="text/javascript" src="js/show_history.js"></script>
 
 195   <script type="text/javascript">
 
 197      $('document').ready(function(){
 
 198 [% IF creditwarning != '' %]
 
 199        alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
 
 205   <input type="hidden" name="webdav" value="[% webdav | html %]">