X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fct.pl;h=6c119be5d3916836e9534f5e9e902234410503a2;hb=40782548cf82ac1e4c0fe417113a4cb3072e9390;hp=b3834fde555e0e2e610b0e285dedd05ea24d1029;hpb=272ff5b05b65ceea4d33a122a7d87464fc119475;p=kivitendo-erp.git
diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl
index b3834fde5..6c119be5d 100644
--- a/bin/mozilla/ct.pl
+++ b/bin/mozilla/ct.pl
@@ -68,6 +68,31 @@ sub add {
sub search {
$lxdebug->enter_sub();
+ my $vc_business_type = $form->{db} eq "customer" ?
+ $locale->text("Customer type") : $locale->text("Vendor type");
+
+ $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");
@@ -104,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| |
@@ -141,7 +176,7 @@ sub search {
|
. $locale->text('SIC') . qq| |
|
- . $locale->text('Type of Business') . qq| |
+ . $vc_business_type . qq|
|
@@ -299,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 =
@@ -1027,75 +1062,75 @@ $shipto
$ansprechpartner
|
| . $locale->text('Greeting') . qq| |
-
+ |
$select_greeting |
| . $locale->text('Title') . qq| |
-
+ |
$select_title |
| . $locale->text('Department') . qq| |
-
+ |
$select_department |
|
. $locale->text('Given Name') . qq| |
- |
+ |
| . $locale->text('Name') . qq| |
- |
+ |
| . $locale->text('Phone1') . qq| |
- |
+ |
| . $locale->text('Phone2') . qq| |
- |
+ |
| . $locale->text('Fax') . qq| |
- |
+ |
| . $locale->text('Mobile1') . qq| |
- |
+ |
| . $locale->text('Mobile2') . qq| |
- |
+ |
| . $locale->text('Sat. Phone') . qq| |
- |
+ |
| . $locale->text('Sat. Fax') . qq| |
- |
+ |
| . $locale->text('Project') . qq| |
- |
+ |
| . $locale->text('E-mail') . qq| |
- |
+ |
| . $locale->text('Private Phone') . qq| |
- |
+ |
| . $locale->text('Private E-mail') . qq| |
- |
+ |
| . $locale->text('Birthday') . qq| |
- |
+ |
@@ -1227,7 +1262,11 @@ sub add_transaction {
# # /saving the history
$form->isblank("name", $locale->text("Name missing!"));
- &{"CT::save_$form->{db}"}("", \%myconfig, \%$form);
+ if ($form->{"db"} eq "customer") {
+ CT->save_customer(\%myconfig, \%$form);
+ } else {
+ CT->save_vendor(\%myconfig, \%$form);
+ }
$form->{callback} = $form->escape($form->{callback}, 1);
$name = $form->escape("$form->{name}", 1);
@@ -1338,7 +1377,11 @@ sub save_and_close {
$imsg .= " saved!";
$form->isblank("name", $locale->text("Name missing!"));
- $rc = &{"CT::save_$form->{db}"}("", \%myconfig, \%$form);
+ if ($form->{"db"} eq "customer") {
+ $rc = CT->save_customer(\%myconfig, \%$form);
+ } else {
+ $rc = CT->save_vendor(\%myconfig, \%$form);
+ }
if ($rc == 3) {
$form->error($locale->text('customernumber not unique!'));
}
@@ -1364,7 +1407,12 @@ sub save {
$form->isblank("name", $locale->text("Name missing!"));
- my $res = &{"CT::save_$form->{db}"}("", \%myconfig, \%$form);
+ my $res;
+ if ($form->{"db"} eq "customer") {
+ $res = CT->save_customer(\%myconfig, \%$form);
+ } else {
+ $res = CT->save_customer(\%myconfig, \%$form);
+ }
if (3 == $res) {
if ($form->{"db"} eq "customer") {
@@ -1537,4 +1585,4 @@ sub get_delivery {
}
-sub continue { &{ $form->{nextsub} } }
+sub continue { call_sub($form->{nextsub}); }