[freeside-commits] branch FREESIDE_3_BRANCH updated. b94c1d5b5d8179b7bcc57ff5c352fa7039424001

Ivan Kohler ivan at freeside.biz
Wed Dec 20 12:47:50 PST 2017


The branch, FREESIDE_3_BRANCH has been updated
       via  b94c1d5b5d8179b7bcc57ff5c352fa7039424001 (commit)
      from  661bc3f13e782f21099dc9cc1b7fa28c4ea251e7 (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 b94c1d5b5d8179b7bcc57ff5c352fa7039424001
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Dec 20 12:47:49 2017 -0800

    added -f flag to continue voiding even if an error is received, RT#78977

diff --git a/bin/bulk_void b/bin/bulk_void
index f31eea5cd..5da7d15f6 100755
--- a/bin/bulk_void
+++ b/bin/bulk_void
@@ -8,7 +8,7 @@ use File::Slurp;
 use FS::Misc::Getopt;
 use FS::Record qw(qsearch qsearchs dbh);
 
-getopts('cpiXr:t:u:vk:');
+getopts('cpiXr:t:u:vk:f');
 
 my $dbh = dbh;
 $FS::UID::AutoCommit = 0;
@@ -29,6 +29,7 @@ sub usage() {
 -u: specifies a filename of customer numbers - only void for those customers
 -k: skip invoices with only this pkgpart
 -t: only void payments with this payby
+-f: force - continue voiding invoices even if some have errors
 -v: verbose - show more detail
 -X: commit changes
 ";
@@ -95,7 +96,7 @@ foreach my $k (keys %tables) {
       $error = "$table #" . $record->get($record->primary_key) . ": $error";
       print "$error\n";
       $error_count++;
-      if ( $opt{X} ) {
+      if ( $opt{X} && ! $opt{f} ) {
         $dbh->rollback;
         exit(1);
       }

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

Summary of changes:
 bin/bulk_void | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list