X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fct.pl;h=4d06662e298ee7cd55d6bf881e966c689ecd373d;hb=1d027d8883ed6b13cf6c78b95b3493acc1fb715f;hp=d0510e8902a957c58d4ebcd7f0b904a8efe2cff8;hpb=b3673e83306a36c0582a08ea9eada300fe3987aa;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index d0510e890..4d06662e2 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -71,149 +71,17 @@ sub add { sub search { $lxdebug->enter_sub(); - my $vc_business_type = $form->{db} eq "customer" ? - $locale->text("Customer type") : $locale->text("Vendor type"); + $form->{IS_CUSTOMER} = $form->{db} eq 'customer'; $form->get_lists("business_types" => "ALL_BUSINESS_TYPES"); - my (%labels, @values); - - my $business_types; - if (scalar(@{ $form->{ALL_BUSINESS_TYPES} }) != 0) { - push(@values, undef); - foreach my $item (@{ $form->{ALL_BUSINESS_TYPES} }) { - push(@values, $item->{id}); - $labels{$item->{id}} = $item->{description}; - } + $form->{SHOW_BUSINESS_TYPES} = scalar @{ $form->{ALL_BUSINESS_TYPES} } > 0; - $business_types = - qq| - ${vc_business_type} - | - . NTI($cgi->popup_menu('-name' => 'business_id', '-values' => \@values, - '-labels' => \%labels)) - . qq| - -|; - } - - $label = ucfirst $form->{db}; - $form->{title} = $locale->text($label . "s"); + $form->{title} = $form->{IS_CUSTOMER} ? $locale->text('Customers') : $locale->text('Vendors'); $form->{fokus} = 'Form.name'; - $form->header; - - print qq| - - -
{script} name="Form"> + $form->header(); + print $form->parse_html_template2('ct/search'); -{db}> - - - - - - - - - - - - -
$form->{title}
- - - - - - - - - - - - - - - - - - $business_types - - - - - - - - - - - - -
| . $locale->text($label . ' Number') . qq|{db}number size=35>
| . $locale->text('Company Name') . qq|
| . $locale->text('Contact') . qq|
| . $locale->text('E-mail') . qq|
 | - . $locale->text('All') . qq| -  | - . $locale->text('Orphaned') . qq|
 | - . $locale->text('All') . qq| -  | - . $locale->text('Obsolete') . qq| -  | - . $locale->text('Not obsolete') . qq|
| . $locale->text('Include in Report') . qq| - - - - - - - - - - - - - - - - - - - - - - - -
| - . $locale->text('ID') . qq| | - . $locale->text($label . ' Number') . qq| | - . $locale->text('Company Name') . qq| | - . $locale->text('Address') . qq|
| - . $locale->text('Contact') . qq| | - . $locale->text('Phone') . qq| | - . $locale->text('Fax') . qq| | - . $locale->text('E-mail') . qq|
| - . $locale->text('Tax Number') . qq| | - . $locale->text('SIC') . qq| | - . $vc_business_type . qq|
| - . $locale->text('Invoices') . qq| | - . $locale->text('Orders') . qq| | - . $locale->text('Quotations') . qq|
-
-

- - - -{login}> -{password}> - -
- -
- - - -|; $lxdebug->leave_sub(); } @@ -514,7 +382,7 @@ sub form_header { if ($form->{db} eq 'vendor') { $customer = qq| | . $locale->text('Kundennummer') . qq| - + |; } @@ -522,7 +390,7 @@ sub form_header { $customer = qq| | . $locale->text('KNr. beim Kunden') . qq| - + |; } @@ -646,11 +514,11 @@ sub form_header { | . $locale->text($label . ' Number') . qq| - {db}number"}"> + {db}number"}"> | . $locale->text('Greeting') . qq| -   +   $select_company_greeting @@ -717,9 +585,9 @@ sub form_header { | . $locale->text('Account Number') . qq| - + | . $locale->text('Bank Code Number') . qq| - + | . $locale->text('Bank') . qq| @@ -780,12 +648,12 @@ $shipto | . $locale->text('Zipcode') . "/" . $locale->text('City') . qq| - + | . $locale->text('Country') . qq| - + | . $locale->text('Contact') . qq| @@ -825,75 +693,75 @@ $shipto $ansprechpartner | . $locale->text('Greeting') . qq| -   +   $select_greeting | . $locale->text('Title') . qq| -   +   $select_title | . $locale->text('Department') . qq| -   +   $select_department | . $locale->text('Given Name') . qq| - + | . $locale->text('Name') . qq| - + | . $locale->text('Phone1') . qq| - + | . $locale->text('Phone2') . qq| - + | . $locale->text('Fax') . qq| - + | . $locale->text('Mobile1') . qq| - + | . $locale->text('Mobile2') . qq| - + | . $locale->text('Sat. Phone') . qq| - + | . $locale->text('Sat. Fax') . qq| - + | . $locale->text('Project') . qq| - + | . $locale->text('E-mail') . qq| - + | . $locale->text('Private Phone') . qq| - + | . $locale->text('Private E-mail') . qq| - + | . $locale->text('Birthday') . qq| - + @@ -1285,7 +1153,8 @@ sub get_delivery { transdate, description, qty, - unit); + unit, + sellprice); @@ -1303,6 +1172,8 @@ sub get_delivery { qq|| . $locale->text('Qty') . qq||; $column_header{unit} = qq|| . $locale->text('Unit') . qq||; + $column_header{sellprice} = + qq|| . $locale->text('Sell Price') . qq||; $result .= qq| @@ -1327,7 +1198,7 @@ sub get_delivery { } else { map { $column_data{$_} = "" } @column_index; } - + $column_data{sellprice} = ""; $i++; $i %= 2; $result .= "
$ref->{$_} ". $form->format_amount(\%myconfig,$ref->{sellprice},2)."