X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fct.pl;h=de231974aaf68f0530ec8e1be7390263243b551a;hb=f65faf202a24a1f1316f45e3695d3d9390dc0793;hp=a1bfc255d6f3606892cf269d606e4e911a9b8e3d;hpb=8ec0d29a33e23ce962b807e87cc8b577c8c98ec2;p=kivitendo-erp.git
diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl
index a1bfc255d..de231974a 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
@@ -55,7 +57,7 @@ sub add {
"$form->{script}?action=add&db=$form->{db}&path=$form->{path}&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|
|
@@ -191,13 +220,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 +287,6 @@ sub search_delivery {
|
. $locale->text('Tax Number') . qq| |
- $gifi
|
. $locale->text('SIC') . qq| |
|
@@ -313,7 +334,7 @@ sub list_names {
CT->search(\%myconfig, \%$form);
$callback =
- "$form->{script}?action=list_names&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}";
+ "$form->{script}?action=list_names&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}&obsolete=$form->{obsolete}";
$href = $callback;
@columns =
@@ -321,7 +342,7 @@ sub list_names {
"$form->{db}number", address,
contact, phone,
fax, email,
- taxnumber, gifi_accno,
+ taxnumber,
sic_code, business,
invnumber, ordnumber,
quonumber);
@@ -410,10 +431,6 @@ sub list_names {
qq| | |
. $locale->text('Tax Number')
. qq| | |;
- $column_header{gifi_accno} =
- qq||
- . $locale->text('GIFI')
- . qq| | |;
$column_header{sic_code} =
qq||
. $locale->text('SIC')
@@ -557,10 +574,15 @@ sub list_names {
sub edit {
$lxdebug->enter_sub();
+ # show history button
+ $form->{javascript} = qq||;
+ #/show hhistory button
+
# $locale->text('Edit Customer')
# $locale->text('Edit Vendor')
CT->get_tuple(\%myconfig, \%$form);
+ CT->populate_drop_down_boxes(\%myconfig, \%$form);
# format " into "
map { $form->{$_} =~ s/\"/"/g } keys %$form;
@@ -579,6 +601,8 @@ sub edit {
sub form_header {
$lxdebug->enter_sub();
+ $form->get_lists("employees" => "ALL_SALESMEN");
+
$form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
$form->{creditlimit} =
$form->format_amount(\%myconfig, $form->{creditlimit}, 0);
@@ -634,11 +658,10 @@ sub form_header {
}
$taxzone = qq|
-
| . $locale->text('Steuersatz') . qq| |
|
- |;
+|;
$get_contact_url =
"$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=get_contact";
@@ -705,35 +728,6 @@ sub form_header {
| |
|;
- foreach $item (split / /, $form->{taxaccounts}) {
- if (($form->{tax}{$item}{taxable}) || !($form->{id})) {
- $taxable .=
- qq| $form->{tax}{$item}{description}|;
- } else {
- $taxable .=
- qq| $form->{tax}{$item}{description}|;
- }
- }
-
-##LINET
- $taxable = "";
-
- if ($taxable) {
- $tax = qq|
-
- | . $locale->text('Taxable') . qq| |
-
-
- |
-
-|;
- }
$form->{selectbusiness} = qq|