X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FTemplate_Mixin.pm;h=34e9e6ef80087681dbae9622dcc426a3af17e5dc;hb=30fabfe8ce8c9a48fa96c6a50d48b32161b1680f;hp=b9514fee1d31a5e2fe94396785c2b53e4992395c;hpb=9b69e985d204fea71a283d32ca607c9b4be2f1c5;p=freeside.git diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index b9514fee1..34e9e6ef8 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -2513,6 +2513,11 @@ use MIME::Base64; sub postal_mail_fsinc { my ( $self, %opt ) = @_; + if ( $FS::Misc::DISABLE_PRINT ) { + warn 'postal_mail_fsinc() disabled by $FS::Misc::DISABLE_PRINT' if $DEBUG; + return; + } + my $url = 'https://ws.freeside.biz/print'; my $cust_main = $self->cust_main; @@ -3139,7 +3144,9 @@ sub _items_fee { my @cust_bill_pkg = grep { $_->feepart } $self->cust_bill_pkg; my $escape_function = $options{escape_function}; - my $locale = $self->cust_main->locale; + my $locale = $self->cust_main + ? $self->cust_main->locale + : $self->prospect_main->locale; my @items; foreach my $cust_bill_pkg (@cust_bill_pkg) {