[freeside-commits] branch FREESIDE_4_BRANCH updated. d8ab24b3869cd8402e20f49456b0c24bc110cb1b

Ivan ivan at 420.am
Wed Nov 16 09:38:56 PST 2016


The branch, FREESIDE_4_BRANCH has been updated
       via  d8ab24b3869cd8402e20f49456b0c24bc110cb1b (commit)
      from  4cc5534c6ef248937db2909b2e80c91a883d33e2 (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 d8ab24b3869cd8402e20f49456b0c24bc110cb1b
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Nov 16 09:38:55 2016 -0800

    add -t flag to bulk void for payment type, RT#73413

diff --git a/bin/bulk_void b/bin/bulk_void
index b12b5a9..8f0c882 100755
--- a/bin/bulk_void
+++ b/bin/bulk_void
@@ -32,11 +32,12 @@ if (!$opt{start} or !$opt{end} or !$opt{r}) {
 
 print "DRY RUN--changes will not be committed.\n" unless $opt{X};
 
-my $date = " WHERE _date >= $opt{start} AND _date <= $opt{end}";
-
 my %search = ();
 $search{payby} = $opt{t} if $opt{t} && $opt{p};
 
+my $date = (keys %search ? ' AND ' : ' WHERE ').
+           " _date >= $opt{start} AND _date <= $opt{end}";
+
 my %tables = (
   c => 'cust_credit',
   p => 'cust_pay',

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

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




More information about the freeside-commits mailing list