X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=c404b8b01f7a3d756e8f71dd09fde360470eae4b;hb=bb5907148eb298e2e509fa37e23dcbe63619db9d;hp=c23e85626ac8a8f5c4ba2e14167a019eb2d4a7f3;hpb=dad604abef4fbebc421e753ad5a141879faf67b9;p=freeside.git diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index c23e85626..c404b8b01 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -557,19 +557,27 @@ sub apply_payments_and_credits { } -=item generate_email PARAMHASH +=item generate_email OPTION => VALUE ... -PARAMHASH can contain the following: +Options: =over 4 -=item from => sender address, required +=item from -=item tempate => alternate template name, optional +sender address, required -=item print_text => text attachment arrayref, optional +=item tempate -=item subject => email subject, optional +alternate template name, optional + +=item print_text + +text attachment arrayref, optional + +=item subject + +email subject, optional =back @@ -1853,16 +1861,18 @@ sub print_generic { 'unitprices' => $conf->exists('invoice-unitprice'), ); + my $countrydefault = $conf->config('countrydefault') || 'US'; my $prefix = $cust_main->has_ship_address ? 'ship_' : ''; foreach ( qw( contact company address1 address2 city state zip country fax) ){ my $method = $prefix.$_; $invoice_data{"ship_$_"} = _latex_escape($cust_main->$method); } + $invoice_data{'ship_country'} = '' + if ( $invoice_data{'ship_country'} eq $countrydefault ); $invoice_data{'cid'} = $params{'cid'} if $params{'cid'}; - my $countrydefault = $conf->config('countrydefault') || 'US'; if ( $cust_main->country eq $countrydefault ) { $invoice_data{'country'} = ''; } else {