X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fam.pl;h=99c097bfba187f65cca073433e623c49db155e07;hb=273b5e046f1dab732ece657a756ada58d7669b9d;hp=e12c1ea51b9b18e77913b2018c81d586943dfae0;hpb=e90048c8180f32f52f3f12ee52eb7269c4b27fcf;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index e12c1ea51..99c097bfb 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -790,153 +790,6 @@ sub delete_language { $main::lxdebug->leave_sub(); } - -sub add_buchungsgruppe { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; - - $main::auth->assert('config'); - - # $locale->text("Add Buchungsgruppe") - # $locale->text("Edit Buchungsgruppe") - $form->{title} = "Add"; - - $form->{callback} = "am.pl?action=add_buchungsgruppe" unless $form->{callback}; - - AM->get_buchungsgruppe(\%myconfig, \%$form); - $form->{"inventory_accno_id"} = $form->{"std_inventory_accno_id"}; - for (my $i = 0; 4 > $i; $i++) { - map({ $form->{"${_}_accno_id_$i"} = $form->{"std_${_}_accno_id"}; } - qw(income expense)); - } - - &buchungsgruppe_header; - &form_footer; - - $main::lxdebug->leave_sub(); -} - -sub edit_buchungsgruppe { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my %myconfig = %main::myconfig; - - $main::auth->assert('config'); - - $form->{title} = "Edit"; - - AM->get_buchungsgruppe(\%myconfig, \%$form); - - &buchungsgruppe_header; - - &form_footer; - - $main::lxdebug->leave_sub(); -} - -sub list_buchungsgruppe { - $::lxdebug->enter_sub; - $::auth->assert('config'); - - AM->buchungsgruppe(\%::myconfig, $::form); - - $::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&|, - }); - - $::lxdebug->leave_sub; -} - -sub buchungsgruppe_header { - $::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, - ); - - for my $key (keys %acc_type_map) { - for my $ref (@{ $::form->{IC_links}{$key} }) { - $acc_type_map{$key}{$ref->{id}} = $ref; - } - } - - my %sorted_accounts = map { - $_ => [ sort { $a->{accno} cmp $b->{accno} } values %{ $acc_type_map{$_} } ], - } keys %acc_type_map; - - $::form->header; - print $::form->parse_html_template('am/buchungsgruppe_header', { - accounts => \%sorted_accounts, - account_label => sub { "$_[0]{accno}--$_[0]{description}" }, - }); - - $::lxdebug->leave_sub; -} - -sub save_buchungsgruppe { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; - - $main::auth->assert('config'); - - $form->isblank("description", $locale->text('Description missing!')); - - AM->save_buchungsgruppe(\%myconfig, \%$form); - $form->redirect($locale->text('Accounting Group saved!')); - - $main::lxdebug->leave_sub(); -} - -sub delete_buchungsgruppe { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; - - $main::auth->assert('config'); - - AM->delete_buchungsgruppe(\%myconfig, \%$form); - $form->redirect($locale->text('Accounting Group deleted!')); - - $main::lxdebug->leave_sub(); -} - -sub swap_buchungsgruppen { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my %myconfig = %main::myconfig; - - $main::auth->assert('config'); - - AM->swap_sortkeys(\%myconfig, $form, "buchungsgruppen"); - list_buchungsgruppe(); - - $main::lxdebug->leave_sub(); -} - sub _build_cfg_options { my $form = $main::form; my %myconfig = %main::myconfig; @@ -1022,7 +875,7 @@ sub config { } $form->{STYLESHEETS} = []; - foreach my $item (qw(lx-office-erp.css Mobile.css kivitendo.css)) { + foreach my $item (qw(lx-office-erp.css kivitendo.css)) { push @{ $form->{STYLESHEETS} }, { 'name' => $item, 'value' => $item, @@ -1037,6 +890,9 @@ sub config { $form->{title} = $locale->text('Edit Preferences for #1', $form->{login}); $form->header(); + + $form->{full_signature} = $form->create_email_signature(); + print $form->parse_html_template('am/config'); $main::lxdebug->leave_sub();