X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Foe.pl;h=3baa8799f09f70fb1a73e4cde5bf0328ce6c168f;hb=ebef09a8bde1d401fc7b0d60cfe09393e9a84c0f;hp=e2fb8a2aaeada8b5f6363e9ef7614d59c037a998;hpb=59f8f1fad78635c084328f8bf726f107cbb5bba2;p=kivitendo-erp.git
diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl
index e2fb8a2aa..3baa8799f 100644
--- a/bin/mozilla/oe.pl
+++ b/bin/mozilla/oe.pl
@@ -407,11 +407,15 @@ sub form_header {
#quote select[customer|vendor] Bug 133
$form->{"select$form->{vc}"} = $form->quote($form->{"select$form->{vc}"});
+ my @old_project_ids = ($form->{"globalproject_id"});
+ map({ push(@old_project_ids, $form->{"project_id_$_"})
+ if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"}));
+
$form->get_lists("contacts" => "ALL_CONTACTS",
"shipto" => "ALL_SHIPTO",
"projects" => { "key" => "ALL_PROJECTS",
"all" => 0,
- "old_id" => $form->{"globalproject_id"} });
+ "old_id" => \@old_project_ids });
my (%labels, @values);
foreach my $item (@{ $form->{"ALL_CONTACTS"} }) {
@@ -420,8 +424,8 @@ sub form_header {
($item->{"cp_abteilung"} ? " ($item->{cp_abteilung})" : "");
}
my $contact =
- $cgi->popup_menu('-name' => 'cp_id', '-values' => \@values,
- '-labels' => \%labels, '-default' => $form->{"cp_id"});
+ NTI($cgi->popup_menu('-name' => 'cp_id', '-values' => \@values,
+ '-labels' => \%labels, '-default' => $form->{"cp_id"}));
%labels = ();
@values = ("");
@@ -431,6 +435,13 @@ sub form_header {
$item->{"shiptoname"} . " " . $item->{"shiptodepartment_1"};
}
+ my $shipto = qq|
+
| . $locale->text('Shipping Address') . qq| |
+ | .
+ NTI($cgi->popup_menu('-name' => 'shipto_id', '-values' => \@values,
+ '-labels' => \%labels, '-default' => $form->{"shipto_id"}))
+ . qq| | |;
+
%labels = ();
@values = ("");
foreach my $item (@{ $form->{"ALL_PROJECTS"} }) {
@@ -438,16 +449,9 @@ sub form_header {
$labels{$item->{"id"}} = $item->{"projectnumber"};
}
my $globalprojectnumber =
- $cgi->popup_menu('-name' => 'globalproject_id', '-values' => \@values,
- '-labels' => \%labels,
- '-default' => $form->{"globalproject_id"});
-
- my $shipto = qq|
- | . $locale->text('Shipping Address') . qq| |
- | .
- $cgi->popup_menu('-name' => 'shipto_id', '-values' => \@values,
- '-labels' => \%labels, '-default' => $form->{"shipto_id"})
- . qq| | |;
+ NTI($cgi->popup_menu('-name' => 'globalproject_id', '-values' => \@values,
+ '-labels' => \%labels,
+ '-default' => $form->{"globalproject_id"}));
$form->{exchangerate} =
$form->format_amount(\%myconfig, $form->{exchangerate});
@@ -1127,8 +1131,6 @@ sub update {
&check_name($form->{vc});
- &check_project;
-
$buysell = 'buy';
$buysell = 'sell' if ($form->{vc} eq 'vendor');
$form->{exchangerate} = $exchangerate
@@ -1373,6 +1375,19 @@ sub search {
| |;
}
+ $form->get_lists("projects" => { "key" => "ALL_PROJECTS",
+ "all" => 1 });
+
+ my %labels = ();
+ my @values = ("");
+ foreach my $item (@{ $form->{"ALL_PROJECTS"} }) {
+ push(@values, $item->{"id"});
+ $labels{$item->{"id"}} = $item->{"projectnumber"};
+ }
+ my $projectnumber =
+ NTI($cgi->popup_menu('-name' => 'project_id', '-values' => \@values,
+ '-labels' => \%labels));
+
$form->header;
print qq|
@@ -1397,6 +1412,10 @@ sub search {
$ordlabel |
|
+
+ | . $locale->text("Project Number") . qq| |
+ $projectnumber |
+
| . $locale->text('From') . qq| |
$button1
@@ -1424,6 +1443,7 @@ sub search {
$employee |
|
. $locale->text('Ship via') . qq| |
+ $employee |
|
@@ -1432,6 +1452,8 @@ sub search {
. $locale->text('Tax') . qq| |
|
. $locale->text('Total') . qq| |
+ |
+ . $locale->text('Project Number') . qq| |
|
@@ -1497,8 +1519,8 @@ sub orders {
@columns =
$form->sort_columns("transdate", "reqdate", "id", "$ordnumber",
"name", "netamount", "tax", "amount",
- "curr", "employee", "shipvia", "open",
- "closed", "delivered");
+ "curr", "employee", "shipvia", "globalprojectnumber",
+ "open", "closed", "delivered");
$form->{l_open} = $form->{l_closed} = "Y"
if ($form->{open} && $form->{closed});
@@ -1582,6 +1604,8 @@ sub orders {
qq| | |
. $locale->text('Ship via')
. qq| | |;
+ $column_header{globalprojectnumber} =
+ qq|| . $locale->text('Project Number') . qq| | |;
$column_header{open} =
qq|| . $locale->text('O') . qq| | |;
$column_header{closed} =
@@ -1698,6 +1722,7 @@ sub orders {
$column_data{employee} = "$oe->{employee} | ";
$column_data{shipvia} = "$oe->{shipvia} | ";
+ $column_data{globalprojectnumber} = "" . H($oe->{globalprojectnumber}) . " | ";
if ($oe->{closed}) {
$column_data{closed} = "X | ";