X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fam.pl;h=28b1a52285ce0a2f7dd464dc6efb4a42c000d38e;hb=c2b72147f7142b47a49a6449db47046d5de3edf0;hp=77b8e4d607742e4f9fecddfdd8fc6df9312e5c6f;hpb=fb6468fcbb2662efb5f7490867417b735feb4d8a;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 77b8e4d60..28b1a5228 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -633,48 +633,17 @@ sub list_lead { } sub lead_header { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my $locale = $main::locale; - - $main::auth->assert('config'); - - $form->{title} = $locale->text("$form->{title} Lead"); + $::lxdebug->enter_sub; + $::auth->assert('config'); # $locale->text('Add Lead') # $locale->text('Edit Lead') + $::form->{title} = $::locale->text("$::form->{title} Lead"); - $form->{description} =~ s/\"/"/g; - - my $description = - qq||; - - $form->header; - - print qq| -
- - + $::form->{callback} = "am.pl?action=list_buchungsgruppe"; + $::form->{title} = $::locale->text('Buchungsgruppen'); + $::form->header; - - -|; + print $::form->parse_html_template('am/buchungsgruppe_list', { + swap_link => qq|am.pl?action=swap_buchungsgruppen&|, + }); - $main::lxdebug->leave_sub(); + $::lxdebug->leave_sub; } sub buchungsgruppe_header { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my $locale = $main::locale; - - $main::auth->assert('config'); - - $form->{title} = $locale->text("$form->{title} Buchungsgruppe"); + $::lxdebug->enter_sub; + $::auth->assert('config'); # $locale->text('Add Accounting Group') # $locale->text('Edit Accounting Group') + $::form->{title} = $::locale->text("$::form->{title} Buchungsgruppe"); my ($acc_inventory, $acc_income, $acc_expense) = ({}, {}, {}); my %acc_type_map = ( - "IC" => $acc_inventory, - "IC_income" => $acc_income, - "IC_sale" => $acc_income, - "IC_expense" => $acc_expense, - "IC_cogs" => $acc_expense, - ); + IC => $acc_inventory, + IC_income => $acc_income, + IC_sale => $acc_income, + IC_expense => $acc_expense, + IC_cogs => $acc_expense, + ); - foreach my $key (keys(%acc_type_map)) { - foreach my $ref (@{ $form->{IC_links}{$key} }) { - $acc_type_map{$key}->{$ref->{"id"}} = $ref; + for my $key (keys %acc_type_map) { + for my $ref (@{ $::form->{IC_links}{$key} }) { + $acc_type_map{$key}{$ref->{id}} = $ref; } } - foreach my $type (qw(IC IC_income IC_expense)) { - $form->{"select$type"} = - join("", - map({ "" } - sort({ $a->{"accno"} cmp $b->{"accno"} } - values(%{$acc_type_map{$type}})))); - } - - if ($form->{id}) { - $form->{selectIC} =~ s/selected//g; - $form->{selectIC} =~ s/ value=\Q$form->{inventory_accno_id}\E/ value=$form->{inventory_accno_id} selected/; - $form->{selectIC_income} =~ s/selected//g; - $form->{selectIC_income} =~ s/ value=\Q$form->{income_accno_id_0}\E/ value=$form->{income_accno_id_0} selected/; - $form->{selectIC_expense} =~ s/selected//g; - $form->{selectIC_expense} =~ s/ value=\Q$form->{expense_accno_id_0}\E/ value=$form->{expense_accno_id_0} selected/; - } - - my $linkaccounts; - if ( $::instance_conf->get_inventory_system eq 'perpetual' ) { # was !$::lx_office_conf{system}->{eur}) { } - $linkaccounts = qq| -