if ( $cust_bill_pkg->pkgnum ) {
($pkg, $setup, $recur, $sdate, $edate) = (
- $cust_bill_pkg->cust_pkg->part_pkg->pkg,
+ $cust_bill_pkg->part_pkg->pkg,
( $cust_bill_pkg->setup != 0
? sprintf("%.2f", $cust_bill_pkg->setup )
: '' ),
$cust_main->agentnum. ")";
my $agent = $agent_obj->agent;
my $pkgs = join(', ',
- map { $_->cust_pkg->part_pkg->pkg }
+ map { $_->part_pkg->pkg }
grep { $_->pkgnum } $self->cust_bill_pkg
);
$description = eval qq("$dtempl");
);
my $escape_function = $escape_functions{$format};
- my %date_formats = ( 'latex' => '%b, %o, %Y',
+ my %date_formats = ( 'latex' => '%b %o, %Y',
'html' => '%b %o, %Y',
'template' => '%s',
);
);
} elsif ( grep /\S/, $conf->config('company_address') ) {
- $returnaddress = join( "\n", $conf->config('company_address') );
-
- $returnaddress =
- join( '\\*'."\n", map s/( {2,})/'~' x length($1)/eg,
- $conf->config('company_address')
- )
- if $format eq 'latex';
+ my $convert_map = $convert_maps{$format}{'returnaddress'};
+ $returnaddress = join( "\n", &$convert_map(
+ map { s/( {2,})/'~' x length($1)/eg;
+ s/$/\\\\\*/;
+ $_
+ }
+ ( $conf->config('company_name'),
+ $conf->config('company_address'),
+ )
+ )
+ );
} else {
if ( $cust_bill_pkg->pkgnum > 0 ) {
- my $desc = $cust_bill_pkg->cust_pkg->part_pkg->classname;
+ my $desc = $cust_bill_pkg->part_pkg->classname;
$s{$desc} += $cust_bill_pkg->setup
if ( $cust_bill_pkg->setup != 0 );
my @cust_bill_pkg =
grep { $_->pkgnum &&
( defined($section)
- ? $_->cust_pkg->part_pkg->classname eq $section->{'description'}
+ ? $_->part_pkg->classname eq $section->{'description'}
: 1
)
} $self->cust_bill_pkg;