2 [% USE HTML %][% USE LxERP %]
4 [% L.javascript_tag('jquery') %]
7 <div class="listtop">[% title %]</div>
9 <form method="post" name="ct" action="ct.pl" >
11 <ul id="maintab" class="shadetabs">
12 <li class="selected"><a href="#" rel="billing">[% 'Billing Address' | $T8 %]</a></li>
13 <li><a href="#" rel="shipto">[% 'Shipping Address' | $T8 %]</a></li>
14 <li><a href="#" rel="contacts">[% 'Contacts' | $T8 %]</a></li>
16 <li><a href="#" rel="deliveries">[% 'Supplies' | $T8 %]</a></li>
18 <li><a href="#" rel="vcnotes">[% 'Notes' | $T8 %]</a></li>
19 [%- IF CUSTOM_VARIABLES.size %]
20 <li><a href="#" rel="custom_variables">[% 'Custom Variables' | $T8 %]</a></li>
24 <div class="tabcontentstyle">
26 <div id="billing" class="tabcontent">
30 [% IF conf_vertreter %]
32 <th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][%- ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
34 [%- INCLUDE generic/multibox.html
39 label_key = 'description',
45 <th align="right">[% 'Representative' | $T8 %]</th>
47 <input type="hidden" name="salesman_id" value="[%- HTML.escape(salesman_id) %]"%>
48 [%- HTML.escape(salesman) %]
55 [% 'Representative' | $T8 %]
57 [% 'Change representative to' | $T8 %]
61 [%- INCLUDE generic/multibox.html
62 name = 'new_salesman_id',
63 DATA = ALL_SALESMAN_CUSTOMERS,
73 <th align="right" nowrap>[% 'Customer Number' | $T8 %]</th>
74 <td><input name="customernumber" size="35" value="[% HTML.escape(customernumber) %]"></td>
76 <th align="right" nowrap>[% 'Vendor Number' | $T8 %]</th>
77 <td><input name="vendornumber" size="35" value="[% HTML.escape(vendornumber) %]"></td>
82 <th align="right" nowrap>[% 'Greeting' | $T8 %]</th>
84 <input id="greeting" name="greeting" size="30" value="[% HTML.escape(greeting) %]">
85 [%- INCLUDE generic/multibox.html
86 name = 'selected_company_greeting',
87 DATA = MB_COMPANY_GREETINGS,
90 label_key = 'description',
96 <th align="right" nowrap>[% IF is_customer %][% 'Customer Name' | $T8 %][%- ELSE %][% 'Vendor Name' | $T8 %][%- END %]</th>
97 <td><input name="name" size="35" maxlength="75" value="[% HTML.escape(name) %]"></td>
101 <th align="right" nowrap>[% 'Department' | $T8 %]</th>
103 <input name="department_1" size="16" maxlength="75" value="[% HTML.escape(department_1) %]">
104 <input name="department_2" size="16" maxlength="75" value="[% HTML.escape(department_2) %]">
109 <th align="right" nowrap>[% 'Street' | $T8 %]</th>
110 <td><input name="street" size="35" maxlength="75" value="[% HTML.escape(street) %]"></td>
114 <th align="right" nowrap>[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %]</th>
116 <input name="zipcode" size="5" maxlength="10" value="[% HTML.escape(zipcode) %]">
117 <input name="city" size="30" maxlength="75" value="[% HTML.escape(city) %]">
122 <th align="right" nowrap>[% 'Country' | $T8 %]</th>
123 <td><input name="country" size="35" maxlength="75" value="[% HTML.escape(country) %]"></td>
127 <th align="right" nowrap>[% 'Contact' | $T8 %]</th>
128 <td><input name="contact" size="28" maxlength="75" value="[% HTML.escape(contact) %]"></td>
132 <th align="right" nowrap>[% 'Phone' | $T8 %]</th>
133 <td><input name="phone" size="30" maxlength="30" value="[% HTML.escape(phone) %]"></td>
137 <th align="right" nowrap>[% 'Fax' | $T8 %]</th>
138 <td><input name="fax" size="30" maxlength="30" value="[% HTML.escape(fax) %]"></td>
142 <th align="right" nowrap>[% 'E-mail' | $T8 %]</th>
143 <td><input name="email" size="45" value="[% HTML.escape(email) %]"></td>
147 <th align="right" nowrap>
148 [% IF homepage %]<a href="[% HTML.escape(homepage) %]" title="[% 'Open this Website' | $T8 %]" target="_blank">[% 'Homepage' | $T8 %]</a>
149 [% ELSE %][% 'Homepage' | $T8 %]
152 <td><input name="homepage" size="45" title="[% 'Example: http://lx-office.org' | $T8 %]" value="[% HTML.escape(homepage) %]"></td>
156 <th align="right" nowrap>[% 'Username' | $T8 %]</th>
157 <td><input name="username" size="45" value="[% HTML.escape(username) %]"></td>
161 <th align="right" nowrap>[% 'Password' | $T8 %]</th>
162 <td><input name="user_password" size="45" value="[% HTML.escape(user_password) %]"></td>
168 <th align="right">[% 'Credit Limit' | $T8 %]</th>
169 <td><input name="creditlimit" size="9" value="[% LxERP.format_amount(creditlimit, 0) %]"></td>
170 <input type="hidden" name="terms" value="[% HTML.escape(terms) %]">
171 <th align="right">[% 'Payment Terms' | $T8 %]</th>
173 [%- INCLUDE generic/multibox.html
175 DATA = payment_terms,
178 label_key = 'description',
182 <th align="right">[% 'Discount' | $T8 %]</th>
183 <td><input name="discount" size="4" value="[% LxERP.format_amount(discount) %]"> %</td>
187 <th align="right">[% 'Tax Number / SSN' | $T8 %]</th>
188 <td><input name="taxnumber" size="20" value="[% HTML.escape(taxnumber) %]"></td>
189 <!-- 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 -->
190 <th align="right">[% 'sales tax identification number' | $T8 %]</th>
191 <td><input name="ustid" id="ustid" maxlength="14" size="20" value="[% HTML.escape(ustid) %]"></td>
192 [%- IF is_customer %]
193 <th align="right">[% 'our vendor number at customer' | $T8 %]</th>
194 <td><input name="c_vendor_id" size="10" value="[% HTML.escape(c_vendor_id) %]"></td>
196 <th align="right">[% 'Customer Number' | $T8 %]</th>
197 <td><input name="v_customer_id" size="10" value="[% HTML.escape(v_customer_id) %]"></td>
202 <th align="right">[% 'Account Number' | $T8 %]</th>
203 <td><input name="account_number" size="10" maxlength="100" value="[% HTML.escape(account_number) %]"></td>
204 <th align="right">[% 'Bank Code Number' | $T8 %]</th>
205 <td><input name="bank_code" size="10" maxlength="100" value="[% HTML.escape(bank_code) %]"></td>
206 <th align="right">[% 'Bank' | $T8 %]</th>
207 <td><input name="bank" size="20" value="[% HTML.escape(bank) %]"></td>
211 <th align="right">[% 'IBAN' | $T8 %]</th>
212 <td><input name="iban" size="10" maxlength="100" value="[% HTML.escape(iban) %]"></td>
213 <th align="right">[% 'BIC' | $T8 %]</th>
214 <td><input name="bic" size="10" maxlength="100" value="[% HTML.escape(bic) %]"></td>
218 [% UNLESS conf_vertreter %]
219 <th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][% ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
221 [%- INCLUDE generic/multibox.html
226 label_key = 'description',
230 <th align="right">[% 'Language' | $T8 %]</th>
232 [%- INCLUDE generic/multibox.html
233 name = 'language_id',
237 label_key = 'description',
241 [%- IF is_customer %]
242 <th align="right">[% 'Preisklasse' | $T8 %]</th>
244 [%- INCLUDE generic/multibox.html
246 DATA = all_pricegroup,
249 label_key = 'pricegroup',
256 <td align="right">[% 'Obsolete' | $T8 %]</td>
257 <td><input name="obsolete" class="checkbox" type="checkbox" value="1" [% IF obsolete %]checked[% END %]></td>
258 <td align="right">[% 'direct debit' | $T8 %]</td>
259 <td><input name="direct_debit" class="checkbox" type="checkbox" value="1" [% IF direct_debit %]checked[% END %]></td>
263 <th align="right">[% 'Steuersatz' | $T8 %]</th>
265 [%- INCLUDE generic/multibox.html
271 label_key = 'description',
274 [%- IF is_customer && !conf_vertreter %]
275 <th align="right">[% 'Salesman' | $T8 %]</th>
277 [%- INCLUDE generic/multibox.html
278 name = 'salesman_id',
282 label_sub = 'salesman_label',
291 <th align="left" nowrap>[% 'Internal Notes' | $T8 %]</th>
295 <td><textarea name="notes" rows="3" cols="60" wrap="soft">[% HTML.escape(notes) %]</textarea></td>
299 <br style="clear: left" />
302 <div id="shipto" class="tabcontent">
303 [% INCLUDE 'ct/_shipto.html' %]
305 <input type="submit" id="delete_shipto" name="action" value="[% 'Delete Shipto' | $T8 %]" disabled>
306 <br style="clear: left" />
309 <div id="contacts" class="tabcontent">
311 <input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]">
313 <th align="left">[% 'Contacts' | $T8 %]</th>
315 [%- INCLUDE generic/multibox.html
319 onChange = "on_contact_changed()",
321 label_sub = 'contacts_label',
327 <th align="left" nowrap>[% 'Gender' | $T8 %]</th>
329 <select id="cp_gender" name="cp_gender">
330 <option value="m"[% IF cp_gender == 'm' %] selected[% END %]>[% 'male' | $T8 %]</option>
331 <option value="f"[% IF cp_gender == 'f' %] selected[% END %]>[% 'female' | $T8 %]</option>
338 <th align="left" nowrap>[% 'Title' | $T8 %]</th>
340 <input id="cp_title" name="cp_title" size="40" maxlength="75" value="[% HTML.escape(cp_title) %]">
341 [%- INCLUDE generic/multibox.html
342 name = 'selected_cp_title',
343 id = 'selected_cp_title',
347 label_key = 'description',
353 <th align="left" nowrap>[% 'Department' | $T8 %]</th>
355 <input id="cp_abteilung" name="cp_abteilung" size="40" value="[% HTML.escape(cp_abteilung) %]">
356 [%- INCLUDE generic/multibox.html
357 name = 'selected_cp_abteilung',
358 id = 'selected_cp_abteilung',
359 DATA = MB_DEPARTMENT,
362 label_key = 'description',
368 <th align="left" nowrap>[% 'Given Name' | $T8 %]</th>
369 <td><input id="cp_givenname" name="cp_givenname" size="40" maxlength="75" value="[% HTML.escape(cp_givenname) %]"></td>
373 <th align="left" nowrap>[% 'Name' | $T8 %]</th>
374 <td><input id="cp_name" name="cp_name" size="40" maxlength="75" value="[% HTML.escape(cp_name) %]"></td>
378 <th align="left" nowrap>[% 'Phone1' | $T8 %]</th>
379 <td><input id="cp_phone1" name="cp_phone1" size="40" maxlength="75" value="[% HTML.escape(cp_phone1) %]"></td>
383 <th align="left" nowrap>[% 'Phone2' | $T8 %]</th>
384 <td><input id="cp_phone2" name="cp_phone2" size="40" maxlength="75" value="[% HTML.escape(cp_phone2) %]"></td>
388 <th align="left" nowrap>[% 'Fax' | $T8 %]</th>
389 <td><input id="cp_fax" name="cp_fax" size="40" value="[% HTML.escape(cp_fax) %]"></td>
393 <th align="left" nowrap>[% 'Mobile1' | $T8 %]</th>
394 <td><input id="cp_mobile1" name="cp_mobile1" size="40" value="[% HTML.escape(cp_mobile1) %]"></td>
398 <th align="left" nowrap>[% 'Mobile2' | $T8 %]</th>
399 <td><input id="cp_mobile2" name="cp_mobile2" size="40" value="[% HTML.escape(cp_mobile2) %]"></td>
403 <th align="left" nowrap>[% 'Sat. Phone' | $T8 %]</th>
404 <td><input id="cp_satphone" name="cp_satphone" size="40" value="[% HTML.escape(cp_satphone) %]"></td>
408 <th align="left" nowrap>[% 'Sat. Fax' | $T8 %]</th>
409 <td><input id="cp_satfax" name="cp_satfax" size="40" value="[% HTML.escape(cp_satfax) %]"></td>
413 <th align="left" nowrap>[% 'Project' | $T8 %]</th>
414 <td><input id="cp_project" name="cp_project" size="40" value="[% HTML.escape(cp_project) %]"></td>
418 <th align="left" nowrap>[% 'E-mail' | $T8 %]</th>
419 <td><input id="cp_email" name="cp_email" size="40" value="[% HTML.escape(cp_email) %]"></td>
423 <th align="left" nowrap>[% 'Private Phone' | $T8 %]</th>
424 <td><input id="cp_privatphone" name="cp_privatphone" size="40" value="[% HTML.escape(cp_privatphone) %]"></td>
428 <th align="left" nowrap>[% 'Private E-mail' | $T8 %]</th>
429 <td><input id="cp_privatemail" name="cp_privatemail" size="40" value="[% HTML.escape(cp_privatemail) %]"></td>
433 <th align="left" nowrap>[% 'Birthday' | $T8 %]</th>
434 <td><input id="cp_birthday" name="cp_birthday" size="40" value="[% HTML.escape(cp_birthday) %]"></td>
438 <td colspan="2"><hr></td>
442 <th align="left" nowrap>[% 'Bcc' | $T8 %]</th>
443 <td><input name="bcc" size="40" value="[% HTML.escape(bcc) %]"></td>
447 <input type="submit" id="delete_contact" name="action" value="[% 'Delete Contact' | $T8 %]" disabled>
448 <br style="clear: left" />
451 <div id="deliveries" class="tabcontent">
454 <th align="right">[% 'Shipping Address' | $T8 %]</th>
456 [%- INCLUDE generic/multibox.html
457 name = 'delivery_id',
460 onChange = "get_delivery(['shipto_id__' + this.value, 'from__' + from.value, 'to__' + to.value, 'id__' + cvid.value, 'db__' + db.value], ['delivery'])",
461 id_key = 'shipto_id',
462 label_sub = 'shipto_label',
469 <th align="right" nowrap>[% 'From' | $T8 %]</th>
471 <input id="from" name="from" size="10" maxlength="10" onChange="get_delivery(['shipto_id__' + delivery_id.value, 'from__' + this.value, 'to__' + to.value, 'id__' + cvid.value, 'db__' + db.value], ['delivery'])" value="[% HTML.escape(from) %]">
472 <input type="button" name="fromB" id="trigger_from" value="?">
474 <th align="right" nowrap>[% 'To (time)' | $T8 %]</th>
476 <input id="to" name="to" size="10" maxlength="10" onChange="get_delivery(['shipto_id__' + delivery_id.value, 'from__' + from.value, 'to__' + this.value, 'id__' + cvid.value, 'db__' + db.value], ['delivery'])" value="[% HTML.escape(to) %]">
477 <input type="button" name="toB" id="trigger_to" value="?">
489 <br style="clear: left" />
492 <div id="vcnotes" class="tabcontent">
494 [%- IF NOTES && NOTES.size %]
498 <th class="listheading">[% 'Delete' | $T8 %]</th>
499 <th class="listheading">[% 'Subject' | $T8 %]</th>
500 <th class="listheading">[% 'Created on' | $T8 %]</th>
501 <th class="listheading">[% 'Created by' | $T8 %]</th>
502 <th class="listheading">[% 'Follow-Up Date' | $T8 %]</th>
503 <th class="listheading">[% 'Follow-Up for' | $T8 %]</th>
504 <th class="listheading">[% 'Follow-Up done' | $T8 %]</th>
507 [%- FOREACH row = NOTES %]
508 <tr class="listrow[% loop.count % 2 %]">
509 <input type="hidden" name="NOTE_id_[% loop.count %]" value="[% HTML.escape(row.id) %]">
510 <td>[% UNLESS NOTE_id && (NOTE_id == row.id) %]<input type="checkbox" name="NOTE_delete_[% loop.count %]" value="1">[% END %]</td>
511 <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>
512 <td>[% HTML.escape(row.created_on) %]</td>
513 <td>[% IF row.created_by_name %][% HTML.escape(row.created_by_name) %][% ELSE %][% HTML.escape(row.created_by_login) %][% END %]</td>
514 <td>[% HTML.escape(row.follow_up_date) %]</td>
515 <td>[% IF row.created_for_name %][% HTML.escape(row.created_for_name) %][% ELSE %][% HTML.escape(row.created_for_login) %][% END %]</td>
516 <td>[% IF row.follow_up_date %][% IF row.follow_up_done %][% 'Yes' | $T8 %][% ELSE %][% 'No' | $T8 %][% END %][% END %]</td>
520 <input type="hidden" name="NOTES_rowcount" value="[% NOTES.size %]">
526 <div class="listtop">[% IF NOTE_id %][% 'Edit note' | $T8 %][% ELSE %][% 'Add note' | $T8 %][% END %]</div>
528 <input type="hidden" name="NOTE_id" value="[% HTML.escape(NOTE_id) %]">
529 <input type="hidden" name="FU_id" value="[% HTML.escape(FU_id) %]">
534 <td valign="right">[% 'Subject' | $T8 %]</td>
535 <td><input name="NOTE_subject" value="[% HTML.escape(NOTE_subject) %]" size="50"></td>
539 <td valign="right" align="top">[% 'Body' | $T8 %]</td>
540 <td align="top"><textarea cols="50" rows="10" name="NOTE_body">[% HTML.escape(NOTE_body) %]</textarea></td>
544 <td valign="right">[% 'Follow-Up On' | $T8 %]</td>
546 <input name="FU_date" id="FU_date" value="[% HTML.escape(FU_date) %]" size="12">
547 <input type="button" name="FU_date_button" id="FU_date_trigger" value="?">
549 <select name="FU_created_for_user">
550 [%- FOREACH row = ALL_EMPLOYEES %]
551 <option value="[% HTML.escape(row.id) %]"[% IF (NOTE_id && (row.id == FU_created_for_user)) || (row.login == login) %] selected[% END %]>
552 [%- IF row.name %][%- HTML.escape(row.name) %] ([% HTML.escape(row.login) %])[% ELSE %][% HTML.escape(row.login) %][% END %]
562 <input type="checkbox" name="FU_done" id="FU_done" value="1"[% IF FU_done %] checked[% END %]>
563 <label for="FU_done">[% 'Follow-Up done' | $T8 %]</label>
569 <br style="clear: left" />
572 [%- IF CUSTOM_VARIABLES.size %]
573 <div id="custom_variables" class="tabcontent">
577 [%- FOREACH var = CUSTOM_VARIABLES %]
579 <td align="right" valign="top">[% HTML.escape(var.description) %]</td>
580 <td valign="top">[% var.HTML_CODE %]</td>
586 <br style="clear: left" />
592 <script type="text/javascript">
594 function set_gender(gender) {
595 var s = document.getElementById('cp_gender');
597 s.selectedIndex = (gender == 'f') ? 1 : 0;
601 function on_contact_changed() {
602 get_contact(['cp_id__' + $('#cp_id').attr('value')],
603 ['cp_name','cp_title','cp_givenname','cp_phone1','cp_phone2','cp_email','cp_abteilung','cp_fax','cp_mobile1','cp_mobile2',
604 'cp_satphone','cp_satfax','cp_project','cp_privatphone','cp_privatemail','cp_birthday',enable_delete_contact,set_gender]);
605 $('#selected_cp_title').attr('selectedIndex', 0);
606 $('#selected_cp_abteilung').attr('selectedIndex', 0);