projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix quotations, RT#21103
[freeside.git]
/
FS
/
FS
/
Template_Mixin.pm
diff --git
a/FS/FS/Template_Mixin.pm
b/FS/FS/Template_Mixin.pm
index
0d0fbfb
..
7d8135d
100644
(file)
--- a/
FS/FS/Template_Mixin.pm
+++ b/
FS/FS/Template_Mixin.pm
@@
-122,7
+122,9
@@
sub print_latex {
UNLINK => 0,
) or die "can't open temp file: $!\n";
UNLINK => 0,
) or die "can't open temp file: $!\n";
- my $agentnum = $self->cust_main->agentnum;
+ my $cust_main = $self->cust_main;
+ my $prospect_main = $self->prospect_main;
+ my $agentnum = $cust_main ? $cust_main->agentnum : $prospect_main->agentnum;
if ( $template && $conf->exists("logo_${template}.eps", $agentnum) ) {
print $lh $conf->config_binary("logo_${template}.eps", $agentnum)
if ( $template && $conf->exists("logo_${template}.eps", $agentnum) ) {
print $lh $conf->config_binary("logo_${template}.eps", $agentnum)
@@
-2049,6
+2051,11
@@
separate quantities, for some reason).
=cut
=cut
+sub _items_nontax {
+ my $self = shift;
+ grep { $_->pkgnum } $self->cust_bill_pkg;
+}
+
sub _items_pkg {
my $self = shift;
my %options = @_;
sub _items_pkg {
my $self = shift;
my %options = @_;
@@
-2056,7
+2063,7
@@
sub _items_pkg {
warn "$me _items_pkg searching for all package line items\n"
if $DEBUG > 1;
warn "$me _items_pkg searching for all package line items\n"
if $DEBUG > 1;
- my @cust_bill_pkg =
grep { $_->pkgnum } $self->cust_bill_pkg
;
+ my @cust_bill_pkg =
$self->_items_nontax
;
warn "$me _items_pkg filtering line items\n"
if $DEBUG > 1;
warn "$me _items_pkg filtering line items\n"
if $DEBUG > 1;