[%- USE T8 %]
[% USE HTML %][% USE LxERP %]
-<body onLoad="fokus()">
+[% USE L %]
- <div class="listtop">[% title %]</div>
+ <h1>[% title %]</h1>
- <form method="post" name="ct" action="ct.pl" onKeyUp="highlight(event)" onClick="highlight(event)">
+ [% PROCESS 'common/flash.html' %]
+
+ <form method="post" name="ct" action="ct.pl" >
<ul id="maintab" class="shadetabs">
<li class="selected"><a href="#" rel="billing">[% 'Billing Address' | $T8 %]</a></li>
<li><a href="#" rel="shipto">[% 'Shipping Address' | $T8 %]</a></li>
- <li><a href="#" rel="contacts">Ansprechpartner</a></li>
- <li><a href="#" rel="deliveries">[% 'Lieferungen' | $T8 %]</a></li>
+ <li><a href="#" rel="contacts">[% 'Contacts' | $T8 %]</a></li>
+[%- IF id %]
+ <li><a href="#" rel="deliveries">[% 'Supplies' | $T8 %]</a></li>
+[%- END %]
<li><a href="#" rel="vcnotes">[% 'Notes' | $T8 %]</a></li>
- [%- IF CUSTOM_VARIABLES.size %]
+ [%- IF CUSTOM_VARIABLES.CT.size %]
<li><a href="#" rel="custom_variables">[% 'Custom Variables' | $T8 %]</a></li>
[%- END %]
</ul>
<tr>
<th align="right" nowrap>[% 'Phone' | $T8 %]</th>
- <td><input name="phone" size="30" maxlength="30" value="[% HTML.escape(phone) %]"></td>
+ <td><input name="phone" size="30" value="[% HTML.escape(phone) %]"></td>
</tr>
<tr>
</tr>
<tr>
- <th align="right" nowrap>[% 'Homepage' | $T8 %]</th>
- <td><input name="homepage" size="45" value="[% HTML.escape(homepage) %]"></td>
+ <th align="right" nowrap>
+ [% IF homepage %]<a href="[% HTML.escape(homepage) %]" title="[% 'Open this Website' | $T8 %]" target="_blank">[% 'Homepage' | $T8 %]</a>
+ [% ELSE %][% 'Homepage' | $T8 %]
+ [% END %]
+ </th>
+ <td><input name="homepage" size="45" title="[% 'Example: http://kivitendo.de' | $T8 %]" value="[% HTML.escape(homepage) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>[% 'Username' | $T8 %]</th>
+ <td><input name="username" size="45" value="[% HTML.escape(username) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>[% 'Password' | $T8 %]</th>
+ <td><input name="user_password" size="45" value="[% HTML.escape(user_password) %]"></td>
</tr>
</table>
<td><input name="taxnumber" size="20" value="[% HTML.escape(taxnumber) %]"></td>
<!-- 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 -->
<th align="right">[% 'sales tax identification number' | $T8 %]</th>
- <td><input name="ustid" maxlength="14" size="20" value="[% HTML.escape(ustid) %]"></td>
+ <td><input name="ustid" id="ustid" maxlength="14" size="20" value="[% HTML.escape(ustid) %]"></td>
[%- IF is_customer %]
<th align="right">[% 'our vendor number at customer' | $T8 %]</th>
<td><input name="c_vendor_id" size="10" value="[% HTML.escape(c_vendor_id) %]"></td>
<td><input name="iban" size="10" maxlength="100" value="[% HTML.escape(iban) %]"></td>
<th align="right">[% 'BIC' | $T8 %]</th>
<td><input name="bic" size="10" maxlength="100" value="[% HTML.escape(bic) %]"></td>
+ [%- IF ALL_CURRENCIES.size %]
+ <th align="right">[% 'Currency' | $T8 %]</th>
+ <td>[% L.select_tag('currency', ALL_CURRENCIES, default = currency, with_empty = 1) %]</td>
+ [%- END %]
</tr>
- [%- IF conf_vertreter %]
- <tr>
- <th align="right">[% 'Username' | $T8 %]</th>
- <td><input name="username" maxlength="50" value="[% HTML.escape(username) %]"></td>
- <th align="right">[% 'Password' | $T8 %]</th>
- <td><input name="user_password" value="[% HTML.escape(user_password) %]"></td>
- </tr>
- [%- END %]
-
<tr>
[% UNLESS conf_vertreter %]
<th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][% ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
<td>
[%- INCLUDE generic/multibox.html
name = 'language_id',
+ default = default_language_id,
DATA = languages,
show_empty = 1,
id_key = 'id',
<td>
[%- INCLUDE generic/multibox.html
name = 'taxzone_id',
+ id = 'taxzone_id',
DATA = ALL_TAXZONES,
- show_empty = 1,
+ show_empty = 0,
id_key = 'id',
label_key = 'description',
-%]
</td>
[%- IF is_customer && !conf_vertreter %]
<th align="right">[% 'Salesman' | $T8 %]</th>
- <td>
- [%- INCLUDE generic/multibox.html
- name = 'salesman_id',
- DATA = ALL_SALESMEN,
- show_empty = 1,
- id_key = 'id',
- label_sub = 'salesman_label',
- -%]
- </td>
+ <td>[% L.select_tag('salesman_id', ALL_SALESMEN, default = salesman_id, with_empty = 1, title_key = 'safe_name') %]</td>
[%- END %]
</tr>
+
+ <tr>
+ <td>[% 'taxincluded checked' | $T8 %]</td>
+ <td>[% L.select_tag('taxincluded_checked', [[undef, LxERP.t8('use user config')], ['1', LxERP.t8('Yes')], ['0', LxERP.t8('No')]], default = taxincluded_checked) %]</td>
+ </tr>
</table>
<table>
<tr>
- <th align="left" nowrap>[% 'Notes' | $T8 %]</th>
+ <th align="left" nowrap>[% 'Internal Notes' | $T8 %]</th>
</tr>
<tr>
</div>
<div id="shipto" class="tabcontent">
-
- <table width="100%">
- <tr>
- <th align="right">[% 'Shipping Address' | $T8 %]</th>
- <td>
- [%- INCLUDE generic/multibox.html
- name = 'shipto_id',
- id = 'shipto_id',
- DATA = SHIPTO,
- onChange = "get_shipto(['shipto_id__' + this.value], ['shiptoname','shiptodepartment_1', 'shiptodepartment_2','shiptostreet','shiptozipcode','shiptocity','shiptocountry','shiptocontact','shiptophone','shiptofax','shiptoemail',enable_delete_shipto,set_gender])",
- id_key = 'shipto_id',
- label_sub = 'shipto_label',
- label_key = 'shipto_label',
- -%]
- </td>
- </tr>
-
- <tr>
- <th align="right" nowrap>[% 'Company Name' | $T8 %]</th>
- <td><input id="shiptoname" name="shiptoname" size="35" maxlength="75" value="[% HTML.escape(shiptoname) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap>[% 'Abteilung' | $T8 %]</th>
- <td>
- <input id="shiptodepartment_1" name="shiptodepartment_1" size="16" maxlength="75" value="[% HTML.escape(shiptodepartment_1) %]">
- <input id="shiptodepartment_2" name="shiptodepartment_2" size="16" maxlength="75" value="[% HTML.escape(shiptodepartment_2) %]">
- </td>
- </tr>
-
- <tr>
- <th align="right" nowrap>[% 'Street' | $T8 %]</th>
- <td><input id="shiptostreet" name="shiptostreet" size="35" maxlength="75" value="[% HTML.escape(shiptostreet) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap>[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %]</th>
- <td>
- <input id="shiptozipcode" name="shiptozipcode" size="5" maxlength="75" value="[% HTML.escape(shiptozipcode) %]">
- <input id="shiptocity" name="shiptocity" size="30" maxlength="75" value="[% HTML.escape(shiptocity) %]">
- </td>
- </tr>
-
- <tr>
- <th align="right" nowrap>[% 'Country' | $T8 %]</th>
- <td><input id="shiptocountry" name="shiptocountry" size="35" maxlength="75" value="[% HTML.escape(shiptocountry) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap>[% 'Contact' | $T8 %]</th>
- <td><input id="shiptocontact" name="shiptocontact" size="30" maxlength="75" value="[% HTML.escape(shiptocontact) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap>[% 'Phone' | $T8 %]</th>
- <td><input id="shiptophone" name="shiptophone" size="30" maxlength="30" value="[% HTML.escape(shiptophone) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap>[% 'Fax' | $T8 %]</th>
- <td><input id="shiptofax" name="shiptofax" size="30" maxlength="30" value="[% HTML.escape(shiptofax) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap>[% 'E-mail' | $T8 %]</th>
- <td><input id="shiptoemail" name="shiptoemail" size="45" value="[% HTML.escape(shiptoemail) %]"></td>
- </tr>
-
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- </table>
-
- <input type="submit" id="delete_shipto" name="action" value="[% 'Delete Shipto' | $T8 %]" disabled>
- <br style="clear: left" />
+ [% INCLUDE 'ct/_shipto.html' %]
</div>
<div id="contacts" class="tabcontent">
- <table>
- <input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]">
- <tr>
- <th align="right">[% 'Ansprechpartner' | $T8 %]</th>
- <td>
- [%- INCLUDE generic/multibox.html
- name = 'cp_id',
- id = 'cp_id',
- DATA = CONTACTS,
- onChange = "on_contact_changed()",
- id_key = 'cp_id',
- label_sub = 'contacts_label',
- -%]
- </td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Gender' | $T8 %]</th>
- <td>
- <select id="cp_gender" name="cp_gender">
- <option value="m"[% IF cp_gender == 'm' %] selected[% END %]>[% 'male' | $T8 %]</option>
- <option value="f"[% IF cp_gender == 'f' %] selected[% END %]>[% 'female' | $T8 %]</option>
- </select>
- </td>
- </tr>
- <tr>
-
- <tr>
- <th align="left" nowrap>[% 'Title' | $T8 %]</th>
- <td>
- <input id="cp_title" name="cp_title" size="40" maxlength="75" value="[% HTML.escape(cp_title) %]">
- [%- INCLUDE generic/multibox.html
- name = 'selected_cp_title',
- id = 'selected_cp_title',
- DATA = MB_TITLES,
- show_empty = 1,
- id_key = 'id',
- label_key = 'description',
- -%]
- </td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Department' | $T8 %]</th>
- <td>
- <input id="cp_abteilung" name="cp_abteilung" size="40" value="[% HTML.escape(cp_abteilung) %]">
- [%- INCLUDE generic/multibox.html
- name = 'selected_cp_abteilung',
- id = 'selected_cp_abteilung',
- DATA = MB_DEPARTMENT,
- show_empty = 1,
- id_key = 'id',
- label_key = 'description',
- -%]
- </td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Given Name' | $T8 %]</th>
- <td><input id="cp_givenname" name="cp_givenname" size="40" maxlength="75" value="[% HTML.escape(cp_givenname) %]"></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Name' | $T8 %]</th>
- <td><input id="cp_name" name="cp_name" size="40" maxlength="75" value="[% HTML.escape(cp_name) %]"></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Phone1' | $T8 %]</th>
- <td><input id="cp_phone1" name="cp_phone1" size="40" maxlength="75" value="[% HTML.escape(cp_phone1) %]"></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Phone2' | $T8 %]</th>
- <td><input id="cp_phone2" name="cp_phone2" size="40" maxlength="75" value="[% HTML.escape(cp_phone2) %]"></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Fax' | $T8 %]</th>
- <td><input id="cp_fax" name="cp_fax" size="40" value="[% HTML.escape(cp_fax) %]"></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Mobile1' | $T8 %]</th>
- <td><input id="cp_mobile1" name="cp_mobile1" size="40" value="[% HTML.escape(cp_mobile1) %]"></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Mobile2' | $T8 %]</th>
- <td><input id="cp_mobile2" name="cp_mobile2" size="40" value="[% HTML.escape(cp_mobile2) %]"></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Sat. Phone' | $T8 %]</th>
- <td><input id="cp_satphone" name="cp_satphone" size="40" value="[% HTML.escape(cp_satphone) %]"></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Sat. Fax' | $T8 %]</th>
- <td><input id="cp_satfax" name="cp_satfax" size="40" value="[% HTML.escape(cp_satfax) %]"></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Project' | $T8 %]</th>
- <td><input id="cp_project" name="cp_project" size="40" value="[% HTML.escape(cp_project) %]"></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'E-mail' | $T8 %]</th>
- <td><input id="cp_email" name="cp_email" size="40" value="[% HTML.escape(cp_email) %]"></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Private Phone' | $T8 %]</th>
- <td><input id="cp_privatphone" name="cp_privatphone" size="40" value="[% HTML.escape(cp_privatphone) %]"></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Private E-mail' | $T8 %]</th>
- <td><input id="cp_privatemail" name="cp_privatemail" size="40" value="[% HTML.escape(cp_privatemail) %]"></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Birthday' | $T8 %]</th>
- <td><input id="cp_birthday" name="cp_birthday" size="40" value="[% HTML.escape(cp_birthday) %]"></td>
- </tr>
-
- <tr>
- <td colspan="2"><hr></td>
- </tr>
-
- <tr>
- <th align="left" nowrap>[% 'Bcc' | $T8 %]</th>
- <td><input name="bcc" size="40" value="[% HTML.escape(bcc) %]"></td>
- </tr>
- </table>
-
- <input type="submit" id="delete_contact" name="action" value="[% 'Delete Contact' | $T8 %]" disabled>
- <br style="clear: left" />
+ [% INCLUDE 'ct/_contact.html' %]
</div>
<div id="deliveries" class="tabcontent">
<table>
<tr>
<th align="right">[% 'Shipping Address' | $T8 %]</th>
- <td>
- [%- INCLUDE generic/multibox.html
- name = 'delivery_id',
- id = 'delivery_id',
- DATA = SHIPTO,
- onChange = "get_delivery(['shipto_id__' + this.value, 'from__' + from.value, 'to__' + to.value, 'id__' + cvid.value, 'db__' + db.value], ['delivery'])",
- id_key = 'shipto_id',
- label_sub = 'shipto_label',
- -%]
+ <td colspan="3">
+ [% L.select_tag('delivery_id', SHIPTO_ALL, title_sub = \shipto_label, with_empty = 1,
+ onchange = "\$('#delivery').load('ct.pl?action=get_delivery&id=' + \$('#cvid').attr('value') + '&db=' + \$('#db').attr('value') + '&shipto_id=' + this.value)") %]
</td>
</tr>
<tr>
<th align="right" nowrap>[% 'From' | $T8 %]</th>
<td>
- <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) %]">
- <input type="button" name="fromB" id="trigger_from" value="?">
+ [% L.date_tag('from',
+ from,
+ 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())")
+ %]
</td>
<th align="right" nowrap>[% 'To (time)' | $T8 %]</th>
<td>
- <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) %]">
- <input type="button" name="toB" id="trigger_to" value="?">
+ [% L.date_tag('to',
+ to,
+ 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())")
+ %]
</td>
</tr>
<tr>
<td valign="right">[% 'Follow-Up On' | $T8 %]</td>
<td>
- <input name="FU_date" id="FU_date" value="[% HTML.escape(FU_date) %]" size="12">
- <input type="button" name="FU_date_button" id="FU_date_trigger" value="?">
+ [% L.date_tag('FU_date', FU_date) %]
[% 'for' | $T8 %]
- <select name="FU_created_for_user">
- [%- FOREACH row = ALL_EMPLOYEES %]
- <option value="[% HTML.escape(row.id) %]"[% IF (NOTE_id && (row.id == FU_created_for_user)) || (row.login == login) %] selected[% END %]>
- [%- IF row.name %][%- HTML.escape(row.name) %] ([% HTML.escape(row.login) %])[% ELSE %][% HTML.escape(row.login) %][% END %]
- </option>
- [%- END %]
- </select>
+ [% L.select_tag('FU_created_for_user', ALL_EMPLOYEES, default = (FU_created_for_user ? FU_created_for_user : USER.id), title_key='safe_name') %]
</td>
</tr>
<br style="clear: left" />
</div>
- [%- IF CUSTOM_VARIABLES.size %]
+ [%- IF CUSTOM_VARIABLES.CT.size %]
<div id="custom_variables" class="tabcontent">
<p>
<table>
- [%- FOREACH var = CUSTOM_VARIABLES %]
+ [%- FOREACH var = CUSTOM_VARIABLES.CT %]
<tr>
<td align="right" valign="top">[% HTML.escape(var.description) %]</td>
<td valign="top">[% var.HTML_CODE %]</td>
</div>
- <script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
<!--
function set_gender(gender) {
s.selectedIndex = (gender == 'f') ? 1 : 0;
}
}
-
- function on_contact_changed() {
- get_contact(['cp_id__' + $('#cp_id').attr('value')],
- ['cp_name','cp_title','cp_givenname','cp_phone1','cp_phone2','cp_email','cp_abteilung','cp_fax','cp_mobile1','cp_mobile2',
- 'cp_satphone','cp_satfax','cp_project','cp_privatphone','cp_privatemail','cp_birthday',enable_delete_contact,set_gender]);
- $('#selected_cp_title').attr('selectedIndex', 0);
- $('#selected_cp_abteilung').attr('selectedIndex', 0);
- }
-->
</script>