X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/9c8799530caff44dca79d0bdfd0ff5964c15194c..e69e3657:/bin/mozilla/ca.pl?ds=sidebyside diff --git a/bin/mozilla/ca.pl b/bin/mozilla/ca.pl index 229e43004..0558ae6ba 100644 --- a/bin/mozilla/ca.pl +++ b/bin/mozilla/ca.pl @@ -74,8 +74,14 @@ require "bin/mozilla/reportgenerator.pl"; sub chart_of_accounts { $lxdebug->enter_sub(); + $auth->assert('report'); + $form->{title} = $locale->text('Chart of Accounts'); + if ($eur) { + $form->{method} = "cash"; + } + CA->all_accounts(\%myconfig, \%$form); my @columns = qw(accno description debit credit); @@ -105,6 +111,7 @@ sub chart_of_accounts { my %totals = ('debit' => 0, 'credit' => 0); foreach my $ca (@{ $form->{CA} }) { + next unless defined $ca->{amount}; my $row = { }; foreach (qw(debit credit)) { @@ -136,8 +143,11 @@ sub chart_of_accounts { sub list { $lxdebug->enter_sub(); + $auth->assert('report'); + $form->{title} = $locale->text('List Transactions'); $form->{title} .= " - " . $locale->text('Account') . " $form->{accno}"; + $year = (localtime)[5] + 1900; # get departments $form->all_departments(\%myconfig); @@ -156,13 +166,76 @@ sub list {