From: Sven Schöling Date: Wed, 3 Mar 2010 15:53:36 +0000 (+0100) Subject: Merge branch 'master' of ssh://lx-office/~/lx-office-erp X-Git-Tag: release-2.6.1beta1~38^2~3^2 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/eb97535311910e0172988ee93cfedf05fb5a3b26?hp=0a2567c466e3bb6b47e80a5533383f154a2fd267 Merge branch 'master' of ssh://lx-office/~/lx-office-erp --- diff --git a/SL/Form.pm b/SL/Form.pm index 715385154..f32802ca0 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2966,7 +2966,9 @@ sub lastname_used { sub current_date { $main::lxdebug->enter_sub(); - my ($self, $myconfig, $thisdate, $days) = @_; + my $self = shift; + my $myconfig = shift || \%::myconfig; + my ($thisdate, $days) = @_; my $dbh = $self->get_standard_dbh($myconfig); my $query; diff --git a/bin/mozilla/amtemplates.pl b/bin/mozilla/amtemplates.pl index 839fbf21f..63f20d45f 100644 --- a/bin/mozilla/amtemplates.pl +++ b/bin/mozilla/amtemplates.pl @@ -135,7 +135,7 @@ sub display_template_form { my %formname_setup = ( - "balance_sheet" => { "translation" => $locale->text('Balance Sheet'), "html" => 1 }, +# "balance_sheet" => { "translation" => $locale->text('Balance Sheet'), "html" => 1 }, "bin_list" => $locale->text('Bin List'), "bwa" => { "translation" => $locale->text('BWA'), "html" => 1 }, "check" => { "translation" => $locale->text('Check'), "html" => 1 }, diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 45bbb4d0b..f618c5b69 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -1112,46 +1112,40 @@ sub generate_income_statement { } sub generate_balance_sheet { - $main::lxdebug->enter_sub(); - - $main::auth->assert('report'); - - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; + $::lxdebug->enter_sub; + $::auth->assert('report'); - $form->{decimalplaces} = $form->{decimalplaces} * 1 || 2; - $form->{padding} = "  "; - $form->{bold} = ""; - $form->{endbold} = ""; - $form->{br} = "
"; + $::form->{decimalplaces} = $::form->{decimalplaces} * 1 || 2; + $::form->{padding} = "  "; + $::form->{bold} = ""; + $::form->{endbold} = ""; + $::form->{br} = "
"; - my $data = RP->balance_sheet(\%myconfig, \%$form); + my $data = RP->balance_sheet(\%::myconfig, $::form); - $form->{asofdate} = $form->current_date(\%myconfig) unless $form->{asofdate}; - $form->{period} = $locale->date(\%myconfig, $form->current_date(\%myconfig), 1); + $::form->{asofdate} ||= $::form->current_date; + $::form->{period} = $::locale->date(\%::myconfig, $::form->current_date, 1); - ($form->{department}) = split /--/, $form->{department}; + ($::form->{department}) = split /--/, $::form->{department}; # define Current Earnings account - my $padding = ($form->{l_heading}) ? $form->{padding} : ""; - push(@{ $form->{equity_account} }, $padding . $locale->text('Current Earnings')); + my $padding = $::form->{l_heading} ? $::form->{padding} : ""; + push @{ $::form->{equity_account} }, $padding . $::locale->text('Current Earnings'); - $form->{this_period} = $locale->date(\%myconfig, $form->{asofdate}, 0); - $form->{last_period} = $locale->date(\%myconfig, $form->{compareasofdate}, 0); + $::form->{this_period} = $::locale->date(\%::myconfig, $::form->{asofdate}, 0); + $::form->{last_period} = $::locale->date(\%::myconfig, $::form->{compareasofdate}, 0); - $form->{IN} = "balance_sheet.html"; +# $::form->{IN} = "balance_sheet.html"; # setup company variables for the form - map { $form->{$_} = $myconfig{$_}; } (qw(company address businessnumber nativecurr)); + map { $::form->{$_} = $::myconfig{$_} } qw(company address businessnumber nativecurr); - $form->{templates} = $myconfig{templates}; + $::form->{templates} = $::myconfig{templates}; - $form->header(); - print $form->parse_html_template('rp/balance_sheet', $data); -# $form->parse_template(); + $::form->header; + print $::form->parse_html_template('rp/balance_sheet', $data); - $main::lxdebug->leave_sub(); + $::lxdebug->leave_sub; } sub generate_projects { @@ -2715,7 +2709,7 @@ sub generate_bwa { } } else { # die konvertierungen nur dann durchführen, wenn auch daten gesetzt sind. - # ansonsten ist die prüfung in RP.pm + # ansonsten ist die prüfung in RP.pm # if (defined ($form->{fromdate|todate}=='..')) # immer wahr if ($form->{fromdate}){