X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fca.pl;h=fcff5cf335c097ec09d0fde585ff9cffc531e9a9;hb=061105807cbfb5b86b804e71db9509c996c93912;hp=dd157e0a9626bf7a71b4b2d64e52a1a336f59d9b;hpb=be6f6cfd8dc7def5356edd0c5aacb814b4baded1;p=kivitendo-erp.git diff --git a/bin/mozilla/ca.pl b/bin/mozilla/ca.pl index dd157e0a9..fcff5cf33 100644 --- a/bin/mozilla/ca.pl +++ b/bin/mozilla/ca.pl @@ -84,7 +84,8 @@ sub chart_of_accounts { $form->{title} = $locale->text('Chart of Accounts'); - if ($::lx_office_conf{system}->{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"; } @@ -148,215 +149,23 @@ sub chart_of_accounts { } sub list { - $main::lxdebug->enter_sub(); + $::lxdebug->enter_sub; + $::auth->assert('report'); - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; + $::form->{title} = $::locale->text('List Transactions') . " - " . $::locale->text('Account') . " $::form->{accno}"; - $main::auth->assert('report'); - - $form->{title} = $locale->text('List Transactions'); - $form->{title} .= " - " . $locale->text('Account') . " $form->{accno}"; - my $year = (localtime)[5] + 1900; - - # get departments - $form->all_departments(\%myconfig); - if (@{ $form->{all_departments} || [] }) { - $form->{selectdepartment} = "\n"; - - map { - $form->{selectdepartment} .= - "$_->{description}--$_->{id}\n" - } (@{ $form->{all_departments} || [] }); - } - - my $department = qq| - - | . $locale->text('Department') . qq| - $form->{selectdepartment} - -| if $form->{selectdepartment}; - my $accrual = $::lx_office_conf{system}->{eur} ? "" : "checked"; - my $cash = $::lx_office_conf{system}->{eur} ? "checked" : ""; - - my $name_1 = "fromdate"; - my $id_1 = "fromdate"; - my $value_1 = "$form->{fromdate}"; - my $trigger_1 = "trigger1"; - my $name_2 = "todate"; - my $id_2 = "todate"; - my $value_2 = ""; - my $trigger_2 = "trigger2"; - - my ($button1, $button1_2, $button2, $button2_2, $jsscript); - - # with JavaScript Calendar - if ($form->{jsscript}) { - if ($name_1 eq "") { - - $button1 = qq| - |; - $button1_2 = qq| - text('button') . qq|>|; - - #write Trigger - $jsscript = - 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|> - |; - - #write Trigger - $jsscript = - Form->write_trigger(\%myconfig, "2", "$name_1", "BR", "$trigger_1", - "$name_2", "BL", "$trigger_2"); - } - } else { - - # without JavaScript Calendar - if ($name_1 eq "") { - $button1 = - qq||; - } else { - $button1 = - qq||; - $button2 = - qq||; - } - } - $form->{javascript} .= qq||; - $form->header; my $onload = qq|focus()|; - $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; - $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; - - - $form->header; - - $form->{description} =~ s/\"/"/g; - - my $eur = $::lx_office_conf{system}->{eur}; - - print qq| - - -{script}> - -{accno}> - - - -{accounttype}> - - - - $form->{title} - - - - - - | - . $locale->text('Customized Report') . qq| - - - | . $locale->text('Year') . qq| - - -|; - - print qq| - - - | . $locale->text('Yearly') . qq| - | . $locale->text('Quarterly') . qq| - | . $locale->text('Monthly') . qq| - - - - 1. | . $locale->text('Quarter') . qq| - | . $locale->text('January') . qq| - | . $locale->text('May') . qq| - | . $locale->text('September') . qq| - - - - - 2. | . $locale->text('Quarter') . qq| - | . $locale->text('February') . qq| - | . $locale->text('June') . qq| - | . $locale->text('October') . qq| - - - - 3. | . $locale->text('Quarter') . qq| - | . $locale->text('March') . qq| - | . $locale->text('July') . qq| - | . $locale->text('November') . qq| - - - - - 4. | . $locale->text('Quarter') . qq| - | . $locale->text('April') . qq| - | . $locale->text('August') . qq| - | . $locale->text('December') . qq| - - - - - - - | . $locale->text('Free report period') . qq| - | . $locale->text('From') . qq| - $button1 - $button1_2 - | . $locale->text('Bis') . qq| - $button2 - $button2_2 - - - - - - - | . $locale->text('Method') . qq| - | . $locale->text('Accrual') . qq| - | . $locale->text('EUR') . qq| - - - | . $locale->text('Decimalplaces') . qq| - - - - | . $locale->text('Subtotal') . qq| - - -$jsscript - - - - - - - -