X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fct.pl;h=e5ba1ddf8ff48d4fe44667b360a374b20a20699b;hb=250a086bfcb9cb51fce6f347b295b3de6166ad83;hp=d532874a075f2f18652126095009d2193703a9a3;hpb=e3bd574690299326410cef943fe8f738cc49836b;p=kivitendo-erp.git
diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl
index d532874a0..e5ba1ddf8 100644
--- a/bin/mozilla/ct.pl
+++ b/bin/mozilla/ct.pl
@@ -54,7 +54,7 @@ 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->populate_drop_down_boxes(\%myconfig, \%$form);
@@ -68,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|
@@ -111,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| |
@@ -145,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|
|
@@ -172,7 +199,6 @@ sub search {
-{path}>
{login}>
{password}>
@@ -193,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|
@@ -267,7 +286,6 @@ sub search_delivery {
|
. $locale->text('Tax Number') . qq| |
- $gifi
|
. $locale->text('SIC') . qq| |
|
@@ -294,7 +312,6 @@ sub search_delivery {
-{path}>
{login}>
{password}>
@@ -315,7 +332,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}&login=$form->{login}&password=$form->{password}&status=$form->{status}&obsolete=$form->{obsolete}";
$href = $callback;
@columns =
@@ -323,7 +340,7 @@ sub list_names {
"$form->{db}number", address,
contact, phone,
fax, email,
- taxnumber, gifi_accno,
+ taxnumber,
sic_code, business,
invnumber, ordnumber,
quonumber);
@@ -412,10 +429,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')
@@ -481,7 +494,7 @@ sub list_names {
(invnumber, ordnumber, quonumber);
$column_data{name} =
- " | {script}?action=edit&id=$ref->{id}&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}&callback=$callback>$ref->{name} | ";
+ "{script}?action=edit&id=$ref->{id}&db=$form->{db}&login=$form->{login}&password=$form->{password}&status=$form->{status}&callback=$callback>$ref->{name} | ";
if ($ref->{email}) {
$email = $ref->{email};
@@ -496,17 +509,17 @@ sub list_names {
if ($ref->{formtype} eq 'invoice') {
$column_data{invnumber} =
- "{module}.pl?action=edit&id=$ref->{invid}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{invnumber} | ";
+ "{module}.pl?action=edit&id=$ref->{invid}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{invnumber} | ";
}
if ($ref->{formtype} eq 'order') {
$column_data{ordnumber} =
- "{module}.pl?action=edit&id=$ref->{invid}&type=$ordertype&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{ordnumber} | ";
+ "{module}.pl?action=edit&id=$ref->{invid}&type=$ordertype&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{ordnumber} | ";
}
if ($ref->{formtype} eq 'quotation') {
$column_data{quonumber} =
- "{module}.pl?action=edit&id=$ref->{invid}&type=$quotationtype&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{quonumber} | ";
+ "{module}.pl?action=edit&id=$ref->{invid}&type=$quotationtype&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{quonumber} | ";
}
$i++;
@@ -540,7 +553,6 @@ sub list_names {
{db}>
-{path}>
{login}>
{password}>
@@ -586,7 +598,8 @@ sub edit {
sub form_header {
$lxdebug->enter_sub();
- $form->get_lists("employees" => "ALL_SALESMEN");
+ $form->get_lists("employees" => "ALL_SALESMEN",
+ "taxzones" => "ALL_TAXZONES");
$form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
$form->{creditlimit} =
@@ -629,27 +642,23 @@ sub form_header {
}
}
- if (@{ $form->{TAXZONE} }) {
- foreach $item (@{ $form->{TAXZONE} }) {
- if ($item->{id} == $form->{taxzone_id}) {
- $form->{selecttaxzone} .=
- "";
@@ -673,7 +682,7 @@ sub form_header {
|;
$get_shipto_url =
- "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=get_shipto";
+ "$form->{script}?login=$form->{login}&password=$form->{password}&action=get_shipto";
my $pjy = new CGI::Ajax( 'get_shipto' => $get_shipto_url );
$form->{selectshipto} = "";
@@ -701,7 +710,7 @@ sub form_header {
$get_delivery_url =
- "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=get_delivery";
+ "$form->{script}?login=$form->{login}&password=$form->{password}&action=get_delivery";
my $pjz = new CGI::Ajax( 'get_delivery' => $get_delivery_url );
@@ -736,7 +745,7 @@ sub form_header {
if ($form->{db} eq 'vendor') {
$customer = qq|
| . $locale->text('Kundennummer') . qq| |
- |
+ |
|;
}
@@ -744,13 +753,13 @@ sub form_header {
$customer = qq|
| . $locale->text('KNr. beim Kunden') . qq| |
- |
+ |
|;
}
$business = qq|
| . $locale->text('Type of Business') . qq| |
- |
+ |
|;
$salesman = "";
@@ -825,7 +834,7 @@ sub form_header {
s/(