X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/72eaa1a75c2b38a91ae8eeaf98319da9de3eac3a..a4b22a8f008d6431597fa80de26bcb0fa10e8d7b:/bin/mozilla/ap.pl?ds=inline diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 2cfff88d6..34b285de3 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -36,6 +36,7 @@ use SL::IR; use SL::PE; require "$form->{path}/arap.pl"; +require "bin/mozilla/common.pl"; 1; @@ -1101,6 +1102,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| @@ -1133,6 +1147,10 @@ sub search { | . $locale->text('Notes') . qq| + + | . $locale->text("Project Number") . qq| + $projectnumber + | . $locale->text('From') . qq| $button1 @@ -1197,6 +1215,8 @@ sub search { | . $locale->text('Subtotal') . qq| + + | . $locale->text('Project Number') . qq| @@ -1299,10 +1319,14 @@ sub ap_transactions { $option .= "\n
" if ($option); $option .= $locale->text('Closed'); } + if ($form->{globalproject_id}) { + $callback .= "&globalproject_id=" . E($form->{globalproject_id}); + $href .= "&globalproject_id=" . E($form->{globalproject_id}); + } - @columns = $form->sort_columns( - qw(transdate id invnumber ordnumber name netamount tax amount paid datepaid due duedate notes employee) - ); + @columns = + qw(transdate id invnumber ordnumber name netamount tax amount paid datepaid + due duedate notes employee globalprojectnumber); foreach $item (@columns) { if ($form->{"l_$item"} eq "Y") { @@ -1362,6 +1386,8 @@ sub ap_transactions { $column_header{employee} = "" . $locale->text('Employee') . ""; + $column_header{globalprojectnumber} = + qq|| . $locale->text('Project Number') . qq||; $form->{title} = $locale->text('AP Transactions'); @@ -1452,6 +1478,8 @@ sub ap_transactions { $ap->{notes} =~ s/\r\n/
/g; $column_data{notes} = "$ap->{notes} "; $column_data{employee} = "$ap->{employee} "; + $column_data{globalprojectnumber} = + "" . H($ap->{globalprojectnumber}) . ""; $i++; $i %= 2;