2 [% USE HTML %][% USE LxERP %]
7 [% PROCESS 'common/flash.html' %]
9 <form method="post" name="ct" action="ct.pl" >
11 <div class="tabwidget">
13 <li><a href="#billing">[% 'Billing Address' | $T8 %]</a></li>
14 <li><a href="#shipto">[% 'Shipping Address' | $T8 %]</a></li>
15 <li><a href="#contacts">[% 'Contacts' | $T8 %]</a></li>
17 <li><a href="#deliveries">[% 'Supplies' | $T8 %]</a></li>
19 <li><a href="#vcnotes">[% 'Notes' | $T8 %]</a></li>
20 [%- IF CUSTOM_VARIABLES.CT.size %]
21 <li><a href="#custom_variables">[% 'Custom Variables' | $T8 %]</a></li>
29 [% IF conf_vertreter %]
31 <th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][%- ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
33 [%- INCLUDE generic/multibox.html
38 label_key = 'description',
44 <th align="right">[% 'Representative' | $T8 %]</th>
46 <input type="hidden" name="salesman_id" value="[%- HTML.escape(salesman_id) %]"%>
47 [%- HTML.escape(salesman) %]
54 [% 'Representative' | $T8 %]
56 [% 'Change representative to' | $T8 %]
60 [%- INCLUDE generic/multibox.html
61 name = 'new_salesman_id',
62 DATA = ALL_SALESMAN_CUSTOMERS,
72 <th align="right" nowrap>[% 'Customer Number' | $T8 %]</th>
73 <td><input name="customernumber" size="35" value="[% HTML.escape(customernumber) %]"></td>
75 <th align="right" nowrap>[% 'Vendor Number' | $T8 %]</th>
76 <td><input name="vendornumber" size="35" value="[% HTML.escape(vendornumber) %]"></td>
81 <th align="right" nowrap>[% 'Greeting' | $T8 %]</th>
83 <input id="greeting" name="greeting" size="30" value="[% HTML.escape(greeting) %]">
84 [%- INCLUDE generic/multibox.html
85 name = 'selected_company_greeting',
86 DATA = MB_COMPANY_GREETINGS,
89 label_key = 'description',
95 <th align="right" nowrap>[% IF is_customer %][% 'Customer Name' | $T8 %][%- ELSE %][% 'Vendor Name' | $T8 %][%- END %]</th>
96 <td><input name="name" size="35" maxlength="75" value="[% HTML.escape(name) %]"></td>
100 <th align="right" nowrap>[% 'Department' | $T8 %]</th>
102 <input name="department_1" size="16" maxlength="75" value="[% HTML.escape(department_1) %]">
103 <input name="department_2" size="16" maxlength="75" value="[% HTML.escape(department_2) %]">
108 <th align="right" nowrap>[% 'Street' | $T8 %]</th>
110 <input name="street" size="35" maxlength="75" value="[% HTML.escape(street) %]">
113 onclick="window.open('https://maps.google.com/maps?q='+ encodeURIComponent($('#billing input[name=street]').val() +', '+ $('#billing input[name=zipcode]').val() +' '+ $('#billing input[name=city]').val() +', '+ $('#billing input[name=country]').val()), '_blank'); window.focus();"
114 title="[% 'Map' | $T8 %]"
116 <img src="image/map.png" alt="[% 'Map' | $T8 %]" />
122 <th align="right" nowrap>[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %]</th>
124 <input name="zipcode" size="5" maxlength="10" value="[% HTML.escape(zipcode) %]">
125 <input name="city" size="30" maxlength="75" value="[% HTML.escape(city) %]">
130 <th align="right" nowrap>[% 'Country' | $T8 %]</th>
131 <td><input name="country" size="35" maxlength="75" value="[% HTML.escape(country) %]"></td>
135 <th align="right" nowrap>[% 'Contact' | $T8 %]</th>
136 <td><input name="contact" size="28" maxlength="75" value="[% HTML.escape(contact) %]"></td>
140 <th align="right" nowrap>[% 'Phone' | $T8 %]</th>
141 <td><input name="phone" size="30" value="[% HTML.escape(phone) %]"></td>
145 <th align="right" nowrap>[% 'Fax' | $T8 %]</th>
146 <td><input name="fax" size="30" maxlength="30" value="[% HTML.escape(fax) %]"></td>
150 <th align="right" nowrap>[% 'E-mail' | $T8 %]</th>
151 <td><input name="email" size="45" value="[% HTML.escape(email) %]"></td>
155 <th align="right" nowrap>[% 'Cc E-mail' | $T8 %]</th>
156 <td><input name="cc" size="45" value="[% HTML.escape(cc) %]"></td>
160 <th align="right" nowrap>[% 'Bcc E-mail' | $T8 %]</th>
161 <td><input name="bcc" size="45" value="[% HTML.escape(bcc) %]"></td>
166 <th align="right" nowrap>
167 [% IF homepage %]<a href="[% HTML.escape(homepage) %]" title="[% 'Open this Website' | $T8 %]" target="_blank">[% 'Homepage' | $T8 %]</a>
168 [% ELSE %][% 'Homepage' | $T8 %]
171 <td><input name="homepage" size="45" title="[% 'Example: http://kivitendo.de' | $T8 %]" value="[% HTML.escape(homepage) %]"></td>
175 <th align="right" nowrap>[% 'Username' | $T8 %]</th>
176 <td><input name="username" size="45" value="[% HTML.escape(username) %]"></td>
180 <th align="right" nowrap>[% 'Password' | $T8 %]</th>
181 <td><input name="user_password" size="45" value="[% HTML.escape(user_password) %]"></td>
187 <th align="right">[% 'Credit Limit' | $T8 %]</th>
188 <td><input name="creditlimit" size="9" value="[% LxERP.format_amount(creditlimit, 0) %]"></td>
189 <input type="hidden" name="terms" value="[% HTML.escape(terms) %]">
190 <th align="right">[% 'Payment Terms' | $T8 %]</th>
192 [%- INCLUDE generic/multibox.html
194 DATA = payment_terms,
197 label_key = 'description',
201 <th align="right">[% 'Discount' | $T8 %]</th>
202 <td><input name="discount" size="4" value="[% LxERP.format_amount(discount) %]"> %</td>
206 <th align="right">[% 'Tax Number / SSN' | $T8 %]</th>
207 <td><input name="taxnumber" size="20" value="[% HTML.escape(taxnumber) %]"></td>
208 <!-- Anm.: R&B 15.11.2008 VAT Reg No ist Ust-ID in GB, aber generell sollte es laut Richardson die sales tax id sein -->
209 <th align="right">[% 'sales tax identification number' | $T8 %]</th>
210 <td>[% L.input_tag('ustid', ustid, maxlength=14, size=30) %]</td>
211 [%- IF is_customer %]
212 <th align="right">[% 'our vendor number at customer' | $T8 %]</th>
213 <td>[% L.input_tag('c_vendor_id', c_vendor_id, size=30) %]</td>
215 <th align="right">[% 'Customer Number' | $T8 %]</th>
216 <td>[% L.input_tag('v_customer_id', v_customer_id, size=30) %]</td>
221 <th align="right">[% 'Account Number' | $T8 %]</th>
222 <td>[% L.input_tag('account_number', account_number, size=30) %]</td>
223 <th align="right">[% 'Bank Code Number' | $T8 %]</th>
224 <td>[% L.input_tag('bank_code', bank_code, size=30) %]</td>
225 <th align="right">[% 'Bank' | $T8 %]</th>
226 <td>[% L.input_tag('bank', bank, size=30) %]</td>
230 <th align="right">[% 'IBAN' | $T8 %]</th>
231 <td>[% L.input_tag('iban', iban, maxlength=100, size=30) %]</td>
232 <th align="right">[% 'BIC' | $T8 %]</th>
233 <td>[% L.input_tag('bic', bic, maxlength=100, size=30) %]</td>
234 [%- IF ALL_CURRENCIES.size %]
235 <th align="right">[% 'Currency' | $T8 %]</th>
236 <td>[% L.select_tag('currency', ALL_CURRENCIES, default = currency, with_empty = 1) %]</td>
241 [% UNLESS conf_vertreter %]
242 <th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][% ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
244 [%- INCLUDE generic/multibox.html
249 label_key = 'description',
253 <th align="right">[% 'Language' | $T8 %]</th>
255 [%- INCLUDE generic/multibox.html
256 name = 'language_id',
257 default = default_language_id,
261 label_key = 'description',
265 [%- IF is_customer %]
266 <th align="right">[% 'Preisklasse' | $T8 %]</th>
268 [%- INCLUDE generic/multibox.html
270 DATA = all_pricegroup,
273 label_key = 'pricegroup',
280 <td align="right"><label for="obsolete">[% 'Obsolete' | $T8 %]</label></td>
281 <td><input name="obsolete" id="obsolete" class="checkbox" type="checkbox" value="1" [% IF obsolete %]checked[% END %]></td>
282 <td align="right"><label for="direct_debit">[% 'direct debit' | $T8 %]</label></td>
283 <td><input name="direct_debit" id="direct_debit" class="checkbox" type="checkbox" value="1" [% IF direct_debit %]checked[% END %]></td>
287 <th align="right">[% 'Steuersatz' | $T8 %]</th>
289 [%- INCLUDE generic/multibox.html
295 label_key = 'description',
298 [%- IF is_customer && !conf_vertreter %]
299 <th align="right">[% 'Salesman' | $T8 %]</th>
300 <td>[% L.select_tag('salesman_id', ALL_SALESMEN, default = salesman_id, with_empty = 1, title_key = 'safe_name') %]</td>
303 <td>[% 'taxincluded checked' | $T8 %]</td>
304 <td>[% L.select_tag('taxincluded_checked', [[undef, LxERP.t8('use user config')], ['1', LxERP.t8('Yes')], ['0', LxERP.t8('No')]], default = taxincluded_checked) %]</td>
310 <th align="left" nowrap>[% 'Internal Notes' | $T8 %]</th>
314 <td><textarea name="notes" rows="3" cols="60" wrap="soft">[% HTML.escape(notes) %]</textarea></td>
320 [% INCLUDE 'ct/_shipto.html' %]
324 [% INCLUDE 'ct/_contact.html' %]
327 <div id="deliveries">
330 <th align="right">[% 'Shipping Address' | $T8 %]</th>
332 [% L.select_tag('delivery_id', SHIPTO_ALL, value_key = 'shipto_id', title_sub = \shipto_label, with_empty = 1,
333 onchange = "\$('#delivery').load('ct.pl?action=get_delivery&id=' + \$('#cvid').val() + '&db=' + \$('#db').val() + '&shipto_id=' + this.value)") %]
338 <th align="right" nowrap>[% 'From' | $T8 %]</th>
340 [% L.date_tag('from',
342 onchange => "\$('#delivery').load('ct.pl?action=get_delivery&shipto_id='+ \$('#delivery_id').val() +'&from='+ \$('#from').val() +'&to='+ \$('#to').val() +'&id='+ \$('#cvid').val() +'&db='+ \$('#db').val())")
345 <th align="right" nowrap>[% 'To (time)' | $T8 %]</th>
349 onchange => "\$('#delivery').load('ct.pl?action=get_delivery&shipto_id='+ \$('#delivery_id').val() +'&from='+ \$('#from').val() +'&to='+ \$('#to').val() +'&id='+ \$('#cvid').val() +'&db='+ \$('#db').val())")
365 [%- IF NOTES && NOTES.size %]
369 <th class="listheading">[% 'Delete' | $T8 %]</th>
370 <th class="listheading">[% 'Subject' | $T8 %]</th>
371 <th class="listheading">[% 'Created on' | $T8 %]</th>
372 <th class="listheading">[% 'Created by' | $T8 %]</th>
373 <th class="listheading">[% 'Follow-Up Date' | $T8 %]</th>
374 <th class="listheading">[% 'Follow-Up for' | $T8 %]</th>
375 <th class="listheading">[% 'Follow-Up done' | $T8 %]</th>
378 [%- FOREACH row = NOTES %]
379 <tr class="listrow[% loop.count % 2 %]">
380 <input type="hidden" name="NOTE_id_[% loop.count %]" value="[% HTML.escape(row.id) %]">
381 <td>[% UNLESS NOTE_id && (NOTE_id == row.id) %]<input type="checkbox" name="NOTE_delete_[% loop.count %]" value="1">[% END %]</td>
382 <td><a href="ct.pl?action=edit&db=[% HTML.url(db) %]&id=[% HTML.url(id) %]&edit_note_id=[% HTML.url(row.id) %]">[% HTML.escape(row.subject) %]</a></td>
383 <td>[% HTML.escape(row.created_on) %]</td>
384 <td>[% IF row.created_by_name %][% HTML.escape(row.created_by_name) %][% ELSE %][% HTML.escape(row.created_by_login) %][% END %]</td>
385 <td>[% HTML.escape(row.follow_up_date) %]</td>
386 <td>[% IF row.created_for_name %][% HTML.escape(row.created_for_name) %][% ELSE %][% HTML.escape(row.created_for_login) %][% END %]</td>
387 <td>[% IF row.follow_up_date %][% IF row.follow_up_done %][% 'Yes' | $T8 %][% ELSE %][% 'No' | $T8 %][% END %][% END %]</td>
391 <input type="hidden" name="NOTES_rowcount" value="[% NOTES.size %]">
397 <div class="listtop">[% IF NOTE_id %][% 'Edit note' | $T8 %][% ELSE %][% 'Add note' | $T8 %][% END %]</div>
399 <input type="hidden" name="NOTE_id" value="[% HTML.escape(NOTE_id) %]">
400 <input type="hidden" name="FU_id" value="[% HTML.escape(FU_id) %]">
405 <td valign="right">[% 'Subject' | $T8 %]</td>
406 <td><input name="NOTE_subject" value="[% HTML.escape(NOTE_subject) %]" size="50"></td>
410 <td valign="right" align="top">[% 'Body' | $T8 %]</td>
411 <td align="top"><textarea cols="50" rows="10" name="NOTE_body">[% HTML.escape(NOTE_body) %]</textarea></td>
415 <td valign="right">[% 'Follow-Up On' | $T8 %]</td>
417 [% L.date_tag('FU_date', FU_date) %]
419 [% L.select_tag('FU_created_for_user', ALL_EMPLOYEES, default = (FU_created_for_user ? FU_created_for_user : USER.id), title_key='safe_name') %]
426 <input type="checkbox" name="FU_done" id="FU_done" value="1"[% IF FU_done %] checked[% END %]>
427 <label for="FU_done">[% 'Follow-Up done' | $T8 %]</label>
434 [%- IF CUSTOM_VARIABLES.CT.size %]
435 <div id="custom_variables">
439 [%- FOREACH var = CUSTOM_VARIABLES.CT %]
441 <td align="right" valign="top">[% HTML.escape(var.description) %]</td>
442 <td valign="top">[% var.HTML_CODE %]</td>
452 <script type="text/javascript">
454 function set_gender(gender) {
455 var s = document.getElementById('cp_gender');
457 s.selectedIndex = (gender == 'f') ? 1 : 0;