X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fct.pl;h=e5ba1ddf8ff48d4fe44667b360a374b20a20699b;hb=b5157f97d47413e5f33cced1d0de527979ff3d61;hp=beefcc1fb7d014a518427c3bcd518cb40be3d406;hpb=54e4131e091831e00a861fe2c4f53e344b87ddca;p=kivitendo-erp.git
diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl
index beefcc1fb..e5ba1ddf8 100644
--- a/bin/mozilla/ct.pl
+++ b/bin/mozilla/ct.pl
@@ -42,6 +42,8 @@ use CGI::Ajax;
use CGI;
use Data::Dumper;
+require "bin/mozilla/common.pl";
+
1;
# end of main
@@ -52,10 +54,10 @@ sub add {
$form->{title} = "Add";
$form->{callback} =
- "$form->{script}?action=add&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ "$form->{script}?action=add&db=$form->{db}&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
- CT->taxaccounts(\%myconfig, \%$form);
+ CT->populate_drop_down_boxes(\%myconfig, \%$form);
&form_header;
&form_footer;
@@ -66,16 +68,34 @@ sub add {
sub search {
$lxdebug->enter_sub();
- $label = ucfirst $form->{db};
- $form->{title} = $locale->text($label . "s");
+ my $vc_business_type = $form->{db} eq "customer" ?
+ $locale->text("Customer type") : $locale->text("Vendor type");
- if ($form->{db} eq 'vendor') {
- $gifi = qq|
-
|
- . $locale->text('GIFI') . qq| |
+ $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};
+ }
+
+ $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->header;
print qq|
@@ -109,12 +129,22 @@ sub search {
| . $locale->text('E-mail') . qq| |
|
+ $business_types
|
|
. $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| |
@@ -143,11 +173,10 @@ sub search {
|
. $locale->text('Tax Number') . qq| |
- $gifi
|
. $locale->text('SIC') . qq| |
|
- . $locale->text('Type of Business') . qq| |
+ . $vc_business_type . qq|
|
@@ -170,7 +199,6 @@ sub search {
-{path}>
{login}>
{password}>
@@ -191,13 +219,6 @@ sub search_delivery {
$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|
@@ -265,7 +286,6 @@ sub search_delivery {
|
. $locale->text('Tax Number') . qq| |
- $gifi
|
. $locale->text('SIC') . qq| |
|
@@ -292,7 +312,6 @@ sub search_delivery {
-{path}>
{login}>
{password}>
@@ -307,231 +326,13 @@ sub search_delivery {
$lxdebug->leave_sub();
}
-sub search_adr {
- $lxdebug->enter_sub();
-
- $form->{title} = $locale->text('ADR Report');
-
- # use JavaScript Calendar or not
- $form->{jsscript} = $jscalendar;
- $jsscript = "";
-
- if ($form->{jsscript}) {
-
- # with JavaScript Calendar
- $button1 = qq|
- | {from}> |
- text('button') . qq|> |
- |;
- $button2 = qq|
- {to}> |
- text('button') . qq|> |
- |;
-
-
- #write Trigger
- $jsscript =
- Form->write_trigger(\%myconfig, "2",
- "from", "BL",
- "trigger1", "to",
- "BL", "trigger2");
- } else {
-
- # without JavaScript Calendar
- $button1 =
- qq|{from}> | |;
- $button2 =
- qq|{to}> | |;
- }
-
- $form->header;
-
- print qq|
-
-
-
-
-
-