- $business = qq|
- <th align=right>| . $locale->text('Type of Business') . qq|</th>
- <td><select name=business tabindex=22>$form->{selectbusiness}</select></td>
- |;
- }
-
-## LINET: Create a drop-down box with all prior titles and greetings.
- CT->query_titles_and_greetings(\%myconfig, \%$form);
-
- $select_title = qq| <select name=selected_cp_title><option></option>|;
- map({ $select_title .= qq|<option>$_</option>|; } @{ $form->{TITLES} });
- $select_title .= qq|</select>|;
-
- $select_greeting =
- qq| <select name=selected_cp_greeting><option></option>|;
- map({ $select_greeting .= qq|<option>$_</option>|; } @{ $form->{GREETINGS} });
- $select_greeting .= qq|</select>|;
-## /LINET
-
- # $locale->text('Customer Number')
- # $locale->text('Vendor Number')
- $form->{fokus} = "ct.name";
- $form->header;
-
- print qq|
-<body onLoad="fokus()">
-<form method=post name="ct" action=$form->{script}>
-
-<table width=100%>
- <tr>
- <th class=listtop>$form->{title}</th>
- </tr>
- <tr>
- <td>
- <table width=100%>
- <tr class=listheading>
- <th class=listheading colspan=2 width=50%>|
- . $locale->text('Billing Address')
- . qq|</th>
- <th class=listheading width=50%>|
- . $locale->text('Shipping Address')
- . qq|</th>
- </tr>
- <tr height="5"></tr>
- $business_salesman
- <tr>
- <th align=right nowrap>| . $locale->text($label . ' Number') . qq|</th>
- <td><input name="$form->{db}number" size=35 maxlength=35 value="$form->{"$form->{db}number"}"></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Company Name') . qq|</th>
- <td><input name=name size=35 maxlength=35 tabindex=1 value="$form->{name}"></td>
- <td><input name=shiptoname size=35 maxlength=75 value="$form->{shiptoname}"></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Abteilung') . qq|</th>
- <td><input name=department_1 size=16 maxlength=75 tabindex=2 value="$form->{department_1}">
- <input name=department_2 size=16 maxlength=75 tabindex=3 value="$form->{department_2}"></td>
- <td><input name=shiptodepartment_1 size=16 maxlength=75 value="$form->{shiptodepartment_1}">
- <input name=shiptodepartment_2 size=16 maxlength=75 value="$form->{shiptodepartment_2}"></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Street') . qq|</th>
- <td><input name=street size=35 tabindex=4 maxlength=75 value="$form->{street}"></td>
- <td><input name=shiptostreet size=35 maxlength=35 value="$form->{shiptostreet}"></td>
- </tr>
- <tr>
- <th align=right nowrap>|
- . $locale->text('Zipcode') . "/"
- . $locale->text('City')
- . qq|</th>
- <td><input name=zipcode size=5 tabindex=5 maxlength=10 value="$form->{zipcode}">
- <input name=city size=30 tabindex=6 maxlength=75 value="$form->{city}"></td>
- <td><input name=shiptozipcode size=5 maxlength=10 value="$form->{shiptozipcode}">
- <input name=shiptocity size=30 maxlength=75 value="$form->{shiptocity}"></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Country') . qq|</th>
- <td><input name=country size=35 tabindex=7 maxlength=75 value="$form->{country}"></td>
- <td><input name=shiptocountry size=35 maxlength=35 value="$form->{shiptocountry}"></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Contact') . qq|</th>
- <td><input name=contact size=28 tabindex=8 maxlength=75 value="$form->{contact}"></td>
- <td><input name=shiptocontact size=30 maxlength=75 value="$form->{shiptocontact}"></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Phone') . qq|</th>
- <td><input name=phone size=30 tabindex=9 maxlength=30 value="$form->{phone}"></td>
- <td><input name=shiptophone size=30 maxlength=30 value="$form->{shiptophone}"></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Fax') . qq|</th>
- <td><input name=fax size=30 tabindex=10 maxlength=30 value="$form->{fax}"></td>
- <td><input name=shiptofax size=30 maxlength=30 value="$form->{shiptofax}"></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('E-mail') . qq|</th>
- <td><input name=email tabindex=11 size=45 value="$form->{email}"></td>
- <td><input name=shiptoemail size=45 value="$form->{shiptoemail}"></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Homepage') . qq|</th>
- <td><input name=homepage tabindex=12 size=45 value="$form->{homepage}"></td>
- </tr>
- <tr>
- </tr>|;
-##LINET - added fields for contact person
- print qq| <tr>
- <td colspan=3>
- <input type=hidden name=cp_id value=$form->{cp_id}>
- <table>
- <tr>
- <th align=right nowrap>|
- . $locale->text('Contact Person')
- . qq|</th>
- </tr>
- <tr>
- <th></th>
- <th align=left nowrap>| . $locale->text('Greeting') . qq|</th>
- <td><input name=cp_greeting size=30 maxlength=30 value="$form->{cp_greeting}">
- $select_greeting</td>
- <th align=left nowrap>| . $locale->text('Title') . qq|</th>
- <td><input name=cp_title size=30 maxlength=30 value="$form->{cp_title}">
- $select_title</td>
- </tr>
- <tr>
- <th></th>
- <th align=left nowrap>|
- . $locale->text('Given Name')
- . qq|</th>
- <td><input name=cp_givenname size=30 maxlength=40 value="$form->{cp_givenname}"></td>
- <th align=left nowrap>| . $locale->text('Name') . qq|</th>
- <td><input name=cp_name size=30 maxlength=40 value="$form->{cp_name}"></td>
- </tr>
- <tr>
- <th></th>
- <th align=left nowrap>| . $locale->text('Phone1') . qq|</th>
- <td><input name=cp_phone1 size=30 maxlength=30 value="$form->{cp_phone1}"></td>
- <th align=left nowrap>| . $locale->text('Phone2') . qq|</th>
- <td><input name=cp_phone2 size=30 maxlength=30 value="$form->{cp_phone2}"></td>
- </tr>
- <tr>
- <th></th>
- <th align=left nowrap>| . $locale->text('E-mail') . qq|</th>
- <td><input name=cp_email size=30 maxlength=40 value="$form->{cp_email}"></td>
- <th></th>
- <th></th>
- </tr> </table>
- </td>
- </tr>
- <tr height="5"></tr>|;
-##/LINET
- print qq| $bcc
- $tax
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table>
- <tr>
- <th align=right>| . $locale->text('Credit Limit') . qq|</th>
- <td><input name=creditlimit tabindex=13 size=9 value="$form->{creditlimit}"></td>
- <th align=right>| . $locale->text('Terms: Net') . qq|</th>
- <td><input name=terms tabindex=14 size=2 value="$form->{terms}">|
- . $locale->text('days')
- . qq|</td>
- <th align=right>| . $locale->text('Discount') . qq|</th>
- <td><input name=discount tabindex=15 size=4 value="$form->{discount}">
- %</td>
- </tr>
- <tr>
- <th align=right>| . $locale->text('Tax Number / SSN') . qq|</th>
- <td><input name=taxnumber tabindex=16 size=20 value="$form->{taxnumber}"></td>
- <th align=right>| . $locale->text('USt-IdNr.') . qq|</th>
- <td><input name=ustid tabindex=17 size=20 value="$form->{ustid}"></td>
- $customer
- </tr>
- <tr>
- <th align=right>| . $locale->text('Account Number') . qq|</th>
- <td><input name=account_number size=10 tabindex=19 value="$form->{account_number}"></td>
- <th align=right>| . $locale->text('Bank Code Number') . qq|</th>
- <td><input name=bank_code size=10 tabindex=20 value="$form->{bank_code}"></td>
- <th align=right>| . $locale->text('Bank') . qq|</th>
- <td><input name=bank size=30 tabindex=21 value="$form->{bank}"></td>
- </tr>
- <tr>
- $business
- <th align=right>| . $locale->text('Language') . qq|</th>
- <td><select name=language tabindex=23>$lang
- </select></td>|;
-
- print qq| </tr>
- <tr>
- <td align=right>| . $locale->text('Obsolete') . qq|</td>
- <td><input name=obsolete class=checkbox type=checkbox value=1 $form->{obsolete}></td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <th align=left nowrap>| . $locale->text('Notes') . qq|</th>
- </tr>
- <tr>
- <td><textarea name=notes rows=3 cols=60 wrap=soft>$form->{notes}</textarea></td>
- </tr>
- <tr>
- <td><hr size=3 noshade></td>
- </tr>
-</table>
-|;
-
- $lxdebug->leave_sub();
-}
-
-sub form_footer {
- $lxdebug->enter_sub();
-
- $label = ucfirst $form->{db};
- $quotation =
- ($form->{db} eq 'customer')
- ? $locale->text('Save and Quotation')
- : $locale->text('Save and RFQ');
- $arap =
- ($form->{db} eq 'customer')
- ? $locale->text('Save and AR Transaction')
- : $locale->text('Save and AP Transaction');
- if ($vertreter) {
- $update_button =
- qq|<input class=submit type=submit name=action accesskey="u" value="|
- . $locale->text("Update") . qq|">|;
- } else {
- $update_button = "";
- }
-
-##<input class=submit type=submit name=action value="|.$locale->text("Save and Quotation").qq|">
-##<input class=submit type=submit name=action value="|.$locale->text("Save and RFQ").qq|">
-##<input class=submit type=submit name=action value="|.$locale->text("Save and AR Transaction").qq|">
-##<input class=submit type=submit name=action value="|.$locale->text("Save and AP Transaction").qq|">
-
- print qq|
-<input name=id type=hidden value=$form->{id}>
-<input name=taxaccounts type=hidden value="$form->{taxaccounts}">
-<input name=business_save type=hidden value="$form->{selectbusiness}">
-<input name=title_save type=hidden value="$form->{title}">
-
-<input type=hidden name=path value=$form->{path}>
-<input type=hidden name=login value=$form->{login}>
-<input type=hidden name=password value=$form->{password}>
-
-<input type=hidden name=callback value="$form->{callback}">
-<input type=hidden name=db value=$form->{db}>
-
-<br>
-$update_button
-<input class=submit type=submit name=action accesskey="s" value="|
- . $locale->text("Save") . qq|">
-<input class=submit type=submit name=action value="$arap">
-<input class=submit type=submit name=action value="|
- . $locale->text("Save and Invoice") . qq|">
-<input class=submit type=submit name=action value="|
- . $locale->text("Save and Order") . qq|">
-<input class=submit type=submit name=action value="$quotation">
-|;
-
- if ($form->{id} && $form->{status} eq 'orphaned') {
- print qq|<input class=submit type=submit name=action value="|
- . $locale->text('Delete')
- . qq|">\n|;