- my @invoicing_list = $opt{'invoicing_list'}
- ? split( /\s*\,\s*/, $opt{'invoicing_list'} )
- : $cust_main->invoicing_list;
- push @invoicing_list, 'POST' if $opt{'postal_invoicing'};
-
+ my @invoicing_list;
+ if ( exists $opt{'invoicing_list'} || exists $opt{'postal_invoicing'} ) {
+ @invoicing_list = split( /\s*\,\s*/, $opt{'invoicing_list'} );
+ push @invoicing_list, 'POST' if $opt{'postal_invoicing'};
+ } else {
+ @invoicing_list = $cust_main->invoicing_list;
+ }
+