-sub select_all {
- $main::lxdebug->enter_sub();
-
- my $form = $main::form;
- my %myconfig = %main::myconfig;
- my $locale = $main::locale;
-
- RP->aging(\%myconfig, \%$form);
-
- map { $_->{checked} = "checked" } @{ $form->{AG} };
-
- &aging;
-
- $main::lxdebug->leave_sub();
-}
-
-sub e_mail {
- $::lxdebug->enter_sub;
- $::auth->assert('general_ledger');
-
- # get name and email addresses
- my $selected = 0;
- for my $i (1 .. $::form->{rowcount}) {
- next unless $::form->{"statement_$i"};
- $::form->{"$::form->{ct}_id"} = $::form->{"$::form->{ct}_id_$i"};
- RP->get_customer(\%::myconfig, $::form);
- $selected = 1;
- last;
- }
-
- $::form->error($::locale->text('Nothing selected!')) unless $selected;
-
- $::form->{media} = "email";
-
- # save all other variables
- my @hidden_values;
- for my $key (keys %$::form) {
- next if any { $key eq $_ } qw(login password action email cc bcc subject message type sendmode format header);
- next unless '' eq ref $::form->{$key};
- push @hidden_values, $key;
- }
-
- $::form->header;
- print $::form->parse_html_template('rp/e_mail', {
- print_options => print_options(inline => 1),
- hidden_values => \@hidden_values,
- });
-
- $::lxdebug->leave_sub;
-}
-