X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fam.pl;h=368a627161bddaa0d5491dfa512db952e2dd7b74;hb=4aa816112a8b9f2d2959c92cfaa2f2954bdeceb2;hp=19bb23ab298235be50fd11d32f55927fd081865c;hpb=508801bbaf7b9c5e144bf7ab9763a342ab80f176;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 19bb23ab2..368a62716 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -46,8 +46,6 @@ use SL::Printer; use CGI::Ajax; use CGI; -use Data::Dumper; - require "bin/mozilla/common.pl"; use strict; @@ -1392,17 +1390,18 @@ sub buchungsgruppe_header { } my $linkaccounts; - if (!$::lx_office_conf{system}->{eur}) { + if ( $::instance_conf->get_inventory_system eq 'perpetual' ) { # was !$::lx_office_conf{system}->{eur}) { $linkaccounts = qq| | . $locale->text('Inventory') . qq| |; - } else { + } elsif ( $::instance_conf->get_inventory_system eq 'periodic' ) { + # don't allow choice of inventory accno and don't show that line $linkaccounts = qq| {inventory_accno_id}>|; - } + }; $linkaccounts .= qq| @@ -1550,6 +1549,11 @@ sub edit_defaults { map { $form->{"defaults_${_}"} = $form->{defaults}->{$_} } keys %{ $form->{defaults} }; + # default language + my $all_languages = SL::DB::Manager::Language->get_all; + +# EÜR = cash, Bilanzierung = accrual + foreach my $key (keys %{ $form->{IC} }) { foreach my $accno (sort keys %{ $form->{IC}->{$key} }) { my $array = "ACCNOS_" . uc($key); @@ -1567,7 +1571,8 @@ sub edit_defaults { $form->{title} = $locale->text('Ranges of numbers and default accounts'); $form->header(); - print $form->parse_html_template('am/edit_defaults'); + print $form->parse_html_template('am/edit_defaults', + { ALL_LANGUAGES => $all_languages, }); $main::lxdebug->leave_sub(); } @@ -1655,14 +1660,7 @@ sub config { { 'name' => $locale->text('Queue'), 'value' => 'queue', 'selected' => $selected{queue}, }, ]; - $form->{PRINTERS} = []; - foreach my $printer (SL::Printer->all_printers(%::myconfig)) { - push @{ $form->{PRINTERS} }, { - 'name' => $printer->{printer_description}, - 'value' => $printer->{id}, - 'selected' => $printer->{id} == $myconfig{default_printer_id}, - }; - } + $form->{PRINTERS} = [ SL::Printer->all_printers(%::myconfig) ]; my %countrycodes = User->country_codes;