X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fct.pl;h=a1bfc255d6f3606892cf269d606e4e911a9b8e3d;hb=6277aefffea29c8aa6f684bd86c55cdc6366f32f;hp=782f183e46eead0734e94090478b657ff9dd982c;hpb=5dd059ffbe9317acf466ad70610513ded8ad1c6f;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 782f183e4..a1bfc255d 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -38,6 +38,9 @@ # $locale->text('Add Vendor') use SL::CT; +use CGI::Ajax; +use CGI; +use Data::Dumper; 1; @@ -182,6 +185,128 @@ sub search { $lxdebug->leave_sub(); } +sub search_delivery { + $lxdebug->enter_sub(); + + $label = ucfirst $form->{db}; + $form->{title} = $locale->text($label . "s"); + + if ($form->{db} eq 'vendor') { + $gifi = qq| + | + . $locale->text('GIFI') . qq| +|; + } + + $form->header; + + print qq| + + +
{script}> + +{db}> + + + + + + + + + + + + +
$form->{title}
+ + + + + + + + + + + + + + + + + + + + + + + + + +
| . $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('Include in Report') . qq| + + + + + + + + + + + + + + + + $gifi + + + + + + + + +
| + . $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| | + . $locale->text('Type of Business') . qq|
| + . $locale->text('Invoices') . qq| | + . $locale->text('Orders') . qq| | + . $locale->text('Quotations') . qq|
+
+

+ + + +{path}> +{login}> +{password}> + +
+ +
+ + + +|; + $lxdebug->leave_sub(); +} + sub list_names { $lxdebug->enter_sub(); @@ -418,14 +543,8 @@ sub list_names { {password}> |; - - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } + . $locale->text('Add') . qq|"> - print qq| @@ -474,16 +593,118 @@ sub form_header { |; } $form->{obsolete} = "checked" if $form->{obsolete}; - %langs = (de => "deutsch", en => "englisch", fr => "französisch"); + $lang = qq||; - foreach $item (keys %langs) { - if ($form->{language} eq $item) { - $lang .= qq||; + foreach $item (@{ $form->{languages} }) { + if ($form->{language_id} eq $item->{id}) { + $lang .= qq||; + } else { + $lang .= qq||; + } + } + + $payment = qq||; + foreach $item (@{ $form->{payment_terms} }) { + if ($form->{payment_id} eq $item->{id}) { + $payment .= qq||; } else { - $lang .= qq||; + $payment .= qq||; } } + if (!$form->{id}) { + if ($form->{db} eq "customer") { + $form->{taxzone_id} = 0; + } else { + $form->{taxzone_id} = 0; + } + } + + if (@{ $form->{TAXZONE} }) { + foreach $item (@{ $form->{TAXZONE} }) { + if ($item->{id} == $form->{taxzone_id}) { + $form->{selecttaxzone} .= + ""; + if (@{ $form->{CONTACTS} }) { + foreach $item (@{ $form->{CONTACTS} }) { + if ($item->{cp_id} == $form->{cp_id}) { + $form->{selectcontact} .= + qq|\n|; + } else { + $form->{selectcontact} .= + qq|\n|; + } + + } + } + push(@ { $form->{AJAX} }, $pjx); + $ansprechpartner = qq| + + | . $locale->text('Ansprechpartner') . qq| + + + |; + $get_shipto_url = + "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=get_shipto"; + + my $pjy = new CGI::Ajax( 'get_shipto' => $get_shipto_url ); + $form->{selectshipto} = ""; + $form->{selectshipto} .= ""; + if (@{ $form->{SHIPTO} }) { + foreach $item (@{ $form->{SHIPTO} }) { + if ($item->{shipto_id} == $form->{shipto_id}) { + $form->{selectshipto} .= + "|; } @{ $form->{GREETINGS} }); $select_greeting .= qq||; + + $select_company_greeting = + qq| |; + + $select_department = + qq| |; ## /LINET if ($form->{db} eq 'customer') { @@ -612,176 +849,132 @@ sub form_header { $form->{selectpricegroup} =~ s/(