5 [%- SET follow_up_trans_info = invnumber _ ' (' _ customer_name _ ')' %]
6 <script type="text/javascript" src="js/common.js"></script>
7 <script type="text/javascript" src="js/delivery_customer_selection.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>
13 <form method="post" name="invoice" action="[% script %]">
15 [%- FOREACH key = HIDDENS %]
16 <input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key) %]">
18 <input type="hidden" name="follow_up_trans_id_1" value="[% id %]">
19 <input type="hidden" name="follow_up_trans_type_1" value="sales_invoice">
20 <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
21 <input type="hidden" name="follow_up_rowcount" value="1">
25 <p>[% saved_message %]</p>
27 [%- PROCESS 'common/flash.html' %]
28 [%- INCLUDE 'generic/set_longdescription.html' %]
30 <div id="is_tabs" class="tabwidget">
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>
37 <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Invoice&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">[% 'Customer' | $T8 %]</th>
50 [%- INCLUDE 'generic/multibox.html'
53 style = 'width: 250px',
54 class = 'initial_focus',
61 onChange = "document.getElementById('update_button').click();" -%]
62 <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('[% HTML.escape(vc) %]')">
63 <input type="hidden" name="customer_klass" value="[% HTML.escape(customer_klass) %]">
64 <input type="hidden" name="customer_id" value="[% HTML.escape(customer_id) %]">
65 <input type="hidden" name="oldcustomer" value="[% HTML.escape(oldcustomer) %]">
66 <input type="hidden" name="selectcustomer" value="[% HTML.escape(selectcustomer) %]">
69 [%- IF ALL_CONTACTS.size %]
71 <th align="right">[% 'Contact Person' | $T8 %]</th>
73 [% 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') %]
77 [%- IF ALL_SHIPTO.size %]
79 <th align="right">[% 'Shipping Address' | $T8 %]</th>
81 [% shiptos = [ [ "", LxERP.t8("No/individual shipping address") ] ] ;
82 L.select_tag('shipto_id', shiptos.import(ALL_SHIPTO), default=shipto_id, value_key='shipto_id', title_key='displayable_id', 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 max_dunning_level || dunning_description %]
95 <th align="right" valign="top">[% LxERP.t8("Dunning status") %]</th>
97 [% IF dunning_description %]
98 <span class="dunned_invoice">[% LxERP.t8("This invoice's dunning level: #1", dunning_description) %]</span>
99 [% IF max_dunning_level %]<br>[% END %]
101 [% IF max_dunning_level %]
102 <span class="customer_dunning_level">
103 [% LxERP.t8("Customer's current maximum dunning level: #1", max_dunning_level) %]
105 [% LxERP.t8("Dunned open amount: #1", LxERP.format_amount(dunning_amount, 2)) %]
111 [%- IF invoice_obj.sepa_exports.as_list.size %]
113 <th align="right">[% LxERP.t8("SEPA exports") %]</th>
115 [% FOREACH export = invoice_obj.sepa_exports.as_list %]
116 <a href="sepa.pl?action=bank_transfer_edit&vc=customer&id=[% HTML.url(export.id) %]">[% HTML.escape(export.id) %]</a>
117 [% UNLESS loop.last %], [% END %]
124 <th align="right">[% 'Customer type' | $T8 %]</th>
125 <td>[% business %]; [% 'Trade Discount' | $T8 %] [% LxERP.format_amount(tradediscount * 100) %] %</td>
129 <th align="right" nowrap>[% 'Record in' | $T8 %]</th>
131 <select name="AR" style="width:250px;">[% selectAR %]</select>
132 <input type="hidden" name="selectAR" value="[% selectAR | html %]">
136 <th align="right">[% 'Steuersatz' | $T8 %]</th>
138 [% 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();") %]
140 <input type='hidden' name='taxzone_id' value='[% taxzone_id %]'>
144 [%- IF all_departments %]
146 <th align="right" nowrap>[% 'Department' | $T8 %]</th>
148 [% L.select_tag('department_id', all_departments, default = department_id, title_sub = \department_labels, with_empty = 1, style = 'width:250px') %]
154 <th align="right">[% 'Currency' | $T8 %]</th>
155 <td>[% currencies %]</td>
158 <tr style='display:none'>
160 <input type="hidden" name="fxgain_accno" value="[% fxgain_accno %]">
161 <input type="hidden" name="fxloss_accno" value="[% fxloss_accno %]">
164 [%- IF show_exchangerate %]
166 <th align="right">[% 'Exchangerate' | $T8 %]</th>
169 [% LxERP.format_amount(exchangerate, 2) %]
171 <input name="exchangerate" size="10" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
177 <th align="right" nowrap>[% 'Shipping Point' | $T8 %]</th>
178 <td colspan="3"><input size='35' name="shippingpoint" value="[% HTML.escape(shippingpoint) %]"></td>
181 <th align="right" nowrap>[% 'Ship via' | $T8 %]</th>
182 <td colspan="3"><input size='35' name="shipvia" value="[% HTML.escape(shipvia) %]"></td>
185 <th align="right">[% 'Transaction description' | $T8 %]</th>
186 <td colspan="3"><input size='35' name="transaction_description" id="transaction_description" value="[% HTML.escape(transaction_description) %]"></td>
190 <td align="right" valign="top">
193 <th align="right">[% 'Employee' | $T8 %]</th>
195 [% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name') %]
198 [%- IF ALL_SALESMEN.size %]
200 <th align="right">[% 'Salesman' | $T8 %]</th>
202 [% L.select_tag('salesman_id', ALL_SALESMEN, default = (salesman_id ? salesman_id : employee_id), title_key = 'safe_name') %]
207 [%- IF is_type_credit_note %]
209 <th align="right" nowrap>[% 'Credit Note Number' | $T8 %]</th>
210 <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
213 <th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
214 <td colspan="3"><input size='11' name="invnumber_for_credit_note" value="[% HTML.escape(invnumber_for_credit_note) %]"></td>
217 <th align="right">[% 'Credit Note Date' | $T8 %]</th>
218 <td>[% L.date_tag('invdate', invdate, onchange='kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate")') %]</td>
222 <th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
223 <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
226 <th align="right">[% 'Invoice Date' | $T8 %]</th>
227 <td>[% L.date_tag('invdate', invdate, onchange='kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate")') %]</td>
230 <th align="right">[% 'Due Date' | $T8 %]</th>
232 <span id="duedate_container"[% IF payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% L.date_tag('duedate', duedate) %]</span>
233 <span id="duedate_fixed"[% IF !payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% HTML.escape(duedate) %]</span>
237 <th align="right" nowrap>[% 'Delivery Order Number' | $T8 %]</th>
238 <td colspan="3"><input size='11' name="donumber" value="[% HTML.escape(donumber) %]"></td>
242 <th align="right">[% 'Delivery Date' | $T8 %]</th>
243 <td>[% L.date_tag('deliverydate', deliverydate) %]</td>
246 <th align="right" nowrap>[% 'Order Number' | $T8 %]</th>
247 <td colspan="3"><input size='11' name="ordnumber" value="[% HTML.escape(ordnumber) %]"></td>
250 <th align="right" nowrap>[% 'Order Date' | $T8 %]</th>
251 <td>[% L.date_tag('orddate', orddate) %]</td>
254 <th align="right" nowrap>[% 'Quotation Number' | $T8 %]</th>
255 <td colspan="3"><input size='11' name="quonumber" value="[% HTML.escape(quonumber) %]"></td>
258 <th align="right" nowrap>[% 'Quotation Date' | $T8 %]</th>
259 <td>[% L.date_tag('quodate', quodate) %]</td>
262 <th align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th>
263 <td colspan="3"><input size='11' name="cusordnumber" value="[% HTML.escape(cusordnumber) %]"></td>
266 <th align="right" nowrap>[% 'Project Number' | $T8 %]</th>
268 [%- L.select_tag('globalproject_id', ALL_PROJECTS, title_key = 'projectnumber', default = globalproject_id, with_empty = '1', onChange = "document.getElementById('update_button').click();") %]
274 <tr style='display:none'>
276 <input type="hidden" name="webdav" value="[% webdav %]">
281 <script type="text/javascript" src="js/show_form_details.js"></script>
282 <script type="text/javascript" src="js/show_vc_details.js"></script>
283 <script type="text/javascript" src="js/show_history.js"></script>
284 <script type="text/javascript">
286 $('document').ready(function(){
287 [% IF resubmit && is_format_html %]
288 window.open('about:blank','Beleg');
289 document.invoice.target = 'Beleg';
290 document.invoice.submit();
292 document.invoice.submit();
293 [% ELSIF creditwarning != '' %]
294 alert('[% 'Credit Limit exceeded!!!' | $T8 %]');