summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Conf.pm4
-rw-r--r--FS/FS/Template_Mixin.pm9
2 files changed, 10 insertions, 3 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 16cf757c9..aee741006 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -1555,8 +1555,8 @@ and customer address. Include units.',
{
'key' => 'invoice_latexverticalreturnaddress',
- 'section' => 'invoicing',
- 'description' => 'Place the return address under the company logo rather than beside it.',
+ 'section' => 'deprecated',
+ 'description' => 'Deprecated. With old invoice_latex template, places the return address under the company logo rather than beside it.',
'type' => 'checkbox',
'per_agent' => 1,
},
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 775cc3d72..04ea1eb99 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -1666,6 +1666,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"
@@ -2383,7 +2390,7 @@ sub postal_mail_fsinc {
die "Unparsable company_address; contact support\@freeside.biz\n";
}
- 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 });