[% USE T8 %] [% USE HTML %] [% USE LxERP %] [% USE L %] [% USE P %]

[% IF workflow_email_journal_id; LxERP.t8("Email Journal Workflow") _ " - "; END; %] [% title %]

[% SET follow_up_trans_info = invnumber _ ' (' _ vendor_obj.name _ ')' %]

[% saved_message %]

[% FOREACH key = HIDDENS %] [% L.hidden_tag(key, $key) %] [% END %] [% IF !id %] [% L.hidden_tag('form_validity_token', form_validity_token) %] [% END %] [% L.hidden_tag('email_journal_id', email_journal_id) %] [% L.hidden_tag('email_attachment_id', email_attachment_id) %] [% L.hidden_tag('workflow_email_journal_id', workflow_email_journal_id) %] [% L.hidden_tag('workflow_email_attachment_id', workflow_email_attachment_id) %] [% L.hidden_tag('workflow_email_callback', workflow_email_callback) %] [% INCLUDE 'common/flash.html' %] [% INCLUDE 'generic/set_longdescription.html' %]
[%- IF INSTANCE_CONF.get_doc_storage %]
[%- END %]
[% IF email_attachment_id || workflow_email_attachment_id%]
[% BLOCK panel_1; P.email_journal.attachment_preview( email_attachment_id || workflow_email_attachment_id, style="height:600px" ); END; INCLUDE 'common/toggle_panel.html' block_name='panel_1' button_closed = LxERP.t8('Show Attachment') button_open = LxERP.t8('Hide Attachment') ; %]
[% END %]
[% INCLUDE 'generic/toggle_wrapper.html' %] [% IF ALL_CONTACTS.size %] [% END %] [% IF business %] [% END %] [% IF ALL_DEPARTMENTS.as_list.size %] [% END %] [% IF invoice_obj.sepa_exports.as_list.size %] [% END %] [% IF currencies %] [% END %] [% IF show_exchangerate %] [% END %]
[% 'Vendor & Transaction' | $T8 %]
[% 'Vendor' | $T8 %] [% P.customer_vendor.picker("vendor_id", vendor_id, type="vendor", class="initial_focus", show_details="1") %] [% P.hidden_tag("previous_vendor_id", vendor_id) %]
[% 'Contact Person' | $T8 %] [% L.select_tag('cp_id', ALL_CONTACTS, default = cp_id, value_key = 'cp_id', title_key = 'full_name_dep', with_empty = 1, class='wi-wide') %]
[% 'Vendor type' | $T8 %] [% business %]; [% 'Trade Discount' | $T8 %] [% LxERP.format_amount(tradediscount * 100) %] %
[% 'Department' | $T8 %] [% P.select_tag("department_id", ALL_DEPARTMENTS, with_empty=1, default=department_id, title_key="description", class="wi-wide") %]
[% 'Credit Limit' | $T8 %] [% LxERP.format_amount(creditlimit, 0, '0') %]; [% 'Remaining' | $T8 %] [% LxERP.format_amount(creditremaining,0 ,'0') %]
[% LxERP.t8("SEPA exports") %] [% FOREACH export = invoice_obj.sepa_exports.as_list %] [% HTML.escape(export.id) %] [% UNLESS loop.last %], [% END %] [% END %]
[% 'Record in' | $T8 %] [% P.chart.picker("AP_chart_id", AP_chart_id, class="wi-wide", type="AP", "data-validate"="required") %]
[% 'Steuersatz' | $T8 %] [% L.select_tag('taxzone_id', ( id ? ALL_TAXZONES : ALL_ACTIVE_TAXZONES) , default = taxzone_id, title_key = 'description', disabled = (id ? 1 : 0), class='wi-wide', onchange = "kivi.io.update_taxzone()" ) %] [% IF id %] [% END %]
[% 'Currency' | $T8 %] [%- IF readonly %] [% HTML.escape(currency) %] [% L.hidden_tag("currency", currency) %] [%- ELSE %] [% currencies %] [%- END %]
[% 'Exchangerate' | $T8 %] [%- IF readonly %] [% LxERP.format_amount(exchangerate, 5) %] [% L.hidden_tag("exchangerate", LxERP.format_amount(exchangerate, 5)) %] [% ELSE %] [% END %] [% IF record_forex %][% 'record exchange rate' | $T8 %][%- ELSE %][% 'default exchange rate' | $T8 %][%- END %]
[% 'Transaction description' | $T8 %] [% L.input_tag("transaction_description", transaction_description, "data-validate"=INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : '') %]
[% IF id && follow_ups.size %] [% END %]
[% 'Payment / Delivery Options' | $T8 %]
[% 'Payment Terms' | $T8 %] [% L.select_tag('payment_id', payment_terms, default = payment_id, title_key = 'description', with_empty = 1, style="width: 250px") %]
[% 'Delivery Terms' | $T8 %] [% L.select_tag('delivery_term_id', ALL_DELIVERY_TERMS, default=delivery_term_id, with_empty=1, title_key='description', class='wi-wider') %]
[% L.checkbox_tag('direct_debit', 'checked', direct_debit) %]
[% 'Notes' | $T8 %]
[% L.textarea_tag("notes", notes, style="height:150px", class="texteditor wi-wider") %]
[% 'Internal Notes' | $T8 %] [% L.textarea_tag("intnotes", intnotes, class="wi-wider") %]
[% LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', follow_ups.size, follow_ups_unfinished) | html %]
[% IF is_type_credit_note %] [% ELSE %] [% END %] [% IF is_type_credit_note %] [% ELSE %] [% END %]
[% 'Handling, Numbers & Dates' | $T8 %]
[% 'Employee' | $T8 %] [% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name', class='wi-wide') %]
[% 'Order Number' | $T8 %]
[% 'Credit Note Number' | $T8 %]
[% 'Invoice Number' | $T8 %] [% L.input_tag('invnumber', invnumber, class='wi-mediumsmall') %]
[% 'Project Number' | $T8 %] [% P.project.picker('globalproject_id', globalproject_id, onchange="document.getElementById('update_button').click();", class='wi-mediumsmall') %]
[% 'Quotation Date' | $T8 %] [% L.date_tag('quodate', quodate, class='wi-small') %]
[% 'Order Date' | $T8 %] [% L.date_tag('orddate', orddate, class='wi-small') %]
[% 'Credit Note Date' | $T8 %] [% L.date_tag('invdate', invdate, class='wi-small') %]
[% 'Invoice Date' | $T8 %] [% L.date_tag('invdate', invdate, onChange='kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate")', class='wi-small') %]
[% 'Due Date' | $T8 %]
[% 'Tax point' | $T8 %] [% L.date_tag('tax_point', tax_point, id='tax_point', class='wi-small') %]
[% 'Delivery Date' | $T8 %] [% L.date_tag('deliverydate', deliverydate, class='wi-small') %]