quotation reports, RT#16996
[freeside.git] / FS / FS / access_right.pm
index e6266b4..397b456 100644 (file)
@@ -152,6 +152,8 @@ sub _upgrade_data { # class method
     'Process payment' => [ 'Process credit card payment', 'Process Echeck payment' ],
     'Post refund'     => [ 'Post check refund', 'Post cash refund' ],
     'Refund payment'  => [ 'Refund credit card payment', 'Refund Echeck payment' ],
+    'Regular void'    => [ 'Void payments' ],
+    'Unvoid'          => [ 'Unvoid payments', 'Unvoid invoices' ],
   );
 
   foreach my $oldright (keys %migrate) {
@@ -174,9 +176,10 @@ sub _upgrade_data { # class method
         die $error if $error;
       }
 
-      #after the WEST stuff is sorted, etc.
-      #my $error = $old->delete;
-      #die $error if $error;
+      unless ( $oldright =~ / (payment|refund)$/ ) { #after the WEST stuff is sorted
+        my $error = $old->delete;
+        die $error if $error;
+      }
 
     }
 
@@ -193,6 +196,8 @@ sub _upgrade_data { # class method
     'Suspend customer package'            => 'Suspend customer',
     'Unsuspend customer package'          => 'Unsuspend customer',
     'New prospect'                        => 'Generate quotation',
+    'Delete invoices'                     => 'Void invoices',
+    'List invoices'                       => 'List quotations',
 
     'List services'    => [ 'Services: Accounts',
                             'Services: Domains',
@@ -261,7 +266,7 @@ sub _upgrade_data { # class method
           'rightname'   => 'Download report data',
       } );
       my $error = $access_right->insert;
-      die $error if $error;
+      warn $error if $error;
     }
 
     FS::upgrade_journal->set_done('ACL_download_report_data');