[freeside-commits] branch master updated. 164e0da4c66b354bb35bf0af54a1f28555f0bf2a

Ivan ivan at 420.am
Tue Jul 21 15:25:04 PDT 2015


The branch, master has been updated
       via  164e0da4c66b354bb35bf0af54a1f28555f0bf2a (commit)
      from  49c58715c06a5150805fd3019a72dc1bc6361514 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 164e0da4c66b354bb35bf0af54a1f28555f0bf2a
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Jul 21 15:25:01 2015 -0700

    remove external cust_bill::delete method, RT#37157

diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index b694924..7ea586a 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -253,7 +253,7 @@ sub void {
     }
   }
 
-  $error = $self->delete;
+  $error = $self->_delete;
   if ( $error ) {
     $dbh->rollback if $oldAutoCommit;
     return $error;
@@ -265,19 +265,22 @@ sub void {
 
 }
 
-=item delete
-
-DO NOT USE THIS METHOD.  Instead, apply a credit against the invoice, or use
-the B<void> method.
-
-This is only for internal use by V<void>, which is what you should be using.
-
-DO NOT USE THIS METHOD.  Whatever reason you think you have is almost certainly
-wrong.  Use B<void>, that's what it is for.  Really.  This means you.
-
-=cut
-
-sub delete {
+# removed docs entirely and renamed method to _delete to further indicate it is
+# internal-only and discourage use
+#
+# =item delete
+# 
+# DO NOT USE THIS METHOD.  Instead, apply a credit against the invoice, or use
+# the B<void> method.
+# 
+# This is only for internal use by V<void>, which is what you should be using.
+# 
+# DO NOT USE THIS METHOD.  Whatever reason you think you have is almost certainly
+# wrong.  Use B<void>, that's what it is for.  Really.  This means you.
+# 
+# =cut
+
+sub _delete {
   my $self = shift;
   return "Can't delete closed invoice" if $self->closed =~ /^Y/i;
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_bill.pm |   31 +++++++++++++++++--------------
 1 file changed, 17 insertions(+), 14 deletions(-)




More information about the freeside-commits mailing list