X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Frp.pl;h=da1a265acbd80c2ac2ca30d80345e0cb1b874b54;hb=3f0ba2ba4caabdc8fc3191c5cbd0aba13a8643cb;hp=32ec6efb0073ab1bce035eff4fa29404bf93c067;hpb=6c12abf7e504250dcb0d43a91e7127edf8525b39;p=kivitendo-erp.git
diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl
index 32ec6efb0..da1a265ac 100644
--- a/bin/mozilla/rp.pl
+++ b/bin/mozilla/rp.pl
@@ -35,10 +35,13 @@
#
#======================================================================
-require "$form->{path}/arap.pl";
+require "bin/mozilla/arap.pl";
+require "bin/mozilla/common.pl";
use SL::PE;
use SL::RP;
+use SL::USTVA;
+use SL::Iconv;
1;
@@ -108,9 +111,7 @@ sub report {
$accrual = ($eur) ? "" : "checked";
$cash = ($eur) ? "checked" : "";
- ($null, $null, $null, $null, $null, $year, $null, $null, $null) =
- localtime();
- $year += 1900;
+ $year = (localtime)[5] + 1900;
# get departments
$form->all_departments(\%myconfig);
@@ -130,8 +131,23 @@ 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;
+ $form->{jsscript} = 1;
$jsscript = "";
if ($form->{report} eq "ustva") {
$department = "";
@@ -183,7 +199,7 @@ sub report {
if ($name_1 eq "") {
$button1 = qq|
- |;
+ |;
$button1_2 = qq|
text('button') . qq|>|;
@@ -193,12 +209,12 @@ sub report {
Form->write_trigger(\%myconfig, "1", "$name_2", "BR", "$trigger_2");
} else {
$button1 = qq|
- |;
+ |;
$button1_2 = qq|
text('button') . qq|>|;
$button2 = qq|
- |;
+ |;
$button2_2 = qq|
text('button') . qq|>
@@ -214,19 +230,21 @@ sub report {
# without JavaScript Calendar
if ($name_1 eq "") {
$button1 =
- qq||;
+ qq||;
} else {
$button1 =
- qq||;
+ qq||;
$button2 =
- qq||;
+ qq||;
}
}
-
+ $form->{javascript} .= qq||;
$form->header;
-
+ $onload = qq|focus()|;
+ $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
+ $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
print qq|
-
+
@@ -1947,66 +1840,6 @@ sub select_all {
$lxdebug->leave_sub();
}
-sub print_options {
- $lxdebug->enter_sub();
-
- $form->{sendmode} = "attachment";
- $form->{copies} = 2 unless $form->{copies};
-
- $form->{PD}{ $form->{type} } = "selected";
- $form->{DF}{ $form->{format} } = "selected";
- $form->{OP}{ $form->{media} } = "selected";
- $form->{SM}{ $form->{sendmode} } = "selected";
-
- $type = qq|
-