Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / FS / FS / cust_pkg.pm
index ccf63db..3bd2107 100644 (file)
@@ -947,10 +947,7 @@ sub cancel {
     }
     else {
       $error = send_email(
-        'from'    => $conf->config('invoice_from_name', $self->cust_main->agentnum) ?
-                     $conf->config('invoice_from_name', $self->cust_main->agentnum) . ' <' .
-                     $conf->config('invoice_from', $self->cust_main->agentnum) . '>' :
-                     $conf->config('invoice_from', $self->cust_main->agentnum),
+        'from'    => $conf->invoice_from_full( $self->cust_main->agentnum ),
         'to'      => \@invoicing_list,
         'subject' => ( $conf->config('cancelsubject') || 'Cancellation Notice' ),
         'body'    => [ map "$_\n", $conf->config('cancelmessage') ],
@@ -2459,6 +2456,13 @@ sub modify_charge {
 
   } # else simply ignore them; the UI shouldn't allow editing the fields
 
+  
+  if ( exists($opt{'taxclass'}) 
+          and $part_pkg->taxclass ne $opt{'taxclass'}) {
+    
+      $part_pkg->set('taxclass', $opt{'taxclass'});
+  }
+
   my $error;
   if ( $part_pkg->modified or $pkg_opt_modified ) {
     # can we safely modify the package def?