X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fbulk_void;h=5da7d15f6cd421777e91b1fc0546b1267a347d02;hp=f31eea5cd7cd3be7a8bb0c0af14ef1ffb64c2e36;hb=368ed08e24400e9d1faf401a1e4e23ea54d2c969;hpb=7cc33e5bec877c6712ca4c374393ab9952a20e82 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); }