X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=966df6e025f5132cf60b4d44561dd9d5a5892475;hb=9d0ebf2831c46d1be13fb79cb3627a05f6681376;hp=47d6d4b645f1c8621fa08892bb09412420b0a67f;hpb=9324ddb241ed8818d2067b76a2a3fdaf6a1c90ba;p=kivitendo-erp.git
diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl
index 47d6d4b64..966df6e02 100644
--- a/bin/mozilla/rp.pl
+++ b/bin/mozilla/rp.pl
@@ -36,6 +36,7 @@
#======================================================================
require "$form->{path}/arap.pl";
+require "bin/mozilla/common.pl";
use SL::PE;
use SL::RP;
@@ -130,6 +131,21 @@ sub report {
| if $form->{selectdepartment};
+ $form->get_lists("projects" => { "key" => "ALL_PROJECTS",
+ "all" => 1 });
+
+ my %project_labels = ();
+ my @project_values = ("");
+ foreach my $item (@{ $form->{"ALL_PROJECTS"} }) {
+ push(@project_values, $item->{"id"});
+ $project_labels{$item->{"id"}} = $item->{"projectnumber"};
+ }
+
+ my $projectnumber =
+ NTI($cgi->popup_menu('-name' => "project_id",
+ '-values' => \@project_values,
+ '-labels' => \%project_labels));
+
# use JavaScript Calendar or not
$form->{jsscript} = $jscalendar;
$jsscript = "";
@@ -280,7 +296,7 @@ $jsscript
print qq|
| . $locale->text('Project') . qq| |
-
+ | $projectnumber |
@@ -390,7 +406,7 @@ $jsscript
print qq|
| . $locale->text('Project') . qq| |
-
+ | $projectnumber |
@@ -1062,10 +1078,6 @@ sub generate_income_statement {
$form->{endbold} = "";
$form->{br} = "
";
- &get_project(generate_income_statement);
-
- $form->{projectnumber} = $form->{projectnumber_1};
-
if ($form->{reporttype} eq "custom") {
#forgotten the year --> thisyear
@@ -2114,7 +2126,13 @@ sub print_form {
}
}
}
-
+ # saving the history
+ if(!exists $form->{addition} && $form->{id} ne "") {
+ $form->{addition} = "PRINTED";
+ $form->{what_done} = $form->{type};
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
$lxdebug->leave_sub();
}
@@ -2127,10 +2145,10 @@ sub statement_details {
push @{ $form->{duedate} }, $ref->{duedate};
foreach $item (qw(c0 c30 c60 c90)) {
- eval {
+ if ($ref->{exchangerate} * 1) {
$ref->{$item} =
$form->round_amount($ref->{$item} / $ref->{exchangerate}, 2);
- };
+ }
$form->{"${item}total"} += $ref->{$item};
$form->{total} += $ref->{$item};
push @{ $form->{$item} },
@@ -2714,8 +2732,6 @@ sub generate_bwa {
$form->{endbold} = "";
$form->{br} = "
";
- # &get_project(generate_bwa);
-
if ($form->{reporttype} eq "custom") {
#forgotten the year --> thisyear