X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/7a7f33b5c1b3531ab761adba1cf19d4ad68cffcd..d3897394:/bin/mozilla/ct.pl diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index d4d2f9fb7..bc4f42829 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -37,7 +37,6 @@ # $locale->text('Add Customer') # $locale->text('Add Vendor') -use CGI; use CGI::Ajax; use POSIX qw(strftime); @@ -111,23 +110,14 @@ sub list_names { my @options; if ($form->{status} eq 'all') { push @options, $locale->text('All'); - } elsif ($form->{status} eq 'orphaned') { push @options, $locale->text('Orphaned'); } - if ($form->{name}) { - push @options, $locale->text('Name') . " : $form->{name}"; - } - if ($form->{contact}) { - push @options, $locale->text('Contact') . " : $form->{contact}"; - } - if ($form->{"$form->{db}number"}) { - push @options, $locale->text('Number') . qq| : $form->{"$form->{db}number"}|; - } - if ($form->{email}) { - push @options, $locale->text('E-mail') . " : $form->{email}"; - } + push @options, $locale->text('Name') . " : $form->{name}" if $form->{name}; + push @options, $locale->text('Contact') . " : $form->{contact}" if $form->{contact}; + push @options, $locale->text('Number') . qq| : $form->{"$form->{db}number"}| if $form->{"$form->{db}number"}; + push @options, $locale->text('E-mail') . " : $form->{email}" if $form->{email}; my @columns = ( 'id', 'name', "$form->{db}number", 'address', 'contact', 'phone', @@ -585,11 +575,9 @@ sub get_contact { CT->get_contact(\%myconfig, \%$form); - my $q = new CGI; $result = "$form->{cp_name}"; map { $result .= "__pjx__" . $form->{$_} } qw(cp_greeting 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); - print $q->header(); - print $result; + print $cgi->header(), $result; $lxdebug->leave_sub(); } @@ -601,11 +589,9 @@ sub get_shipto { CT->get_shipto(\%myconfig, \%$form); - my $q = new CGI; $result = "$form->{shiptoname}"; map { $result .= "__pjx__" . $form->{$_} } qw(shiptodepartment_1 shiptodepartment_2 shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail); - print $q->header(); - print $result; + print $cgi->header(), $result; $lxdebug->leave_sub(); } @@ -617,8 +603,8 @@ sub get_delivery { CT->get_delivery(\%myconfig, \%$form ); - print CGI->new->header(); - print $form->parse_html_template('ct/get_delivery'); + print $cgi->header(), $form->parse_html_template('ct/get_delivery'); + $lxdebug->leave_sub(); }