X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fca.pl;h=4bef1d2ee147c0fa1ce7e3920659f8433ba2094a;hb=74959706407d96a119832a3c807ee4d4d2c53639;hp=0558ae6ba5e4249bcd0aed57f62f6b5430fb1a9e;hpb=703f76b624a9c447bf77e40db2cd3d5f3cc19e51;p=kivitendo-erp.git diff --git a/bin/mozilla/ca.pl b/bin/mozilla/ca.pl index 0558ae6ba..4bef1d2ee 100644 --- a/bin/mozilla/ca.pl +++ b/bin/mozilla/ca.pl @@ -35,10 +35,13 @@ use POSIX qw(strftime); use SL::CA; +use SL::DB::Default; use SL::ReportGenerator; require "bin/mozilla/reportgenerator.pl"; +use strict; + 1; # end of main @@ -72,13 +75,18 @@ require "bin/mozilla/reportgenerator.pl"; # $locale->text('Dec') sub chart_of_accounts { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); + + my $form = $main::form; + my %myconfig = %main::myconfig; + my $locale = $main::locale; - $auth->assert('report'); + $main::auth->assert('report'); $form->{title} = $locale->text('Chart of Accounts'); - if ($eur) { + if ( $::instance_conf->get_accounting_method eq 'cash' ) { + # $form->{method} can probably be made redundant now that we have get_accounting_method $form->{method} = "cash"; } @@ -100,6 +108,7 @@ sub chart_of_accounts { 'std_column_visibility' => 1, ); $report->set_options_from_form(); + $locale->set_numberformat_wo_thousands_separator(\%myconfig) if lc($report->{options}->{output_format}) eq 'csv'; $report->set_columns(%column_defs); $report->set_column_order(@columns); @@ -137,260 +146,50 @@ sub chart_of_accounts { $report->generate_with_headers(); - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); } sub list { - $lxdebug->enter_sub(); + $::lxdebug->enter_sub; + $::auth->assert('report'); - $auth->assert('report'); + $::form->{title} = $::locale->text('List Transactions') . " - " . $::locale->text('Account') . " $::form->{accno}" . " - " . $::form->{description}; - $form->{title} = $locale->text('List Transactions'); - $form->{title} .= " - " . $locale->text('Account') . " $form->{accno}"; - $year = (localtime)[5] + 1900; + $::form->header; + print $::form->parse_html_template('ca/list', { + year => DateTime->today->year, + }); - # get departments - $form->all_departments(\%myconfig); - if (@{ $form->{all_departments} }) { - $form->{selectdepartment} = "