summaryrefslogtreecommitdiff
path: root/FS/FS/Template_Mixin.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2016-03-27 01:19:41 -0700
committerIvan Kohler <ivan@freeside.biz>2016-03-27 01:19:41 -0700
commit4d2467d2b8c2134f8cab6907c675a9c4f56472ed (patch)
tree23f49c075cae1b8aaa0d7119dd51004e4ab4eaba /FS/FS/Template_Mixin.pm
parentd8036c151e9706250765dc52eddd1e587df8f710 (diff)
freeside inc. web services for address normalizaion and printing, RT#33849
Diffstat (limited to 'FS/FS/Template_Mixin.pm')
-rw-r--r--FS/FS/Template_Mixin.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index f92a5646c..6974f7da3 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -1669,6 +1669,13 @@ sub print_generic {
} else { # this is where we actually create the invoice
+ if ( $params{no_addresses} ) {
+ delete $invoice_data{$_} foreach qw(
+ payname company address1 address2 city state zip country
+ );
+ $invoice_data{returnaddress} = '~';
+ }
+
warn "filling in template for invoice ". $self->invnum. "\n"
if $DEBUG;
warn join("\n", map " $_ => ". $invoice_data{$_}, keys %invoice_data). "\n"
@@ -2396,7 +2403,7 @@ sub postal_mail_fsinc {
}
$company_city =~ s/,$//;
- my $file = $self->print_pdf(%opt);
+ my $file = $self->print_pdf(%opt, 'no_addresses' => 1);
my $pages = CAM::PDF->new($file)->numPages;
my $ua = LWP::UserAgent->new( 'ssl_opts' => { 'verify_hostname'=>0 });