+ my $conf = new FS::Conf;
+ my $money_char = $conf->config('money_char') || '$';
+
+ my $html_init = join("\n", map {
+ ( my $action = $_ ) =~ s/_$//;
+ include('/elements/progress-init.html',
+ $_.'form',
+ [ 'begin', 'end', 'agentnum', 'open', 'days', 'newest_percust' ],
+ "../misc/${_}invoices.cgi",
+ { 'message' => "Invoices re-${action}ed" }, #would be nice to show the number of them, but...
+ $_, #key
+ ),
+ qq!<FORM NAME="${_}form">!,
+ qq!<INPUT TYPE="hidden" NAME="begin" VALUE="$begin">!,
+ qq!<INPUT TYPE="hidden" NAME="end" VALUE="$end">!,
+ qq!<INPUT TYPE="hidden" NAME="agentnum" VALUE="$agentnum">!,
+ qq!<INPUT TYPE="hidden" NAME="open" VALUE="$open">!,
+ qq!<INPUT TYPE="hidden" NAME="days" VALUE="$days">!,
+ qq!</FORM>!
+ } qw( print_ email_ fax_ ) );
+
+ my $menubar = [
+ 'Main menu' => $p,
+ 'Print these invoices' =>
+ "javascript:print_process()",
+ 'Email these invoices' =>
+ "javascript:email_process()",
+ ];
+
+ push @$menubar, 'Fax these invoices' =>
+ "javascript:fax_process()"
+ if $conf->exists('hylafax');
+