X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=152db9572a278041d02d2d740bbea0502eacf6cb;hb=98ad02ca3b8d9e9c00775b4768e7060388efbed1;hp=034fa4f893969c3b580c129c190f2dd26f2977b9;hpb=8c0a8805fea741b5a7befd2601b49d86c4a0e612;p=kivitendo-erp.git
diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl
index 034fa4f89..152db9572 100644
--- a/bin/mozilla/rp.pl
+++ b/bin/mozilla/rp.pl
@@ -36,9 +36,11 @@
#======================================================================
require "$form->{path}/arap.pl";
+require "bin/mozilla/common.pl";
use SL::PE;
use SL::RP;
+use SL::USTVA;
1;
@@ -130,6 +132,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 +297,7 @@ $jsscript
print qq|
| . $locale->text('Project') . qq| |
-
+ | $projectnumber |
@@ -390,7 +407,7 @@ $jsscript
print qq|
| . $locale->text('Project') . qq| |
-
+ | $projectnumber |
@@ -687,8 +704,6 @@ $jsscript
}
if ($form->{report} =~ /^tax_/) {
- $gifi = "";
-
$form->{db} = ($form->{report} =~ /_collected/) ? "ar" : "ap";
RP->get_taxaccounts(\%myconfig, \%$form);
@@ -725,32 +740,6 @@ $jsscript
-|;
-
- if (@{ $form->{gifi_taxaccounts} }) {
- print qq|
-
- | . $locale->text('GIFI') . qq| |
-
-|;
-
- foreach $ref (@{ $form->{gifi_taxaccounts} }) {
-
- print
- qq| $ref->{description}
-
-
- |;
-
- }
-
- print qq|
- |
-
-|;
- }
-
- print qq|
| . $locale->text('Method') . qq| |
|
@@ -807,8 +796,6 @@ $jsscript
}
if ($form->{report} =~ /^nontaxable_/) {
- $gifi = "";
-
$form->{db} = ($form->{report} =~ /_sales/) ? "ar" : "ap";
print qq|
@@ -872,8 +859,6 @@ $jsscript
}
if (($form->{report} eq "ar_aging") || ($form->{report} eq "ap_aging")) {
- $gifi = "";
-
if ($form->{report} eq 'ar_aging') {
$label = $locale->text('Customer');
$form->{vc} = 'customer';
@@ -922,8 +907,6 @@ $jsscript
# above action can be removed if there is more than one input field
if ($form->{report} =~ /(receipts|payments)$/) {
- $gifi = "";
-
$form->{db} = ($form->{report} =~ /payments$/) ? "ap" : "ar";
RP->paymentaccounts(\%myconfig, \%$form);
@@ -1001,9 +984,8 @@ $jsscript
. $locale->text('Continue') . qq|">
|;
- # Hier Aufruf von get_config aus bin/mozilla/fa.pl zum
- # Einlesen der Finanzamtdaten
- get_config($userspath, 'finanzamt.ini');
+ # Hier Aufruf von get_config zum Einlesen der Finanzamtdaten
+ USTVA->get_config($userspath, 'finanzamt.ini');
$disabled = qq|disabled="disabled"|;
$disabled = '' if ($form->{elster} eq '1');
@@ -1062,10 +1044,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
@@ -1253,7 +1231,8 @@ sub generate_balance_sheet {
$form->{IN} = "balance_sheet.html";
# setup company variables for the form
- map { $form->{$_} = $myconfig{$_} }
+ map { $form->{$_} = $myconfig{$_};
+ $form->{$_} =~ s/\\n/\n/g; }
(qw(company address businessnumber nativecurr));
$form->{templates} = $myconfig{templates};
@@ -1345,11 +1324,6 @@ sub list_accounts {
$column_header{endbalance} =
qq| | | . $locale->text('Balance') . qq| | |;
- if ($form->{accounttype} eq 'gifi') {
- $column_header{accno} =
- qq|| . $locale->text('GIFI') . qq| | |;
- }
-
$form->header;
print qq|
@@ -1380,15 +1354,7 @@ sub list_accounts {
$description = $form->escape($ref->{description});
$href =
- qq|ca.pl?path=$form->{path}&action=list_transactions&accounttype=$form->{accounttype}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&sort=transdate&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&eur=$form->{eur}&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title&nextsub=$form->{nextsub}|;
-
- if ($form->{accounttype} eq 'gifi') {
- $href .= "&gifi_accno=$ref->{accno}&gifi_description=$description";
- $na = $locale->text('N/A');
- map { $ref->{$_} = $na } qw(accno description) unless $ref->{accno};
- } else {
- $href .= "&accno=$ref->{accno}&description=$description";
- }
+ qq|ca.pl?path=$form->{path}&action=list_transactions&accounttype=$form->{accounttype}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&sort=transdate&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&eur=$form->{eur}&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title&nextsub=$form->{nextsub}&accno=$ref->{accno}&description=$description|;
$ml = ($ref->{category} =~ /(A|C|E)/) ? -1 : 1;
@@ -1850,16 +1816,10 @@ sub aging {
-|;
- }
-
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
+ . $locale->text('E-mail') . qq|">|;
+}
- print qq|
+print qq|