X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FUpgrade.pm;h=5d092ed65d298bb2e40a23643fb7af72bb8ec83e;hb=42e878b29ae26943d7dc3acfbb7f095a56ae0a2f;hp=7aa7ce37e4f6531520a2866410b9f506bef70534;hpb=d353c1f9bbfee93e96219851af27a78f56837c50;p=freeside.git diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm index 7aa7ce37e..5d092ed65 100644 --- a/FS/FS/Upgrade.pm +++ b/FS/FS/Upgrade.pm @@ -46,6 +46,22 @@ sub upgrade_config { my $conf = new FS::Conf; + if ($conf->config('invoice_from') =~ /\<(.*)\>/) { + my $realemail = $1; + $realemail =~ s/^\s*//; # remove leading spaces + $realemail =~ s/\s*$//; # remove trailing spaces + my $realname = $conf->config('invoice_from'); + $realname =~ s/\<.*\>//; # remove email address + $realname =~ s/^\s*//; # remove leading spaces + $realname =~ s/\s*$//; # remove trailing spaces + # properly quote names that contain punctuation + if (($realname =~ /[^[:alnum:][:space:]]/) && ($realname !~ /^\".*\"$/)) { + $realname = '"' . $realname . '"'; + } + $conf->set('invoice_from_name', $realname); + $conf->set('invoice_from', $realemail); + } + $conf->touch('payment_receipt') if $conf->exists('payment_receipt_email') || $conf->config('payment_receipt_msgnum'); @@ -133,6 +149,12 @@ If you need to continue using the old Form 477 report, turn on the } + # boolean tax-cust_exempt-groups-require_individual_nums is now -num_req all + if ( $conf->exists('tax-cust_exempt-groups-require_individual_nums') ) { + $conf->set('tax-cust_exempt-groups-num_req', 'all'); + $conf->delete('tax-cust_exempt-groups-require_individual_nums'); + } + } sub upgrade_overlimit_groups {