[%- USE T8 %] [%- USE HTML %] [%- USE LxERP %] [%- USE L %] [% cv_cvars = SELF.cv.cvars_by_config %]
[% FORM.title %]
[% L.hidden_tag('db', FORM.db) %] [% L.hidden_tag('callback', FORM.callback) %] [% L.hidden_tag('cv.id', SELF.cv.id) %] [%- INCLUDE 'common/flash.html' %]
[% IF ( conf_vertreter ) %] [%- END %] [% IF SELF.is_vendor() %] [%- ELSE %] [%- END %]
[% IF SELF.is_vendor() %] [% 'Type of Vendor' | $T8 %] [% ELSE %] [% 'Type of Customer' | $T8 %] [% END %] [% L.select_tag('cv.business_id', SELF.all_business, value_key = 'id', title_key = 'description', default = SELF.cv.business_id, with_empty = 1) %]
[% 'Representative' | $T8 %] [% L.select_tag('cv.salesman_id', SELF.all_employees, value_key = 'id', title_key = 'safe_name', with_empty = 1) %]
[% 'Vendor Number' | $T8 %] [% L.input_tag('cv.vendornumber', SELF.cv.vendornumber) %] [% 'Customer Number' | $T8 %] [% L.input_tag('cv.customernumber', SELF.cv.customernumber) %]
[% 'Greeting' | $T8 %] [% L.input_tag('cv.greeting', SELF.cv.greeting) %] [% L.select_tag('cv_greeting_select', SELF.all_greetings, default = SELF.cv.greeting, with_empty = 1, onchange = '$("#cv_greeting").val(this.value);') %]
[% IF SELF.is_vendor() %] [% 'Vendor Name' | $T8 %] [%- ELSE %] [% 'Customer Name' | $T8 %] [%- END %] [% L.input_tag('cv.name', SELF.cv.name) %]
[% 'Department' | $T8 %] [% L.input_tag('cv.department_1', SELF.cv.department_1, size = 16, maxlength = 75) %] [% L.input_tag('cv.department_2', SELF.cv.department_2, size = 16, maxlength = 75) %]
[% 'Street' | $T8 %] [% L.input_tag('cv.street', SELF.cv.street) %] [% 'Map' | $T8 %]
[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %] [% L.input_tag('cv.zipcode', SELF.cv.zipcode, size = 5 maxlength = 10) %] [% L.input_tag('cv.city', SELF.cv.city, size = 30 maxlength = 75) %]
[% 'Country' | $T8 %] [% L.input_tag('cv.country', SELF.cv.country, size = 30 maxlength = 75) %]
[% 'Contact' | $T8 %] [% L.input_tag('cv.contact', SELF.cv.contact, size = 28 maxlength = 75) %]
[% 'Phone' | $T8 %] [% L.input_tag('cv.phone', SELF.cv.phone, size = 30) %]
[% 'Fax' | $T8 %] [% L.input_tag('cv.fax', SELF.cv.fax, size = 30 maxlength = 30) %]
[% 'E-mail' | $T8 %] [% L.input_tag('cv.email', SELF.cv.email, size = 45) %]
[% IF homepage %] [% 'Homepage' | $T8 %] [% ELSE %] [% 'Homepage' | $T8 %] [% END %] [% L.input_tag('cv.homepage', SELF.cv.homepage, size = 45, title = LxERP.t8('Example: http://kivitendo.de')) %]
[% 'Username' | $T8 %] [% L.input_tag('cv.username', SELF.cv.username, size = 45) %]
[% 'Password' | $T8 %] [% L.input_tag('cv.user_password', SELF.cv.user_password, size = 45) %]
[%- IF ( SELF.is_vendor() ) %] [%- ELSE %] [%- END %] [% IF ( SELF.all_currencies.size ) %] [% END %] [% IF ( !conf_vertreter ) %] [% END %] [% IF ( SELF.is_customer() ) %] [% END %] [% IF ( SELF.is_customer() && !conf_vertreter ) %] [%- END %]
[% 'Credit Limit' | $T8 %] [% L.input_tag('cv.creditlimit_as_number', SELF.cv.creditlimit_as_number, size = 9) %] [% 'Payment Terms' | $T8 %] [% L.select_tag('cv.payment_id', SELF.all_payment_terms, value_key = 'id', title_key = 'description', default = SELF.cv.payment_id, with_empty = 1) %] [% 'Discount' | $T8 %] [% L.input_tag('cv.discount_as_percent', SELF.cv.discount_as_percent, size = 4) %]
[% 'Tax Number / SSN' | $T8 %] [% L.input_tag('cv.taxnumber', SELF.cv.taxnumber, size = 20) %] [% 'sales tax identification number' | $T8 %] [% L.input_tag('cv.ustid', SELF.cv.ustid, maxlength = 14 size = 20 ) %] [% 'Customer Number' | $T8 %] [% L.input_tag('cv.v_customer_id', SELF.cv.v_customer_id, size = 10) %] [% 'our vendor number at customer' | $T8 %] [% L.input_tag('cv.c_vendor_id', SELF.cv.c_vendor_id, size = 10) %]
[% 'Account Number' | $T8 %] [% L.input_tag('cv.account_number', SELF.cv.account_number, size = 10, maxlength = 100) %] [% 'Bank Code Number' | $T8 %] [% L.input_tag('cv.bank_code', SELF.cv.bank_code, size = 10, maxlength = 100) %] [% 'Bank' | $T8 %] [% L.input_tag('cv.bank', SELF.cv.bank, size = 20) %]
[% 'IBAN' | $T8 %] [% L.input_tag('cv.iban', SELF.cv.iban, size = 10, maxlength = 100) %] [% 'BIC' | $T8 %] [% L.input_tag('cv.bic', SELF.cv.bic, size = 10, maxlength = 100) %] [% 'Currency' | $T8 %] [% L.select_tag('cv.curr', SELF.all_currencies, default = SELF.cv.curr, with_empty = 1) %]
[% IF ( SELF.is_vendor() ) %] [% 'Type of Vendor' | $T8 %] [% ELSE %] [% 'Type of Customer' | $T8 %] [% END %] [% L.select_tag('cv.business_id', SELF.all_business, default = SELF.cv.business_id, value_key = 'id', title_key = 'description', with_empty = 1) %] [% 'Language' | $T8 %] [% L.select_tag('cv.language_id', SELF.all_languages, default = SELF.cv.language_id, value_key = 'id', title_key = 'description', with_empty = 1) %] [% 'Bcc' | $T8 %] [% L.input_tag('cv.bcc', SELF.cv.bcc, size = 40) %] [% 'Preisklasse' | $T8 %] [% L.select_tag('cv.klass', SELF.all_pricegroups, default = SELF.cv.klass, value_key = 'id', title_key = 'pricegroup', with_empty = 1) %]
[% L.checkbox_tag('cv.obsolete', checked = SELF.cv.obsolete) %] [% L.checkbox_tag('cv.direct_debit', checked = SELF.cv.direct_debit) %]
[% 'Steuersatz' | $T8 %] [% L.select_tag('cv.taxzone_id', SELF.all_taxzones, default = SELF.cv.taxzone_id, value_key = 'id', title_key = 'description') %] [% 'Salesman' | $T8 %] [% L.select_tag('cv.salesman_id', SELF.all_employees, default = salesman_id, value_key = 'id', title_key = 'safe_name', with_empty = 1) %] [% 'taxincluded checked' | $T8 %] [% L.select_tag('cv.taxincluded_checked', [[undef, LxERP.t8('use user config')], ['1', LxERP.t8('Yes')], ['0', LxERP.t8('No')]], default = SELF.cv.taxincluded_checked) %]
[% 'Internal Notes' | $T8 %]
[% L.textarea_tag('cv.notes', SELF.cv.notes, rows = 3 cols = 60 wrap = soft) %]
[% 'Shipping Address' | $T8 %] [% L.select_tag( 'shipto.shipto_id', SELF.shiptos, default = SELF.shipto.shipto_id, value_key = 'shipto_id', title_key = 'displayable_id', with_empty = 1, empty_title = LxERP.t8('New shipto'), onchange = "namespace('kivi.CustomerVendor').selectShipto();" ) %]
[% 'Name' | $T8 %] [% L.input_tag('shipto.shiptoname', SELF.shipto.shiptoname, size = 35, maxlength = 75) %]
[% 'Abteilung' | $T8 %] [% L.input_tag('shipto.shiptodepartment_1', SELF.shipto.shiptodepartment_1, size = 16, maxlength = 75) %] [% L.input_tag('shipto.shiptodepartment_2', SELF.shipto.shiptodepartment_2, size = 16, maxlength = 75) %]
[% 'Street' | $T8 %] [% L.input_tag('shipto.shiptostreet', SELF.shipto.shiptostreet, size = 35, maxlength = 75) %] [% 'Map' | $T8 %]
[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %] [% L.input_tag('shipto.shiptozipcode', SELF.shipto.shiptostreet, size = 5, maxlength = 75) %] [% L.input_tag('shipto.shiptocity', SELF.shipto.shiptocity, size = 30, maxlength = 75) %]
[% 'Country' | $T8 %] [% L.input_tag('shipto.shiptocountry', SELF.shipto.shiptocountry, size = 35, maxlength = 75) %]
[% 'Contact' | $T8 %] [% L.input_tag('shipto.shiptocontact', SELF.shipto.shiptocontact, size = 30, maxlength = 75) %]
[% 'Phone' | $T8 %] [% L.input_tag('shipto.shiptophone', SELF.shipto.shiptophone, size = 30, maxlength = 30) %]
[% 'Fax' | $T8 %] [% L.input_tag('shipto.shiptofax', SELF.shipto.shiptofax, size = 30, maxlength = 30) %]
[% 'E-mail' | $T8 %] [% L.input_tag('shipto.shiptoemail', SELF.shipto.shiptoemail, size = 45) %]
[% L.button_tag('submitInputButton(this);', LxERP.t8('Delete Shipto'), name = 'action_delete_shipto', class = 'submit') %] [% IF ( !SELF.shipto.shipto_id ) %] [% END %]
[% contact_cvars = SELF.contact.cvars_by_config %] [% IF ( contact_cvars.size ) %] [% FOREACH var = contact_cvars %] [% END %] [% END %]
[% 'Contacts' | $T8 %] [% L.select_tag( 'contact.cp_id', SELF.contacts, default = SELF.contact.cp_id, with_empty = 1, empty_title = LxERP.t8('New contact'), value_key = 'cp_id', title_key = 'full_name', onchange = "namespace('kivi.CustomerVendor').selectContact();") %]
[% 'Gender' | $T8 %] [% L.select_tag( 'contact.cp_gender', [['m', LxERP.t8('male')], ['f', LxERP.t8('female')]], default = SELF.contact.cp_gender ) %]
[% 'Title' | $T8 %] [% L.input_tag('contact.cp_title', SELF.contact.cp_title, size = 40 maxlength = 75) %] [% L.select_tag('contact_cp_title_select', SELF.all_titles, with_empty = 1, onchange = '$("#contact_cp_title").val(this.value);') %]
[% 'Department' | $T8 %] [% L.input_tag('contact.cp_abteilung', SELF.contact.cp_abteilung, size = 40) %] [% L.select_tag('contact_cp_abteilung_select', SELF.all_departments, default = SELF.contact.cp_abteilung, with_empty = 1, onchange = '$("#contact_cp_abteilung").val(this.value);') %]
[% 'Function/position' | $T8 %] [% L.input_tag('contact.cp_position', SELF.contact.cp_position, size = 40, maxlength = 75) %]
[% 'Given Name' | $T8 %] [% L.input_tag('contact.cp_givenname', SELF.contact.cp_givenname, size = 40, maxlength = 75) %]
[% 'Name' | $T8 %] [% L.input_tag('contact.cp_name', SELF.contact.cp_name, size = 40, maxlength = 75) %]
[% 'E-mail' | $T8 %] [% L.input_tag('contact.cp_email', SELF.contact.cp_email, size = 40) %]
[% 'Phone1' | $T8 %] [% L.input_tag('contact.cp_phone1', SELF.contact.cp_phone1, size = 40, maxlength = 75) %]
[% 'Phone2' | $T8 %] [% L.input_tag('contact.cp_phone2', SELF.contact.cp_phone2, size = 40, maxlength = 75) %]
[% 'Fax' | $T8 %] [% L.input_tag('contact.cp_fax', SELF.contact.cp_fax, size = 40) %]
[% 'Mobile1' | $T8 %] [% L.input_tag('contact.cp_mobile1', SELF.contact.cp_mobile1, size = 40) %]
[% 'Mobile2' | $T8 %] [% L.input_tag('contact.cp_mobile2', SELF.contact.cp_mobile2, size = 40) %]
[% 'Sat. Phone' | $T8 %] [% L.input_tag('contact.cp_satphone', SELF.contact.cp_satphone, size = 40) %]
[% 'Sat. Fax' | $T8 %] [% L.input_tag('contact.cp_satfax', SELF.contact.cp_satfax, size = 40) %]
[% 'Project' | $T8 %] [% L.input_tag('contact.cp_project', SELF.contact.cp_project, size = 40) %]
[% 'Street' | $T8 %] [% L.input_tag('contact.cp_street', SELF.contact.cp_street, size = 40, maxlength = 75) %] [% 'Map' | $T8 %]
[% 'Zip, City' | $T8 %] [% L.input_tag('contact.cp_zipcode', SELF.contact.cp_zipcode, size = 5, maxlength = 10) %] [% L.input_tag('contact.cp_city', SELF.contact.cp_city, size = 25, maxlength = 75) %]
[% 'Private Phone' | $T8 %] [% L.input_tag('contact.cp_privatphone', SELF.contact.cp_privatphone, size = 40) %]
[% 'Private E-mail' | $T8 %] [% L.input_tag('contact.cp_privatemail', SELF.contact.cp_privatemail, size = 40) %]
[% 'Birthday' | $T8 %] [% L.date_tag('contact.cp_birthday', SELF.contact.cp_birthday) %]

[% var.config.description | html %] [% INCLUDE 'customer_vendor/render_cvar_input.html' cvar_name_prefix = 'contact_cvars.' %]
[% L.button_tag('submitInputButton(this);', LxERP.t8('Delete Contact'), name = 'action_delete_contact', class = 'submit') %] [% IF ( !SELF.contact.cp_id ) %] [% END %]
[% 'Shipping Address' | $T8 %] [% temp = [{shipto_id = 'all', displayable_id = LxERP.t8('All')}] %] [% temp = temp.merge(SELF.shiptos) %] [% L.select_tag( 'delivery_id', temp, value_key = 'shipto_id', title_key = 'displayable_id', with_empty = 1, onchange = "namespace('kivi.CustomerVendor').selectDelivery();" ) %]
[% 'From' | $T8 %] [% L.date_tag( 'delivery_from', FORM.delivery_from, onchange => "namespace('kivi.CustomerVendor').selectDelivery(this.form.delivery_from.value, this.form.delivery_to.value);" ) %] [% 'To (time)' | $T8 %] [% L.date_tag( 'delivery_to', FORM.delivery_to, onchange => "namespace('kivi.CustomerVendor').selectDelivery(this.form.delivery_from.value, this.form.delivery_to.value);" ) %]
[% IF ( NOTES && NOTES.size ) %]

[%- FOREACH row = SELF.notes %] [% END %]
[% 'Delete' | $T8 %] [% 'Subject' | $T8 %] [% 'Created on' | $T8 %] [% 'Created by' | $T8 %] [% 'Follow-Up Date' | $T8 %] [% 'Follow-Up for' | $T8 %] [% 'Follow-Up done' | $T8 %]
[% L.hidden_tag('notes[+].id', row.id) %] [% IF ( !NOTE_id || (NOTE_id != row.id) ) %] [% L.checkbox_tag('notes[].delete', 0) %] [% END %] [% HTML.escape(row.subject) %] [% HTML.escape(row.created_on) %] [% IF ( row.created_by_name ) %] [% HTML.escape(row.created_by_name) %] [% ELSE %] [% HTML.escape(row.created_by_login) %] [% END %] [% HTML.escape(row.follow_up_date) %] [% IF ( row.created_for_name ) %] [% HTML.escape(row.created_for_name) %] [% ELSE %] [% HTML.escape(row.created_for_login) %] [% END %] [% IF ( row.follow_up_date ) %] [% IF ( row.follow_up_done ) %] [% 'Yes' | $T8 %] [% ELSE %] [% 'No' | $T8 %] [% END %] [% END %]

[% END %]
[% IF ( NOTE_id ) %] [% 'Edit note' | $T8 %] [% ELSE %] [% 'Add note' | $T8 %] [% END %]
[% L.hidden_tag('note.id', SELF.note.id) %]

[% 'Subject' | $T8 %] [% L.input_tag('note.subject', SELF.note.subject, size = 50) %]
[% 'Body' | $T8 %] [% L.textarea_tag('note.body', SELF.note.body, cols = 50 rows = 10) %]
[% 'Follow-Up On' | $T8 %] [% L.date_tag('note_followup.follow_up_date', SELF.note_followup.follow_up_date) %] [% 'for' | $T8 %] [% L.select_tag( 'note_followup.created_for_user', SELF.all_employees, default = SELF.note_followup.created_for_user, title_key = 'safe_name' ) %]
  [% L.checkbox_tag('note_followup.done', checked = SELF.note_followup.done) %]

[% IF ( cv_cvars.size ) %]

[% FOREACH var = cv_cvars %] [% END %]
[% var.config.description | html %] [% INCLUDE 'customer_vendor/render_cvar_input.html' cvar_name_prefix = 'cv_cvars.' %]

[% END %]

[% L.hidden_tag('action', 'CustomerVendor/dispatch') %] [% L.submit_tag('action_save', LxERP.t8('Save'), onclick = "return check_taxzone_and_ustid()", accesskey = "s") %] [% L.submit_tag('action_save_and_close', LxERP.t8('Save and Close'), onclick = "return check_taxzone_and_ustid()") %] [%- IF ( SELF.is_vendor ) %] [% L.submit_tag('action_save_and_ap_transaction', LxERP.t8('Save and AP Transaction'), onclick = "return check_taxzone_and_ustid()") %] [%- ELSE %] [% L.submit_tag('action_save_and_ar_transaction', LxERP.t8('Save and AR Transaction'), onclick = "return check_taxzone_and_ustid()") %] [%- END %] [% L.submit_tag('action_save_and_invoice', LxERP.t8('Save and Invoice'), onclick = "return check_taxzone_and_ustid()") %] [% L.submit_tag('action_save_and_order', LxERP.t8('Save and Order'), onclick = "return check_taxzone_and_ustid()") %] [%- IF ( SELF.is_vendor ) %] [% L.submit_tag('action_save_and_rfq', LxERP.t8('Save and RFQ'), onclick = "return check_taxzone_and_ustid()") %] [%- ELSE %] [% L.submit_tag('action_save_and_quotation', LxERP.t8('Save and Quotation'), onclick = "return check_taxzone_and_ustid()") %] [%- END %] [%- IF ( SELF.cv.id && SELF.is_orphaned ) %] [% L.submit_tag('action_delete', LxERP.t8('Delete'), confirm => LxERP.t8('Do you really want to delete this object?')) %] [%- END %] [%- IF ( SELF.cv.id ) %] [%- END %]