[freeside-commits] branch FREESIDE_3_BRANCH updated. f79377d752c38762833b9ff3982046a31488d0df

Ivan ivan at 420.am
Thu May 11 09:50:16 PDT 2017


The branch, FREESIDE_3_BRANCH has been updated
       via  f79377d752c38762833b9ff3982046a31488d0df (commit)
      from  58f6502cd332fc0f862dc24056eb50a77614842e (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 f79377d752c38762833b9ff3982046a31488d0df
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu May 11 09:50:11 2017 -0700

    bulk remove email address, RT#75861

diff --git a/bin/remove-cust_main_invoice b/bin/remove-cust_main_invoice
new file mode 100755
index 0000000..da17a7e
--- /dev/null
+++ b/bin/remove-cust_main_invoice
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+
+use strict;
+use FS::UID qw( adminsuidsetup );
+use FS::Record qw( qsearch );
+
+my $user = shift or die &usage;
+
+my $email = shift or die &usage;
+
+adminsuidsetup $user;
+
+foreach my $cust_main_invoice (
+  qsearch('cust_main_invoice', { 'dest' => $email } )
+) {
+  my $error = $cust_main_invoice->delete;
+  die $error if $error;
+}
+
+sub usage {
+  "Usage: remove-cust_main_invoice username email\@address";
+}

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

Summary of changes:
 bin/remove-cust_main_invoice |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100755 bin/remove-cust_main_invoice




More information about the freeside-commits mailing list