remove payment deletion, RT#37908
authorIvan Kohler <ivan@freeside.biz>
Tue, 29 Sep 2015 03:21:12 +0000 (20:21 -0700)
committerIvan Kohler <ivan@freeside.biz>
Tue, 29 Sep 2015 03:21:12 +0000 (20:21 -0700)
FS/FS/AccessRight.pm
httemplate/view/cust_main/payment_history.html
httemplate/view/cust_main/payment_history/payment.html

index 3f2c0f3..95cf29a 100644 (file)
@@ -209,7 +209,6 @@ tie my %rights, 'Tie::IxHash',
     { rightname=>'Process payment', desc=>'Process credit card or e-check payments' },
     'Process credit card payment',
     'Process Echeck payment',
-    { rightname=>'Delete payment', desc=>'Enable deletion of unclosed payments. Be very careful!  Only delete payments that were data-entry errors, not adjustments.' }, #aka. deletepayments Optionally specify one or more comma-separated email addresses to be notified when a payment is deleted.
   ],
   
   ###
@@ -223,7 +222,6 @@ tie my %rights, 'Tie::IxHash',
     'Void credit', #NEWER than things marked NEWNEWNEW
     'Unvoid credit', #NEWER than things marked NEWNEWNEW
     { rightname=>'Unapply credit', desc=>'Enable "unapplication" of unclosed credits.' }, #aka unapplycredits
-    { rightname=>'Delete credit', desc=>'Enable deletion of unclosed credits. Be very careful!  Only delete credits that were data-entry errors, not adjustments.' },
     'View refunds',
     { rightname=>'Post refund', desc=>'Enable posting of check and cash refunds.' },
     'Post check refund',
@@ -441,8 +439,6 @@ Most (but not all) right names.
 sub default_superuser_rights {
   my $class = shift;
   my %omit = map { $_=>1 } (
-    'Delete payment',
-    'Delete credit', #?
     'Delete refund', #?
     'Edit customer package dates',
     'Time queue',
index c855595..d81fe99 100644 (file)
@@ -230,7 +230,7 @@ my %opt = (
         'Apply payment', 'Refund credit card payment', 'Refund Echeck payment',
         'Post refund', 'Post check refund', 'Post cash refund ', 'Refund payment',
         'Credit card void', 'Echeck void', 'Void payments', 'Unvoid payments',
-        'Delete payment', 'Unapply payment',
+        'Unapply payment',
         'Apply credit', 'Unapply credit', 'Void credit', 'Unvoid credit',
         'Delete refund',
         'Billing event reports', 'View customer billing events',
index 0ed2f80..fd336b8 100644 (file)
@@ -1,5 +1,5 @@
 <% $payment. ' '.  $info. $desc.
-   $view. $change_pkg. $apply. $refund. $void. $delete. $unapply
+   $view. $change_pkg. $apply. $refund. $void. $unapply
 %>
 <%init>
 
@@ -185,16 +185,6 @@ $void = areyousure_link("${p}misc/void-cust_pay.cgi?".$cust_pay->paynum,
        || ( $cust_pay->payby !~ /^(CARD|CHEK)$/ && $opt{'Void payments'}    )
      );
 
-my $delete = '';
-$delete = areyousure_link("${p}misc/delete-cust_pay.cgi?".$cust_pay->paynum,
-                            emt('Are you sure you want to delete this payment?'),
-                            emt('Delete this payment from the database completely - not recommended'),
-                            emt('delete')
-                         )
-  if $cust_pay->closed !~ /^Y/i
-  && $opt{'deletepayments'}
-  && $opt{'Delete payment'};
-
 my $unapply = '';
 $unapply = areyousure_link("${p}misc/unapply-cust_pay.cgi?".$cust_pay->paynum,
                             emt('Are you sure you want to unapply this payment?'),